Payment events

Webhooks are the best and most secure way to keep your application's data up-to-date with Asaas data. You will always receive a new event when the status of the Webhook changes. The events that Asaas notifies are:

  • PAYMENT_CREATED - Generation of a new charge.
  • PAYMENT_AWAITING_RISK_ANALYSIS - Card payment waiting for manual risk analysis approval.
  • PAYMENT_APPROVED_BY_RISK_ANALYSIS - Card payment approved by manual risk analysis.
  • PAYMENT_REPROVED_BY_RISK_ANALYSIS - Card payment disapproved by manual risk analysis.
  • PAYMENT_AUTHORIZED - Card payment that has been authorized and needs to be captured.
  • PAYMENT_UPDATED - Change in the due date or amount of an existing charge.
  • PAYMENT_CONFIRMED - Charge confirmed (payment made, but the balance has not yet been made available).
  • PAYMENT_RECEIVED - Charge received.
  • PAYMENT_CREDIT_CARD_CAPTURE_REFUSED - Credit card payment failure.
  • PAYMENT_ANTICIPATED - Charge anticipated.
  • PAYMENT_OVERDUE - Overdue charge.
  • PAYMENT_DELETED - Charge removed.
  • PAYMENT_RESTORED - Charge restored.
  • PAYMENT_REFUNDED - Charge refunded.
  • PAYMENT_PARTIALLY_REFUNDED - Charg partially refunded.
  • PAYMENT_REFUND_IN_PROGRESS - Refund in processing (settlement is already scheduled, the charge will be refunded after executing the settlement).
  • PAYMENT_RECEIVED_IN_CASH_UNDONE - Cash receipt undone.
  • PAYMENT_CHARGEBACK_REQUESTED - Chargeback received.
  • PAYMENT_CHARGEBACK_DISPUTE - In chargeback dispute (if documents are presented for contestation).
  • PAYMENT_AWAITING_CHARGEBACK_REVERSAL - Dispute won, waiting for transfer from the acquirer.
  • PAYMENT_DUNNING_RECEIVED - Negative certification received.
  • PAYMENT_DUNNING_REQUESTED - Request for negative certification.
  • PAYMENT_BANK_SLIP_VIEWED - Charge's boleto viewed by the customer.
  • PAYMENT_CHECKOUT_VIEWED - Charge's invoice viewed by the customer.

Every time a charge Webhook is sent, a JSON object with the complete data of the charge is sent via POST as in this example:

{
   "event":"PAYMENT_RECEIVED",
   "payment":{
      ...
      // JSON object with the complete data of the charge
   }
}

Everything in Asaas is considered a charge, including direct transfers to the bank account, deposits, or Pix receipts. Therefore, you receive Webhooks of Charges for any money that enters your account.

🚧

  • With the introduction of new products and functions within Asaas, it is possible that new attributes are included in the Webhook. It is very important that your code is prepared not to generate exceptions if Asaas returns new attributes not handled by your application, as this could interrupt the synchronization queue.
  • We will send an email and notify on our Discord when new fields are included in the Webhook. The notification will be sent to the email defined in the webhook settings.
  • The split array will be returned only when the charge has Payment Split configurations.

How does the charge Webhook flow work?

See more details about the webhook flow in receiving charges at Asaas:

Charge received by Boleto/Pix, without delay:

PAYMENT_CREATED -> PAYMENT_RECEIVED

Charge received by Boleto/Pix, with delay:

PAYMENT_CREATED -> PAYMENT_OVERDUE -> PAYMENT_RECEIVED

Charge received by Credit/Debit Card, without delay:

PAYMENT_CREATED -> PAYMENT_CONFIRMED -> PAYMENT_RECEIVED (30 days after PAYMENT_CONFIRMED)

Charge received by Credit/Debit Card, with delay:

PAYMENT_CREATED -> PAYMENT_OVERDUE -> PAYMENT_CONFIRMED -> PAYMENT_RECEIVED (30 days after PAYMENT_CONFIRMED)

Charge refunded during confirmation phase (Credit/Debit Card):

PAYMENT_CREATED -> PAYMENT_CONFIRMED -> PAYMENT_REFUNDED

Charge refunded after receipt (Credit/Debit Card):

PAYMENT_CREATED -> PAYMENT_CONFIRMED -> PAYMENT_RECEIVED -> PAYMENT_REFUNDED

Charge refunded after receipt (Boleto/Pix):

PAYMENT_CREATED -> PAYMENT_RECEIVED -> PAYMENT_REFUNDED

Chargeback requested, dispute opened and won by Asaas customer:

PAYMENT_CREATED -> PAYMENT_CONFIRMED or PAYMENT_RECEIVED -> CHARGEBACK_REQUESTED -> CHARGEBACK_DISPUTE -> AWAITING_CHARGEBACK_REVERSAL -> PAYMENT_CONFIRMED or PAYMENT_RECEIVED (depends if the charge has reached the credit date).

Chargeback requested, dispute opened and won by customer:

PAYMENT_CREATED -> PAYMENT_CONFIRMED or PAYMENT_RECEIVED -> CHARGEBACK_REQUESTED -> CHARGEBACK_DISPUTE -> PAYMENT_REFUNDED

Chargeback requested and dispute not opened:

PAYMENT_CREATED -> PAYMENT_CONFIRMED or PAYMENT_RECEIVED -> CHARGEBACK_REQUESTED -> PAYMENT_REFUNDED

Cash confirmed charge:

PAYMENT_CREATED -> PAYMENT_RECEIVED (the billingType will be "RECEIVED_IN_CASH").

Charge in the process of Serasa negativation:

PAYMENT_CREATED -> PAYMENT_OVERDUE -> PAYMENT_DUNNING_REQUESTED

Charge in the process of Serasa negativation received:

PAYMENT_CREATED -> PAYMENT_OVERDUE -> PAYMENT_DUNNING_REQUESTED -> PAYMENT_DUNNING_RECEIVED


It's important to note that whenever the charge is overdue, it will go through the status PAYMENT_OVERDUE.

Occasionally, other events may be triggered, such as PAYMENT_DELETED, PAYMENT_RESTORED, PAYMENT_BANK_SLIP_VIEWED, and PAYMENT_CHECKOUT_VIEWED, but these events are not related to the process of receiving values.