Endpoint responsible for creating a new charge in Asaas.
This is the main request in the receivables flow and can be used to generate one-time charges with boleto, Pix, credit card, or an undefined payment method, allowing the payer to choose how they want to complete the payment.
A charge created through this endpoint can be used in simple flows, installment flows, flows with redirection to the invoice page, or flows linked to a Pix Automatic authorization.
Main request parameters
Some fields play a central role in the charge behavior:
customer— Unique identifier of the customer in Asaas to whom the charge will be linkedbillingType— Defines the payment method for the charge. Possible values are:BOLETOPIXCREDIT_CARDUNDEFINED
value— Charge amount. This must be used for one-time single-installment chargesdueDate— Charge due datedescription— Charge descriptionexternalReference— Charge identifier in your system. Recommended to facilitate tracking, reconciliation, and future searchesdiscount— Object containing the discount rules applied to the chargeinterest— Object containing the interest rules for payments made after the due datefine— Object containing the fine rules for payments made after the due datesplit— Object containing the configuration for splitting the received amount between accountscallback— Object containing the automatic redirection settings after the invoice is paidpixAutomaticAuthorizationId— Identifier of the Pix Automatic authorization when the charge is linked to this flow
Rule regarding the payment method
It is not possible to create a single charge with two different billingType values at the same time, such as PIX and CREDIT_CARD.
When the integration needs to allow the payer to choose the payment method, the correct behavior is to use UNDEFINED, as long as the desired payment methods are enabled on the account.
Important rule for one-time and installment charges
For one-time single-installment charges, only the value field must be sent.
The fields below must only be used for installment charges with two or more installments:
installmentCountinstallmentValuetotalValue
This distinction is important to avoid incorrectly creating installment plans in scenarios where the intention is to generate only a simple one-time charge.
Installment calculation
For installment charges, the integration can follow one of two approaches:
- send
installmentCountandinstallmentValueto explicitly define the number of installments and the amount of each installment - send
installmentCountandtotalValueso that Asaas automatically calculates the amount of each installment
When the total amount cannot be divided evenly across installments, the adjustment will be applied to the last installment.
Cancellation of boleto registration after the due date
The daysAfterDueDateToRegistrationCancellation attribute defines for how many days after the due date the boleto will remain eligible for payment.
This behavior applies only to boleto charges. For Pix and credit card charges, this attribute is not considered.
If the value sent is 0, the boleto registration will be automatically canceled when the charge reaches the OVERDUE status, preventing payment after the due date.
If the field is not sent, the account's default registration period will be used.
This attribute cannot be changed after the charge is created. If this rule needs to be changed, a new charge must be issued.
Globally configured fines and interest
If the account has global fine and interest settings, sending the interest and fine objects with null or empty values may overwrite that configuration for the newly created charge.
If the intention is to keep the default behavior configured on the account, the recommendation is not to send these objects in the request. Another option is to standardize the application to explicitly send the same values already configured in Asaas.
CONFIRMED status in Pix charges for individuals
CONFIRMED status in Pix charges for individualsIn Pix charges for individual accounts, the CONFIRMED status may appear temporarily in cases of precautionary blocking for review by the prevention team.
In these scenarios, the review may take up to 72 hours. After that period, the charge may move to:
RECEIVED, when the payment is confirmedREFUNDED, when the payment is denied
This behavior must be considered by the integration to avoid incorrectly treating the charge as definitively settled while the review is still in progress.
