Skip to main content
POST
Create Refund

Some important rules

  • Only charges credited to the wallet can be refunded.
  • The customer must have at least the refund amount available in the wallet.
  • 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”.

Path Parameters

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

Request Body

amount
integer
required
The refund amount.Example: 10
reason
string
required
Reason for the refund.Example: "Teste"
notification_url
string
URL to receive webhook notifications about refund status changes.

Response

id
integer
Refund ID.
payin_id
integer
The ID of the payin (cash-in) being refunded.
status_id
integer
Current status ID of the refund.Status codes:
  • 2: Requested
  • 4: Paid (refund completed)
  • 5: Error
user
object
User who created the refund.
client_id
integer
Client ID.
refund_amount
integer
Refund amount.
status_history
array
History of status changes.
end_to_end_id
string
End-to-end ID (for Pix transactions). Can be null.
reason
string
Reason for the refund.
wallet_error_code
string
Error code from wallet (if any). Can be null.
notification_url
string
URL for webhook notifications. Can be null.
created_at
string
Refund created date.
updated_at
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: