Do not execute a refund while another is in progress. Wait for the current operation to complete before starting a new one.
This service allows you to cancel or refund an existing payment. Our system will identify if a cancellation or a refund is necessary based on the payment, no transaction_id is needed in this case. This service performs the following functions based on the status of the transaction:
Cancels the payment if it has not been captured.
Refunds the payment if it has been captured.
Refunds
If you fill out the amount field, the refund will be partial. Otherwise, it will create a complete refund. The funds will be refunded to the payment method that was originally charged.
Note that this request requires an X-Idempotency-Key. Check the Authentication page for more information.
POST/payments/{payment_id}/cancel-or-refund
Path Parameters
payment_idstringrequired
The unique identifier of the payment (UUID, 36 chars).
Body application/json
descriptionstring
Description of the cancellation or refund. (MAX 255; MIN 3).
Indicating the reason for the cancellation or refund. If set, possible values are DUPLICATE, FRAUDULENT, REQUESTED_BY_CUSTOMER, and REVERSE. Use REVERSE to request an automatic reverse of the recipient funds when a recipient is involved in the transaction.
merchant_referencestring
Identification of the payment transaction defined by the merchant. If no merchant_reference is defined, the merchant_order_id of the payment will be associated to the transaction. (MAX 255; MIN 3).
amountobject
Specifies the amount object for refund.
Show amount properties
currencystring
The currency used to make the payment. For a full list of currency codes, see Country reference (MAX 3; MIN 3; ISO 4217).
valuenumber<float>
The payment amount (multiple of 0.0001).
split_marketplaceobject[]
Split marketplace array of objects
Show split_marketplace properties
recipient_idstring
The unique identifier of the recipient in the WHITELABEL system. You must provide the recipient_id (WHITELABEL-generated) or the provider_recipient_id (external provider’s ID) when creating a payment.
provider_recipient_idstring
The recipient ID provided by the external payment provider, if applicable. You must provide the provider_recipient_id or the recipient_id (WHITELABEL-generated) when creating a payment.
The currency used to make the payment. For a full list of currency codes, see Country reference (MAX 3; MIN 3; ISO 4217).
liabilityobject
Optional information regarding the recipient’s liability for fees and chargebacks.
Show liability properties
processing_fee"MERCHANT" | "RECIPIENT" | "SHARED"
Indicates who will be charged the transaction fee.
chargebacksboolean
The recipient is responsible in case of a chargeback.
simplified_modeboolean
Indicates if we should try to refund a payment after an error/declined on the first try. It is false by default. For more information, access the guide.
response_additional_dataobject
Specifies additional data for required the transaction response
Show response_additional_data properties
receiptboolean
Indicates if a receipt is necessary for the transaction response
receipt_language"ES" | "EN" | "PT"
Indicates the language of the receipt to be generated
customer_payerobject
Specifies customer object for payments.
Show customer_payer properties
first_namestring
The customer’s first name (MAX 255; MIN 3).
last_namestring
The customer’s last name (MAX 255; MIN 3).
gender"M" | "F" | "NB" | "NA" | "NK" | "U"
The customer’s gender (MAX 2; MIN 1). - M=Male - F=Female - NB=Non Binary - NA=Not applicable - NK=Not Known - U=Undefined.
date_of_birthstring
The customer’s date of birth in the YYYY-MM-DD format (Length: 10).
emailstring
The customer’s e-mail (MAX 255; MIN 3).
nationalitystring
The customer’s nationality (MAX 2; MIN 2; ISO 3166-1).
documentobject
Specifies the customer’s document object, including its number and type.