Create a new charge
Create a charge for a customer registered in your Raims account.
Creates a charge for a customer already registered in the company and
authenticated environment. In customer_id, use the identifier received
when creating or looking up the customer.
To receive Pix data when creating the charge, send payment_method: 1
without a custom list in payment_method_types. The API uses the linked
customer's CPF/CNPJ.
To issue a boleto, send payment_method: 2 without a custom list. Issuance
uses the customer's name, valid email, CPF/CNPJ and address. Raims can fill
in missing street, neighborhood, city and state from the postal code when
this data is available. Provide the number in the customer's
record; it does not come from the postal code. See the
address conditions.
If Pix or boleto issuance is pending, store the returned ID and track the same charge through the individual lookup.
To associate the charge with the order in your system, use external_reference.
See Reference in your system
to understand this association and avoid duplicate charges when repeating a request.
Use create_checkout: true to receive the checkout link without configuring
a return URL. Providing a return URL also generates the link, even with
send_email: false, without requesting an email. cancel_redirect_url
is the destination for returning to the company's website; this navigation
does not revoke the charge.
See the charges overview to understand due dates,
return URLs and email requests. The payment_method codes and checkout
selection are explained in Payment methods.
Headers
Unique key chosen by your system to identify this request. When retrying, send the same key and parameters. Without this header, the request is processed normally. See the idempotency guide for retention and handling pending or uncertain responses.
1 to 255 characters
Body Params
Applying an example replaces the body fields.
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.
Up to 100 characters
Charge amount in Brazilian real cents. For example, 10000 represents R$ 100.00.
From 100 to 999999999999
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.
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.
Charge title. You can leave this field empty.
Up to 512 characters
Charge description. You can leave this field empty.
Up to 512 characters
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.
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.
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.
Up to 2048 characters
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.
Up to 2048 characters
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.
1 to 2 items
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.
Up to 120 characters
Integration data associated with the charge, as key and text pairs. Keys are case-sensitive. Omitting it, sending null or {} creates the charge without this data; pairs with null values are not included. Empty text is a valid value.
Up to 32 entries, Keys: up to 40 characters, Values: up to 500 characters, JSON: up to 8192 UTF-8 bytes
Responses
Response Body
Charge created. For Pix or boleto requested during creation, check pix_status or boleto_status in payment_information: available provides payment details; failed means the charge was created but issuance failed, with the reason in pix_error or boleto_error. Save the ID in both cases. The response does not confirm payment or email delivery.
Public identifier of the created charge.
Public identifier of the linked customer.
Charge amount in Brazilian real cents.
Charge payment method. With a custom list, returns 0 until payment issuance. Without a list, 1 requests direct Pix and 2 requests direct boleto. The method list remains separate from the recorded selection.
Charge due date in Unix UTC seconds.
Charge title, or null when not provided.
Charge description, or null when not provided.
Charge status, accounting for the due date. 0 created, 1 awaiting payment, 2 authorized, 3 processing, 4 paid, 5 partially refunded, 6 refunded, 7 canceled, 8 expired, 9 failed, 10 chargeback, 11 chargeback under review, 12 chargeback lost and 13 chargeback won.
Creation time in Unix UTC seconds.
Link for the payer to open checkout. Returned when create_checkout or send_email is true, or a return URL is provided; otherwise, it is null. The link does not prove payment or email delivery.
List of payment methods configured for the charge, or null when it uses the inherited checkout configuration. 1 means Pix and 2 means boleto. The list does not change with the method used for payment and does not represent current checkout availability.
Order or charge reference in your system, or null when not provided. It is separate from the customer reference and can be repeated on other charges.
Payment instructions and Pix or boleto issuance result. Without a custom list, payment_method 1 requests Pix and 2 requests boleto. Check pix_status or boleto_status and the data for the requested method.
Pix payment data, or null when unavailable.
Pix copy-and-paste code to pay the charge.
Pix code expiration in Unix UTC seconds.
Base64 PNG image of the QR Code without a data URI prefix. To display it in a browser, add data:image/png;base64, before the value.
Boleto payment data, or null when unavailable.
47-digit payment line of the issued boleto.
44-digit barcode of the issued boleto.
Boleto due date in Unix UTC seconds.
Pix issuance result: not_generated when no issuance is available or requested; available when data is available; pending while there is no confirmed result; failed when issuance was unsuccessful.
Reason for pending or failed Pix issuance, or null. Store the charge ID and use the individual lookup to track it. If the condition persists, contact support; do not repeat creation to try to issue Pix.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Boleto issuance result: not_generated when no issuance is available or requested; available when data is available; pending while there is no confirmed result; failed when issuance was unsuccessful.
Reason for pending or failed boleto issuance, or null. Store the charge ID and use the individual lookup to track it. If the condition persists, contact support; do not repeat creation to try to issue the boleto.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Boleto payment progress: awaiting_payment awaits payment, compensated awaits settlement and settled confirms settlement. Null when no progress data is available. Clearing does not yet mean available credit.
Integration data associated with the resource. Returns {} when there are no values. This map is not used as a search filter or automatically included in webhook events.
Response Body
Charge created, with Pix or boleto issuance still in progress or without a confirmed result. Save the ID and retrieve the same charge to track pix_status or boleto_status and the available details. If it remains pending, contact support. Do not repeat creation to try to issue the payment.
Public identifier of the created charge.
Public identifier of the linked customer.
Charge amount in Brazilian real cents.
Charge payment method. With a custom list, returns 0 until payment issuance. Without a list, 1 requests direct Pix and 2 requests direct boleto. The method list remains separate from the recorded selection.
Charge due date in Unix UTC seconds.
Charge title, or null when not provided.
Charge description, or null when not provided.
Charge status, accounting for the due date. 0 created, 1 awaiting payment, 2 authorized, 3 processing, 4 paid, 5 partially refunded, 6 refunded, 7 canceled, 8 expired, 9 failed, 10 chargeback, 11 chargeback under review, 12 chargeback lost and 13 chargeback won.
Creation time in Unix UTC seconds.
Link for the payer to open checkout. Returned when create_checkout or send_email is true, or a return URL is provided; otherwise, it is null. The link does not prove payment or email delivery.
List of payment methods configured for the charge, or null when it uses the inherited checkout configuration. 1 means Pix and 2 means boleto. The list does not change with the method used for payment and does not represent current checkout availability.
Order or charge reference in your system, or null when not provided. It is separate from the customer reference and can be repeated on other charges.
Payment instructions and Pix or boleto issuance result. Without a custom list, payment_method 1 requests Pix and 2 requests boleto. Check pix_status or boleto_status and the data for the requested method.
Pix payment data, or null when unavailable.
Pix copy-and-paste code to pay the charge.
Pix code expiration in Unix UTC seconds.
Base64 PNG image of the QR Code without a data URI prefix. To display it in a browser, add data:image/png;base64, before the value.
Boleto payment data, or null when unavailable.
47-digit payment line of the issued boleto.
44-digit barcode of the issued boleto.
Boleto due date in Unix UTC seconds.
Pix issuance result: not_generated when no issuance is available or requested; available when data is available; pending while there is no confirmed result; failed when issuance was unsuccessful.
Reason for pending or failed Pix issuance, or null. Store the charge ID and use the individual lookup to track it. If the condition persists, contact support; do not repeat creation to try to issue Pix.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Boleto issuance result: not_generated when no issuance is available or requested; available when data is available; pending while there is no confirmed result; failed when issuance was unsuccessful.
Reason for pending or failed boleto issuance, or null. Store the charge ID and use the individual lookup to track it. If the condition persists, contact support; do not repeat creation to try to issue the boleto.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Boleto payment progress: awaiting_payment awaits payment, compensated awaits settlement and settled confirms settlement. Null when no progress data is available. Clearing does not yet mean available credit.
Integration data associated with the resource. Returns {} when there are no values. This map is not used as a search filter or automatically included in webhook events.
Response Body
Review the fields identified in error.details. Direct Pix requires a valid CPF/CNPJ for the associated customer. Boleto also requires a name, valid email, postal code (CEP), number, and other required address details. Raims completes missing address fields with the available details for the postal code. Correct the customer identified by customer_id before sending the request again. Email is required for boleto even with send_email false; it does not request an email to be sent by itself.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Response Body
The request is not authorized. While account registration is pending, sending an email requires the recipient to be the account's primary email.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
Response Body
No customer was found for customer_id in the authenticated company and environment. Check the ID and authentication used in the request. The charge was not created.
Code and explanation of the error returned by the API.
Stable error code.
Error explanation in English. For validation errors, it summarizes the category; details identify the corrections. Use the codes to handle the response.
Invalid fields or references submitted in the body, with the field, code and explanation. Omitted for general errors and when there is no field correction to indicate.
Public name of the JSON field, query parameter, path parameter or header related to the error. Nested fields and lists retain their path and index. $ represents the root of the JSON body.
Reason for the field error, such as REQUIRED, INVALID_TAXID, UNKNOWN_FIELD, DUPLICATE_FIELD or INVALID_TYPE.
Explanation in English of the problem with this field or parameter and the available correction. Do not use the text to determine your integration flow.
For common errors, see HTTP response codes.