raims charges
Manage charges and their payment details
From command to result
Create a charge for an existing customer and follow the returned ID. Replace CUSTOMER_ID and review the Unix due date in seconds before sending; the values below are illustrative.
Configure the profile and credential before running real reads. With an API
key, the key determines the company and environment. --environment selects
an environment only for OAuth.
Review creation
Shellraims charges create --customer-id CUSTOMER_ID --amount-cents 10000 --due-date 1893456000 --dry-runThe preview shows the method, URL, and body without credentials. Check the customer, amount in cents, and due date.
Send once
Shellraims --profile sandbox --output json charges create --customer-id CUSTOMER_ID --amount-cents 10000 --due-date 1893456000 --idempotency-key pedido_123Use a stable idempotency key for this intent and keep it when repeating the same input. Save
data.id; HTTP 202 remains pending.Follow the charge
Shellraims --profile sandbox --output json charges get CHARGE_IDUse the returned ID in the same environment. Inspect status and available instructions before repeating creation.
payment,boleto, andreceipthave their own purposes and conditions.
Choose a command
| Command | Purpose |
|---|---|
raims charges boleto | Get the boleto download information |
raims charges create | Create a charge |
raims charges get | Get a charge |
raims charges list | List charges |
raims charges payment | Get payment details for a charge |
raims charges receipt | Get the payment receipt download information |
raims charges refund-eligibility | Check whether a charge can be refunded |
raims charges refunds create | Request a refund for a charge |
raims charges refunds list | List refunds for a charge |
raims charges revoke | Revoke a charge |
raims charges statistics | Get charge statistics for a period |
raims charges update | Update a charge |
The previews below use --dry-run and do not send the request. Replace placeholders and review the result before sending a write.
Body fields, filters, and headers are sent only when supplied. Execution option defaults do not fill API fields.
raims charges
Manage charges and their payment details
raims charges [flags]Execution options
--help,-hbooldefault: false- help for charges
See global options.
Subcommands: raims charges boleto, raims charges create, raims charges get, raims charges list, raims charges payment, raims charges receipt, raims charges refund-eligibility, raims charges refunds, raims charges revoke, raims charges statistics, raims charges update.
raims charges boleto
Get the boleto download information
raims charges boleto ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json charges boleto ID --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Download boleto
{
"url": "https://files.raims.com/documents/boleto/exemplo.pdf?Expires=1792080180&Signature=EXEMPLO&Key-Pair-Id=EXEMPLO",
"expires_at": 1792080180
}Execution options
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for boleto
--savestringdefault: empty- Save the PDF to PATH (up to 32 MiB); the parent directory must exist and the file must not exist
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Get the boleto download information.
GET /v1/charges/{id}/boleto
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims charges create
Create a charge
raims charges create [flags]OAuth environments: Sandbox, Production. Success responses: 201, 202.
HTTP 202 means the request is pending. Query the returned resource before repeating a write; the command does not wait for completion.
Example 1
raims --profile PROFILE --output json charges create --data-file request.json --dry-runExample 2
raims charges create --amount-cents=10000 --customer-id="cus_1Q2W3E4R5T6Y7U8I9O0P" --due-date=1893456000 --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Charge with pending Pix issuance
{
"id": "ch_1Q2W3E4R5T6Y7U8I9O0P",
"customer_id": "cus_1Q2W3E4R5T6Y7U8I9O0P",
"status": 0,
"amount_cents": 10000,
"payment_method": 1,
"due_date": 1893456000
}Body fields
--amount-centsintegerrequired in the body sent only when supplied- Charge amount in Brazilian real cents. For example, 10000 represents R$ 100.00.
--cancel-redirect-urlstringaccepts null sent only when supplied- HTTPS URL of your website for the payer to return through checkout. Returning does not cancel the charge, Pix or boleto. Does not accept credentials in the address, a literal IP, localhost or a Raims domain. When populated, generates checkout_url even with send_email false. If omitted, empty or null, no return destination is set.
--create-checkoutboolsent only when supplied- With true, generates the link returned in checkout_url without requiring a return URL or requesting an email. With false, the link is still generated when send_email is true or a return URL is provided.
--customer-idstringrequired in the body sent only when supplied- ID of a customer in the authenticated company and environment. Copy the id returned when creating or looking up the customer. Direct Pix requires a valid CPF/CNPJ. Direct boleto requires a name, valid email, CPF/CNPJ and address, including postal code and number; complete this data in the customer record.
--descriptionstringaccepts null sent only when supplied- Charge description. You can leave this field empty.
--due-dateintegerrequired in the body sent only when supplied- Due date in Unix UTC seconds, at least five minutes in the future. The maximum date is today plus ten years in the São Paulo calendar.
--external-referencestringaccepts null sent only when supplied- Order or charge reference in your system. Null, empty text or only spaces leave it without a reference. It can be repeated and does not prevent duplicate charges. It differs from the customer record's reference.
--metadatastringArraysent only when supplied- Set a metadata text value as KEY=VALUE (repeat for each key; dots in keys are literal)
--metadata-emptyboolsent only when supplied- Send an empty metadata object; an update preserves existing keys
--metadata-nullstringArraysent only when supplied- Send null for a metadata key (repeat for each key; removes it when updating)
--payment-methodintegersent only when supplied- Charge payment method. Omitting it or sending 0 allows selection in checkout. Without payment_method_types, 1 requests Pix and 2 requests boleto at creation, according to enabled methods. Boleto uses the customer's address and fills in missing fields from the postal code when available. With a custom list, send 0 or omit this field; issuance takes place after checkout selection.
--payment-method-typesintegerArrayaccepts null sent only when supplied- Methods allowed for the charge: 1 for Pix and 2 for boleto. Omitting it or sending null uses the inherited checkout configuration. Provide a list without duplicates. The custom configuration overrides the account default; a link configuration can only restrict this list. Combine with payment_method omitted or 0. Repeat the option for each item.
--send-emailboolsent only when supplied- With true, requests that the charge be sent to the customer's email and generates checkout_url. For pending accounts, the customer must have the same primary email as the account. Outside that condition, a missing or invalid email prevents sending but allows charge creation when there is no direct boleto issuance. Direct boleto requires a valid email even with false. The response does not confirm message delivery.
--success-redirect-urlstringaccepts null sent only when supplied- HTTPS URL of your website for returning after payment confirmation. Redirection does not prove payment; look up the charge to confirm it. Does not accept credentials in the address, a literal IP, localhost or a Raims domain. When populated, generates checkout_url even with send_email false. If omitted, empty or null, no return destination is set.
--titlestringaccepts null sent only when supplied- Charge title. You can leave this field empty.
Request headers
--idempotency-keystringsent only when supplied- Reuse this optional idempotency key when retrying the same request
Execution options
--body-nullstringArraydefault: []- Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
--data-filestringdefault: empty- Read the JSON request body from a UTF-8 file, or '-' for stdin
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for create
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Create a charge.
POST /v1/charges
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.
Read the JSON request body with --data-file PATH, or --data-file - for standard input. You can also provide the body options listed below. Repeat array options for each item. Do not combine file input with body options. Only supplied fields are sent. When listed, --body-null FIELD sends an explicit null for a nullable field. Array size and uniqueness follow the endpoint contract. Objects without dedicated body options and arrays of objects use file input.
JSON body fields:
amount_cents integer required
cancel_redirect_url string optional, nullable
create_checkout boolean optional
customer_id string required
description string optional, nullable
due_date integer required
external_reference string optional, nullable
metadata object optional, nullable
payment_method integer optional; allowed: 0, 1, 2
payment_method_types array<integer> optional, nullable; allowed: 1, 2
send_email boolean optional
success_redirect_url string optional, nullable
title string optional, nullable
Nested requirements apply when the parent object is present, or for each supplied array item. Omit an optional field to leave it unspecified; null is accepted only for nullable fields.
JSON body example (save as request.json):
{
"customer_id": "cus_1Q2W3E4R5T6Y7U8I9O0P",
"amount_cents": 10000,
"payment_method": 0,
"due_date": 1893456000,
"title": "Serviço contratado",
"description": "Cobrança do serviço",
"send_email": false,
"external_reference": "pedido_12345"
}
Example values are illustrative. Replace resource IDs and review the request before sending it.
HTTP 202 means the request is pending. Inspect the returned resource before repeating an operation; this command does not wait for completion.
Metadata options send a text map: repeat --metadata KEY=VALUE for values, use --metadata-null KEY for a null value, or --metadata-empty for an empty object. Empty text, numeric-looking values and the text null remain strings. Omitted metadata and an empty object preserve existing keys when updating; null values remove individual keys, and --body-null metadata clears the entire map. Do not combine these options with --data-file, or use multiple values for the same key.raims charges get
Get a charge
raims charges get ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json charges get ID --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Charge before a payment method is chosen
{
"id": "ch_3AbHiWSrsZBoaTg47OcMzC",
"customer_id": "cus_1AbXiWSrsCBoaTg47OcMzC",
"status": 0,
"amount_cents": 10000,
"payment_method": 0,
"checkout_payment_method": null
}Execution options
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for get
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Get a charge.
GET /v1/charges/{id}
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims charges list
List charges
raims charges list [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json charges list --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Charges found
{
"list": [
{
"id": "ch_1Q2W3E4R5T6Y7U8I9O0P",
"customer_id": "cus_1Q2W3E4R5T6Y7U8I9O0P",
"amount_cents": 10000,
"payment_method": 0,
"due_date": 1893456000,
"title": "Serviço contratado",
"description": "Cobrança do serviço",
"status": 0,
"created_at": 1791849600,
"checkout_url": null,
"checkout_payment_method": null,
"payment_method_types": null,
"external_reference": "pedido_12345",
"metadata": {}
}
],
"page": {
"page_size": 10,
"has_next": false,
"has_previous": false,
"next_after": null,
"previous_before": null
}
}Query filters
--afterstringsent only when supplied- Read after this opaque cursor (cannot be combined with --before)
--beforestringsent only when supplied- Read before this opaque cursor (cannot be combined with --after)
--created-gteint64sent only when supplied- Created at or after this Unix timestamp (seconds)
--created-lteint64sent only when supplied- Created at or before this Unix timestamp (seconds)
--customer-idstringsent only when supplied- Filter by customer ID
--due-gteint64sent only when supplied- Due at or after this Unix timestamp (seconds)
--due-lteint64sent only when supplied- Due at or before this Unix timestamp (seconds)
--emailstringsent only when supplied- Filter by email address
--external-referencestringsent only when supplied- Filter by external reference
--identifierstringsent only when supplied- Filter by public resource identifier
--page-sizeint64sent only when supplied- Results per page (the API normalizes the requested size)
--paid-gteint64sent only when supplied- Paid at or after this Unix timestamp (seconds)
--paid-lteint64sent only when supplied- Paid at or before this Unix timestamp (seconds)
--payment-methodstringsent only when supplied- Filter by comma-separated payment method codes
--sort-keystringsent only when supplied- Sort results by this API field
--sort-orderstringsent only when supplied- Sort direction: asc or desc
--statusstringsent only when supplied- Filter by comma-separated charge status codes
Execution options
--allbooldefault: false- Read all pages as separate results (JSON Lines with --output json)
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for list
--max-pagesintdefault: 100- Maximum pages to read with --all (1-10000)
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
List charges.
GET /v1/charges
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims charges payment
Get payment details for a charge
raims charges payment ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json charges payment ID --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Pix payment with a bank transaction ID
{
"charge_id": "ch_3AbHiWSrsZBoaTg47OcMzC",
"customer_id": "cus_1AbXiWSrsCBoaTg47OcMzC",
"amount_cents": 10000,
"payment_method": 1,
"paid_at": 1791878400,
"customer": {
"name": "Cliente Exemplo",
"tax_id": "12345678909"
}
}Execution options
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for payment
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Get payment details for a charge.
GET /v1/charges/{id}/payment
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims charges receipt
Get the payment receipt download information
raims charges receipt ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json charges receipt ID --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Download payment receipt
{
"url": "https://files.raims.com/documents/recibo-pagamento/exemplo.pdf?Expires=1792080180&Signature=EXEMPLO&Key-Pair-Id=EXEMPLO",
"expires_at": 1792080180
}Execution options
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for receipt
--savestringdefault: empty- Save the PDF to PATH (up to 32 MiB); the parent directory must exist and the file must not exist
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Get the payment receipt download information.
GET /v1/charges/{id}/receipt
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims charges refund-eligibility
Check whether a charge can be refunded
raims charges refund-eligibility ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json charges refund-eligibility ID --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Charge eligible for a refund request
{
"charge_id": "ch_3AbHiWSrsZBoaTg47OcMzC",
"eligible": true,
"reason": null,
"refundable_amount_cents": 10000,
"pending_amount_cents": 0,
"max_refund_amount_cents": 10000
}Execution options
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for refund-eligibility
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Check whether a charge can be refunded.
GET /v1/charges/{id}/refund_eligibility
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims charges refunds
Inspect and request refunds for a charge
raims charges refunds [flags]Execution options
--help,-hbooldefault: false- help for refunds
See global options.
Subcommands: raims charges refunds create, raims charges refunds list.
raims charges refunds create
Request a refund for a charge
raims charges refunds create ID [flags]OAuth environments: Sandbox, Production. Success responses: 200, 202.
HTTP 202 means the request is pending. Query the returned resource before repeating a write; the command does not wait for completion.
Example 1
raims --profile PROFILE --output json charges refunds create ID --data-file request.json --dry-runExample 2
raims charges refunds create ID --amount-cents=2500 --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Refund awaiting confirmation
{
"id": "rf_3AbHiWSrsZBoaTg47OcMzC",
"charge_id": "ch_3AbHiWSrsZBoaTg47OcMzC",
"status": "accepted",
"amount_cents": 2500,
"description": "Devolução parcial do serviço",
"created_at": 1791964800
}Body fields
--amount-centsintegerrequired in the body sent only when supplied- Amount requested for a refund, in Brazilian real cents. To refund the full amount, provide the remaining amount shown in the eligibility query.
--descriptionstringaccepts null sent only when supplied- Refund request description. You can leave this field empty.
Request headers
--idempotency-keystringsent only when supplied- Reuse this optional idempotency key when retrying the same request
Execution options
--body-nullstringArraydefault: []- Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
--data-filestringdefault: empty- Read the JSON request body from a UTF-8 file, or '-' for stdin
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for create
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Request a refund for a charge.
POST /v1/charges/{id}/refunds
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.
Read the JSON request body with --data-file PATH, or --data-file - for standard input. You can also provide the body options listed below. Repeat array options for each item. Do not combine file input with body options. Only supplied fields are sent. When listed, --body-null FIELD sends an explicit null for a nullable field. Array size and uniqueness follow the endpoint contract. Objects without dedicated body options and arrays of objects use file input.
JSON body fields:
amount_cents integer required
description string optional, nullable
Nested requirements apply when the parent object is present, or for each supplied array item. Omit an optional field to leave it unspecified; null is accepted only for nullable fields.
JSON body example (save as request.json):
{
"amount_cents": 2500,
"description": "Devolução parcial do serviço"
}
Example values are illustrative. Replace resource IDs and review the request before sending it.
HTTP 202 means the request is pending. Inspect the returned resource before repeating an operation; this command does not wait for completion.raims charges refunds list
List refunds for a charge
raims charges refunds list ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json charges refunds list ID --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Partial refund history
{
"list": [
{
"id": "rf_3AbHiWSrsZBoaTg47OcMzC",
"charge_id": "ch_3AbHiWSrsZBoaTg47OcMzC",
"amount_cents": 2500,
"description": "Devolução parcial do serviço",
"status": "accepted",
"created_at": 1791964800,
"completed_at": null,
"failed_at": null,
"failure_reason": null
},
{
"id": "rf_3AbHiWSrsZBoaTg47OcMzD",
"charge_id": "ch_3AbHiWSrsZBoaTg47OcMzC",
"amount_cents": 1000,
"description": "Devolução parcial do serviço",
"status": "completed",
"created_at": 1791878400,
"completed_at": 1791878580,
"failed_at": null,
"failure_reason": null
}
],
"page": {
"page_size": 10,
"has_next": false,
"has_previous": false,
"next_after": null,
"previous_before": null
}
}Query filters
--afterstringsent only when supplied- Read after this opaque cursor (cannot be combined with --before)
--beforestringsent only when supplied- Read before this opaque cursor (cannot be combined with --after)
--created-gteint64sent only when supplied- Created at or after this Unix timestamp (seconds)
--created-lteint64sent only when supplied- Created at or before this Unix timestamp (seconds)
--page-sizeint64sent only when supplied- Results per page (the API normalizes the requested size)
Execution options
--allbooldefault: false- Read all pages as separate results (JSON Lines with --output json)
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for list
--max-pagesintdefault: 100- Maximum pages to read with --all (1-10000)
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
List refunds for a charge.
GET /v1/charges/{id}/refunds
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims charges revoke
Revoke a charge
raims charges revoke ID [flags]OAuth environments: Sandbox, Production. Success responses: 200, 202.
HTTP 202 means the request is pending. Query the returned resource before repeating a write; the command does not wait for completion.
Example
raims --profile PROFILE --output json charges revoke ID --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Revoke a charge
{
"id": "ch_3AbHiWSrsZBoaTg47OcMzC",
"status": 1,
"revoked": false,
"revocation_pending": true
}Request headers
--idempotency-keystringsent only when supplied- Reuse this optional idempotency key when retrying the same request
Execution options
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for revoke
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Revoke a charge.
DELETE /v1/charges/{id}
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.
HTTP 202 means the request is pending. Inspect the returned resource before repeating an operation; this command does not wait for completion.raims charges statistics
Get charge statistics for a period
raims charges statistics [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example
raims --profile PROFILE --output json charges statistics --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Charges and receipts for the last 7 days
{
"period": "last_7_days",
"start_at": 1791428400,
"end_at": 1792033200,
"issued": {
"count": 120,
"amount_cents": 2400000
},
"issued_paid": {
"count": 90,
"amount_cents": 1800000
},
"received": {
"count": 95,
"amount_cents": 1900000
}
}Query filters
--periodstringsent only when supplied- Reporting period: today, last_7_days, last_15_days or last_30_days
Execution options
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for statistics
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Get charge statistics for a period.
GET /v1/charges/statistics
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.raims charges update
Update a charge
raims charges update ID [flags]OAuth environments: Sandbox, Production. Success responses: 200.
Example 1
raims --profile PROFILE --output json charges update ID --data-file request.json --dry-runExample 2
raims charges update ID --description="Descrição atualizada da cobrança" --dry-runThe excerpt below shows the CLI contents of data. The envelope also reports status_code and the received request_id.
Update an existing charge
{
"id": "ch_3AbHiWSrsZBoaTg47OcMzC",
"customer_id": "cus_1AbXiWSrsCBoaTg47OcMzC",
"status": 0,
"amount_cents": 10000,
"payment_method": 0,
"checkout_payment_method": null
}Body fields
--descriptionstringaccepts null sent only when supplied- Charge description. Omit it to keep the current description; send null or empty text to remove it.
--external-referencestringaccepts null sent only when supplied- Order or charge reference in your system. Omit it to keep the current value; send null or empty text to remove it. It can be repeated on other charges and is separate from the customer reference.
--metadatastringArraysent only when supplied- Set a metadata text value as KEY=VALUE (repeat for each key; dots in keys are literal)
--metadata-emptyboolsent only when supplied- Send an empty metadata object; an update preserves existing keys
--metadata-nullstringArraysent only when supplied- Send null for a metadata key (repeat for each key; removes it when updating)
--titlestringaccepts null sent only when supplied- Charge title. Omit it to keep the current title; send null or empty text to remove it.
Request headers
--idempotency-keystringsent only when supplied- Reuse this optional idempotency key when retrying the same request
Execution options
--body-nullstringArraydefault: []- Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
--data-filestringdefault: empty- Read the JSON request body from a UTF-8 file, or '-' for stdin
--dry-runbooldefault: false- Validate and preview the request without credentials or network access
--help,-hbooldefault: false- help for update
--show-headersbooldefault: false- Show public response headers without credentials or cookies
--timeoutdurationdefault: 1m0s- Total request timeout, including retries (for example 30s or 2m)
See global options.
Update a charge.
PATCH /v1/charges/{id}
Uses https://api.raims.com and the credential referenced by the selected profile. The API validates the credential's company, environment and permissions. API keys determine their own environment; --environment is available only with OAuth.
Use --dry-run to validate and preview the request without reading a profile, loading credentials or contacting the API. Add --environment to preview an OAuth request; without it, the preview uses API-key authentication and has no environment header.
OAuth environments accepted by this operation: Sandbox, Production.
Read the JSON request body with --data-file PATH, or --data-file - for standard input. You can also provide the body options listed below. Repeat array options for each item. Do not combine file input with body options. Only supplied fields are sent. When listed, --body-null FIELD sends an explicit null for a nullable field. Array size and uniqueness follow the endpoint contract. Objects without dedicated body options and arrays of objects use file input.
JSON body fields:
description string optional, nullable
external_reference string optional, nullable
metadata object optional, nullable
title string optional, nullable
Nested requirements apply when the parent object is present, or for each supplied array item. Omit an optional field to leave it unspecified; null is accepted only for nullable fields.
JSON body example (save as request.json):
{
"title": "Serviço atualizado",
"description": "Descrição atualizada da cobrança",
"external_reference": "pedido_12345_atualizado"
}
Example values are illustrative. Replace resource IDs and review the request before sending it.
Metadata options send a text map: repeat --metadata KEY=VALUE for values, use --metadata-null KEY for a null value, or --metadata-empty for an empty object. Empty text, numeric-looking values and the text null remain strings. Omitted metadata and an empty object preserve existing keys when updating; null values remove individual keys, and --body-null metadata clears the entire map. Do not combine these options with --data-file, or use multiple values for the same key.