Docs
Checking Raims account
Raims CLIAPI commands

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.

  1. Review creation

    Shell
    raims charges create --customer-id CUSTOMER_ID --amount-cents 10000 --due-date 1893456000 --dry-run

    The preview shows the method, URL, and body without credentials. Check the customer, amount in cents, and due date.

  2. Send once

    Shell
    raims --profile sandbox --output json charges create --customer-id CUSTOMER_ID --amount-cents 10000 --due-date 1893456000 --idempotency-key pedido_123

    Use a stable idempotency key for this intent and keep it when repeating the same input. Save data.id; HTTP 202 remains pending.

  3. Follow the charge

    Shell
    raims --profile sandbox --output json charges get CHARGE_ID

    Use the returned ID in the same environment. Inspect status and available instructions before repeating creation. payment, boleto, and receipt have their own purposes and conditions.

Choose a command

CommandPurpose
raims charges boletoGet the boleto download information
raims charges createCreate a charge
raims charges getGet a charge
raims charges listList charges
raims charges paymentGet payment details for a charge
raims charges receiptGet the payment receipt download information
raims charges refund-eligibilityCheck whether a charge can be refunded
raims charges refunds createRequest a refund for a charge
raims charges refunds listList refunds for a charge
raims charges revokeRevoke a charge
raims charges statisticsGet charge statistics for a period
raims charges updateUpdate 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

Shell
raims charges [flags]

Execution options

  • --help, -h bool default: 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

Shell
raims charges boleto ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json charges boleto ID --dry-run

Execution options

  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for boleto
  • --save string default: empty
    • Save the PDF to PATH (up to 32 MiB); the parent directory must exist and the file must not exist
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges create

Create a charge

Shell
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

Shell
raims --profile PROFILE --output json charges create --data-file request.json --dry-run

Example 2

Shell
raims charges create --amount-cents=10000 --customer-id="cus_1Q2W3E4R5T6Y7U8I9O0P" --due-date=1893456000 --dry-run

Body fields

  • --amount-cents integer required in the body sent only when supplied
    • Charge amount in Brazilian real cents. For example, 10000 represents R$ 100.00.
  • --cancel-redirect-url string accepts 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-checkout bool sent 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-id string required 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.
  • --description string accepts null sent only when supplied
    • Charge description. You can leave this field empty.
  • --due-date integer required 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-reference string accepts 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.
  • --metadata stringArray sent only when supplied
    • Set a metadata text value as KEY=VALUE (repeat for each key; dots in keys are literal)
  • --metadata-empty bool sent only when supplied
    • Send an empty metadata object; an update preserves existing keys
  • --metadata-null stringArray sent only when supplied
    • Send null for a metadata key (repeat for each key; removes it when updating)
  • --payment-method integer sent 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-types integerArray accepts 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-email bool sent 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-url string accepts 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.
  • --title string accepts null sent only when supplied
    • Charge title. You can leave this field empty.

Request headers

  • --idempotency-key string sent only when supplied
    • Reuse this optional idempotency key when retrying the same request

Execution options

  • --body-null stringArray default: []
    • Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
  • --data-file string default: empty
    • Read the JSON request body from a UTF-8 file, or '-' for stdin
  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for create
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges get

Get a charge

Shell
raims charges get ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json charges get ID --dry-run

Execution options

  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for get
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges list

List charges

Shell
raims charges list [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json charges list --dry-run

Query filters

  • --after string sent only when supplied
    • Read after this opaque cursor (cannot be combined with --before)
  • --before string sent only when supplied
    • Read before this opaque cursor (cannot be combined with --after)
  • --created-gte int64 sent only when supplied
    • Created at or after this Unix timestamp (seconds)
  • --created-lte int64 sent only when supplied
    • Created at or before this Unix timestamp (seconds)
  • --customer-id string sent only when supplied
    • Filter by customer ID
  • --due-gte int64 sent only when supplied
    • Due at or after this Unix timestamp (seconds)
  • --due-lte int64 sent only when supplied
    • Due at or before this Unix timestamp (seconds)
  • --email string sent only when supplied
    • Filter by email address
  • --external-reference string sent only when supplied
    • Filter by external reference
  • --identifier string sent only when supplied
    • Filter by public resource identifier
  • --page-size int64 sent only when supplied
    • Results per page (the API normalizes the requested size)
  • --paid-gte int64 sent only when supplied
    • Paid at or after this Unix timestamp (seconds)
  • --paid-lte int64 sent only when supplied
    • Paid at or before this Unix timestamp (seconds)
  • --payment-method string sent only when supplied
    • Filter by comma-separated payment method codes
  • --sort-key string sent only when supplied
    • Sort results by this API field
  • --sort-order string sent only when supplied
    • Sort direction: asc or desc
  • --status string sent only when supplied
    • Filter by comma-separated charge status codes

Execution options

  • --all bool default: false
    • Read all pages as separate results (JSON Lines with --output json)
  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for list
  • --max-pages int default: 100
    • Maximum pages to read with --all (1-10000)
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges payment

Get payment details for a charge

Shell
raims charges payment ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json charges payment ID --dry-run

Execution options

  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for payment
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges receipt

Get the payment receipt download information

Shell
raims charges receipt ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json charges receipt ID --dry-run

Execution options

  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for receipt
  • --save string default: empty
    • Save the PDF to PATH (up to 32 MiB); the parent directory must exist and the file must not exist
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges refund-eligibility

Check whether a charge can be refunded

Shell
raims charges refund-eligibility ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json charges refund-eligibility ID --dry-run

Execution options

  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for refund-eligibility
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges refunds

Inspect and request refunds for a charge

Shell
raims charges refunds [flags]

Execution options

  • --help, -h bool default: 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

Shell
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

Shell
raims --profile PROFILE --output json charges refunds create ID --data-file request.json --dry-run

Example 2

Shell
raims charges refunds create ID --amount-cents=2500 --dry-run

Body fields

  • --amount-cents integer required 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.
  • --description string accepts null sent only when supplied
    • Refund request description. You can leave this field empty.

Request headers

  • --idempotency-key string sent only when supplied
    • Reuse this optional idempotency key when retrying the same request

Execution options

  • --body-null stringArray default: []
    • Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
  • --data-file string default: empty
    • Read the JSON request body from a UTF-8 file, or '-' for stdin
  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for create
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges refunds list

List refunds for a charge

Shell
raims charges refunds list ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json charges refunds list ID --dry-run

Query filters

  • --after string sent only when supplied
    • Read after this opaque cursor (cannot be combined with --before)
  • --before string sent only when supplied
    • Read before this opaque cursor (cannot be combined with --after)
  • --created-gte int64 sent only when supplied
    • Created at or after this Unix timestamp (seconds)
  • --created-lte int64 sent only when supplied
    • Created at or before this Unix timestamp (seconds)
  • --page-size int64 sent only when supplied
    • Results per page (the API normalizes the requested size)

Execution options

  • --all bool default: false
    • Read all pages as separate results (JSON Lines with --output json)
  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for list
  • --max-pages int default: 100
    • Maximum pages to read with --all (1-10000)
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges revoke

Revoke a charge

Shell
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

Shell
raims --profile PROFILE --output json charges revoke ID --dry-run

Request headers

  • --idempotency-key string sent only when supplied
    • Reuse this optional idempotency key when retrying the same request

Execution options

  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for revoke
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges statistics

Get charge statistics for a period

Shell
raims charges statistics [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example

Shell
raims --profile PROFILE --output json charges statistics --dry-run

Query filters

  • --period string sent only when supplied
    • Reporting period: today, last_7_days, last_15_days or last_30_days

Execution options

  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for statistics
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.

raims charges update

Update a charge

Shell
raims charges update ID [flags]

OAuth environments: Sandbox, Production. Success responses: 200.

Example 1

Shell
raims --profile PROFILE --output json charges update ID --data-file request.json --dry-run

Example 2

Shell
raims charges update ID --description="Descrição atualizada da cobrança" --dry-run

Body fields

  • --description string accepts null sent only when supplied
    • Charge description. Omit it to keep the current description; send null or empty text to remove it.
  • --external-reference string accepts 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.
  • --metadata stringArray sent only when supplied
    • Set a metadata text value as KEY=VALUE (repeat for each key; dots in keys are literal)
  • --metadata-empty bool sent only when supplied
    • Send an empty metadata object; an update preserves existing keys
  • --metadata-null stringArray sent only when supplied
    • Send null for a metadata key (repeat for each key; removes it when updating)
  • --title string accepts 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-key string sent only when supplied
    • Reuse this optional idempotency key when retrying the same request

Execution options

  • --body-null stringArray default: []
    • Set a nullable JSON body field to null by its JSON name (repeat for each field; cannot be combined with --data-file)
  • --data-file string default: empty
    • Read the JSON request body from a UTF-8 file, or '-' for stdin
  • --dry-run bool default: false
    • Validate and preview the request without credentials or network access
  • --help, -h bool default: false
    • help for update
  • --show-headers bool default: false
    • Show public response headers without credentials or cookies
  • --timeout duration default: 1m0s
    • Total request timeout, including retries (for example 30s or 2m)

See global options.