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
environment of your API key. 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 looks up
its postal code catalog to fill in missing street, neighborhood, city and
state 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.
Body Params
ID of a customer in the company and environment of the API key. 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; keys with null values are not stored. 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
For common errors, see HTTP response codes.