Skip to main content
POST

Some important rules

  • Only charges credited to the wallet can be refunded.
  • The wallet(s) being debited must have at least the refund amount available. See Which wallet is debited.
  • Pix: can only be returned with 90 days or less.
  • Credit card: 180 days or less.

Sandbox Testing

To test refund scenarios in the sandbox environment, the field amount must be one of the following values: 100, 1000, or 10000.Additionally, you must include the field reason with the value “APRO”.

Which wallet is debited

For Pix charges, the wallet debited by the refund is defined by the pix.refund_mode sent when the charge was created (see Create Charge (Pix)):
Regardless of the refund_mode, a refund request that informs splits debits the wallets listed in it. Use it to debit a split wallet when the charge was created without refund_mode.
The balance of every wallet being debited is checked before the refund is created. If any of them does not cover its part, the request is rejected with HTTP 400 and no refund is created.

Path Parameters

integer
required
The cash-in ID (payin ID) for which the refund will be created.Example: 63730

Request Body

integer
required
The refund amount in the smallest currency unit (e.g., 1000 to refund R$10.00).Example: 1000
string
required
Reason for the refund.Example: "Teste"
string
URL to receive webhook notifications about refund status changes.
array
Wallets to be debited by this refund. Mandatory when the charge was created with refund_mode = REFUND_BY_SPLIT. See Which wallet is debited.The sum of the splits cannot be greater than the refund amount. Any remaining amount is debited from the wallet of the merchant that created the charge.
In the By percent example, R$5.00 (50% of the refund) is debited from the split wallet and the remaining R$5.00 from the merchant wallet.

Response

integer
Refund ID.
integer
The ID of the payin (cash-in) being refunded.
integer
Current status ID of the refund.Status codes:
  • 2: Requested
  • 4: Paid (refund completed)
  • 5: Error
object
User who created the refund.
integer
Client ID.
integer
Refund amount.
array
History of status changes.
string
End-to-end ID (for Pix transactions). Can be null.
string
Reason for the refund.
string
Error code from wallet (if any). Can be null.
string
URL for webhook notifications. Can be null.
string
Refund created date.
string
Refund update date.

Important Information About the Webhook metadata

Refund Status

If an error occurs during the refund process (status 5), the field total_refund_amount will be decremented by the requested amount. When the refund is successfully paid, the amount will be incremented again.

Webhook Payload Examples:

Requested:
Error:
Paid:

Refund Status Flow

Success scenario:
Error scenario: