Refunds

How to interpret the refunds attribute returned in charges with refunds.

Use the refunds attribute to identify and reconcile refunds linked to a charge.

When a charge has one or more refunds, the charge object returns the refunds array. Each item represents a refund attempt or completion and should be used by your integration to update the financial status of the order, display receipts to the customer, and reconcile returned amounts.

Response example

The example below shows the refunds field inside a valid JSON object:

{
  "refunds": [
    {
      "dateCreated": "2022-02-21 10:28:40",
      "status": "DONE",
      "value": 2.00,
      "description": "Overpayment",
      "endToEndIdentifier": null,
      "transactionReceiptUrl": "https://www.asaas.com/comprovantes/6677732109104548",
      "refundedSplits": [
        {
          "id": "cff860dd-148e-48ca-ac8e-849684175158",
          "value": 10,
          "done": true
        }
      ]
    }
  ]
}

Refund fields

FieldTypeDescription
dateCreatedstringDate and time the refund was created.
statusstringCurrent status of the refund. Possible values are PENDING, CANCELLED, and DONE.
valuenumberAmount refunded on the charge.
descriptionstringDescription provided to identify the reason for the refund.
endToEndIdentifierstring or nullTransaction tracking identifier, when available. Treat null as a temporary absence or unavailability of the identifier.
transactionReceiptUrlstring or nullURL of the refund receipt, when available. Display or store this link only after confirming it was returned.
refundedSplitsarrayList of splits related to the refund, when the charge has split values.

Refund status

The available status values returned in the refunds field are:

  • PENDING: the refund has been requested but not yet completed. Keep the order as awaiting refund confirmation in your integration.
  • CANCELLED: the refund was cancelled and should not be treated as a returned amount.
  • DONE: the refund has been completed. Use this status to confirm the amount has been returned to the customer and update your reconciliation.

Behaviors and considerations

  • A charge may return more than one item in refunds. Iterate through the entire array before calculating the total refunded amount.
  • Do not use the mere existence of the refunds array to consider the refund complete. Confirm that the item has a status of DONE.
  • Fields such as endToEndIdentifier and transactionReceiptUrl may return null or be unavailable until the process is complete. Prepare your integration to treat these fields as optional.
  • When refundedSplits is returned, use the value and done fields of each split to track the return of divided amounts.
  • For reconciliation, record the value, status, dateCreated, and transactionReceiptUrl when available.


Did this page help you?