Refund Payment

Do not execute a refund while another is in progress. Wait for the current operation to complete before starting a new one.

This endpoint allows you to issue a refund for an existing payment.

If you specify an amount, a partial refund will be created. If the amount is omitted, a full refund of the original payment will be processed.

Refunds can only be created for charges that have not been refunded yet. The refunded amount will be returned to the original payment method used in the transaction.

Note that this request requires an X-Idempotency-Key. Check the Authentication page for more information.

POST/payments/{id}/transactions/{transaction_id}/refund

Path Parameters

idstringrequired

The unique identifier of the payment (UUID, 36 chars).

transaction_idstringrequired

The unique identifier of the transaction (UUID, 36 chars).

Body application/json

descriptionstring

Description of the refund. (MAX 255; MIN 3).

reason"DUPLICATE" | "FRAUDULENT" | "REQUESTED_BY_CUSTOMER" | "REVERSE"

Indicating the reason for the 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_referencestringrequired

Identification of the payment transaction defined by the merchant (MAX 255; MIN 3).

amountobject

Specifies the amount object for refund. Only required for partial refunds.

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 refund 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.

descriptionstring

Description for the split. (MAX 255; MIN 3).

type"PURCHASE" | "PAYMENTFEE" | "VAT" | "COMMISSION" | "MARKETPLACE" | "SHIPPING"required

The type of split. recipient_id is mandatory for PURCHASE and MARKETPLACE.

merchant_referencestring

Optional unique identifier for the split transaction (MAX 255; MIN 3).

recipient_type"MEAL" | "FOOD" | "MULTI_BENEFITS" | "FLEET"

The type of recipient for the provider.

amountobject

Defines the amount of the split.

Show amount properties
valuenumber<float>required

The split amount (multiple of 0.0001).

currencystringrequired

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

Determines whether WHITELABEL should automatically attempt to refund a payment after an initial error or decline. When set to true, WHITELABEL will retry the process if the first attempt fails. By default, this is set to false. Access Transaction Retries for more details.

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.

Show document properties
document_numberstringrequired

Document number for customer (MAX 40; MIN 3)

document_type"DNI" | "CI" | "LC" | "LE" | "CUIT" | "CUIL" | "PAS" | "CPF" | "RG" | "CNH" | "CNPJ" | "RUT" | "RUN" | "CC" | "CE" | "NIT" | "DUI" | "PIC" | "DPI" | "IFR" | "INE" | "CP" | "RFC" | "CURP" | "CIP" | "CIC" | "CUI" | "RUC"required

The customer’s document type (MAX 6, MIN 2). Access Document Type List for more details.

phoneobject

Specifies the customer’s phone object.

Show phone properties
country_codestring

The country code of the customer’s phone (MAX 3; MIN 1).

numberstring

The customer’s phone number, without the country code (MAX 32; MIN 1).

billing_addressobject

Specifies the customer’s billing address object.

Show billing_address properties
address_line_1string

The primary billing address line of the customer (MAX 255; MIN 3).

address_line_2string

The secondary billing address line of the customer (MAX 255; MIN 3).

citystring

The city considered for the billing address (MAX 255; MIN 3).

country"AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY"

The country considered for the billing address (MAX 2; MIN 2; ISO 3166-1).

statestring

The state considered for the billing address (MAX 255; MIN 3).

zip_codestring

The zipcode considered for the billing address (MAX 10; MIN 5).

shipping_addressobject

Specifies the customer’s shipping address object.

Show shipping_address properties
address_line_1string

The primary shipping address line of the customer (MAX 255; MIN 3).

address_line_2string

The secondary shipping address line of the customer (MAX 255; MIN 3).

citystring

The city considered for the shipping address (MAX 255; MIN 3).

country"AR" | "BO" | "BR" | "CL" | "CO" | "CR" | "EC" | "SV" | "GT" | "HN" | "MX" | "NI" | "PA" | "PY" | "PE" | "US" | "UY"

The country considered for the shipping address (MAX 2; MIN 2; ISO 3166-1).

statestring

The state considered for the shipping address (MAX 255; MIN 3).

zip_codestring

The zipcode considered for the shipping address (MAX 10; MIN 5).

payment_methodobject

Specifies payment method object for payments.

Show payment_method properties
detailobject

Specifies the payment method detail object.

Show detail properties
bank_transferobject

Specifies bank transfer payment method details.

Show bank_transfer properties
account_type"CHECKINGS" | "SAVINGS"

Type of bank account (MAX 255; MIN 3)

bank_namestring

Name of the bank (MAX 255; MIN 3)

bank_idstring

ID of the bank (MAX 255; MIN 3)

beneficiary_namestring

Name of the account holder (MAX 255; MIN 3)

bank_accountstring

Bank account number (MAX 255; MIN 3)

beneficiary_document_typestring

Document type of the account holder (MAX 255; MIN 3)

beneficiary_documentstring

Document number of the account holder (MAX 255; MIN 3)

referencestring

Reference code for the user (MAX 255; MIN 1)

bank_account_mask_numberstring

Masked bank account number associated with the bank transfer (for example, ****6789). This is account data, not mandate data.

mandateobject

Direct debit mandate details, for bank transfer methods that operate with mandates (for example, ACH, SEPA, BACS, PAD).

Show mandate properties
idstring

Mandate identifier, as provided by the payment provider.

infostring

Free-text mandate information.

received_statusstring

Provider status indicating whether the mandate was received. Forwarded as provided by the payment provider.

existing_statusstring

Provider status of the existing mandate. Forwarded as provided by the payment provider.

created_atstring<date-time>

Date and time when the mandate was created (ISO 8601).

updated_atstring<date-time>

Date and time when the mandate was last updated (ISO 8601).

Response

200

idstring
account_idstring
descriptionstring
countrystring
statusstring
sub_statusstring
merchant_order_idstring
created_atstring
updated_atstring
amountobject
Show amount properties
capturedinteger
currencystring
currency_conversionany
refundedinteger
valueinteger
checkoutobject
Show checkout properties
sessionstring
sdk_action_requiredboolean
payment_methodobject
Show payment_method properties
vaulted_tokenstring
typestring
vault_on_successboolean
tokenstring
parent_payment_method_typeany
payment_method_detailobject
Show payment_method_detail properties
cardobject
Show card properties
verifyboolean
captureboolean
installmentsinteger
installments_plan_idany
first_installment_deferralinteger
installments_typestring
installment_amountany
soft_descriptorstring
authorization_codestring
retrieval_reference_numberstring
acquirer_reference_numberstring
voucherany
card_dataobject
Show card_data properties
holder_namestring
iinstring
lfdstring
number_lengthinteger
security_code_lengthinteger
brandstring
issuer_namestring
issuer_codeany
country_codestring
categorystring
typestring
three_d_secureobject
Show three_d_secure properties
versionany
electronic_commerce_indicatorany
cryptogramany
transaction_idany
directory_server_transaction_idany
pares_statusany
acs_idany
fingerprintstring
expiration_monthinteger
expiration_yearinteger
stored_credentialsobject
Show stored_credentials properties
reasonany
usageany
subscription_agreement_idany
network_transaction_idany
customer_payerobject
Show customer_payer properties
idany
merchant_customer_idstring
first_namestring
last_namestring
genderstring
date_of_birthstring
emailstring
nationalitystring
ip_addressstring
device_fingerprintany
device_fingerprintsany[]
browser_infoany
documentobject
Show document properties
document_typestring
document_numberstring
phoneobject
Show phone properties
numberstring
country_codestring
billing_addressobject
Show billing_address properties
address_line_1string
address_line_2string
countrystring
statestring
citystring
zip_codestring
neighborhoodany
shipping_addressobject
Show shipping_address properties
address_line_1string
address_line_2string
countrystring
statestring
citystring
zip_codestring
neighborhoodany
merchant_customer_created_atany
additional_dataany
transactionsobject
Show transactions properties
idstring
typestring
statusstring
categorystring
amountinteger
provider_idstring
payment_methodobject
Show payment_method properties
vaulted_tokenstring
typestring
vault_on_successboolean
tokenstring
parent_payment_method_typeany
detailobject
Show detail properties
cardobject
Show card properties
verifyboolean
captureboolean
installmentsinteger
installments_plan_idany
first_installment_deferralinteger
installments_typestring
installment_amountany
soft_descriptorstring
authorization_codestring
retrieval_reference_numberstring
acquirer_reference_numberstring
voucherany
card_dataobject
Show card_data properties
holder_namestring
iinstring
lfdstring
number_lengthinteger
security_code_lengthinteger
brandstring
issuer_namestring
issuer_codeany
country_codestring
categorystring
typestring
three_d_secureobject
Show three_d_secure properties
versionany
electronic_commerce_indicatorany
cryptogramany
transaction_idany
directory_server_transaction_idany
pares_statusany
acs_idany
fingerprintstring
expiration_monthinteger
expiration_yearinteger
stored_credentialsobject
Show stored_credentials properties
reasonany
usageany
subscription_agreement_idany
network_transaction_idany
response_codestring
response_messagestring
reasonstring
descriptionstring
merchant_referencestring
provider_dataobject
Show provider_data properties
idstring
transaction_idstring
account_idstring
statusstring
sub_statusstring
status_detailstring
response_messageany
response_codestring
raw_requestobject

Obfuscated copy of the request WHITELABEL sent to the provider. Only returned for allowlisted organizations.

raw_responseobject
Show raw_response properties
messagestring
third_party_transaction_idany
third_party_account_idany
iso8583_response_codeany
iso8583_response_messageany
connection_dataobject
Show connection_data properties
idstring
namestring
created_atstring
updated_atstring
transactions_historyany
metadataany[]
fraud_screeningany
payment_link_idstring
subscription_codeany
routing_rulesany
simplified_modeboolean

400

codestring
messagesstring[]

401

codestring
messagesstring[]

403

codestring
messagesstring[]
Request
curl -X POST "https://api-sandbox.whitelabel.com/v1/payments/<id>/transactions/<transaction_id>/refund" \
  -H "Content-Type: application/json" \
  -H "public-api-key: <public-api-key>" \
  -H "private-secret-key: <private-secret-key>" \
  -H "X-Idempotency-Key: <X-Idempotency-Key>" \
  -d '{
  "description": "string",
  "reason": "DUPLICATE",
  "merchant_reference": "string",
  "amount": {
    "currency": "string",
    "value": 0
  },
  "split_marketplace": [
    {
      "recipient_id": "string",
      "provider_recipient_id": "string",
      "description": "string",
      "type": "PURCHASE",
      "merchant_reference": "string",
      "recipient_type": "MEAL",
      "amount": {
        "value": 0,
        "currency": "string"
      },
      "liability": {
        "processing_fee": "MERCHANT",
        "chargebacks": true
      }
    }
  ],
  "simplified_mode": true,
  "response_additional_data": {
    "receipt": true,
    "receipt_language": "ES"
  },
  "customer_payer": {
    "first_name": "string",
    "last_name": "string",
    "gender": "M",
    "date_of_birth": "string",
    "email": "string",
    "nationality": "string",
    "document": {
      "document_number": "string",
      "document_type": "DNI"
    },
    "phone": {
      "country_code": "string",
      "number": "string"
    },
    "billing_address": {
      "address_line_1": "string",
      "address_line_2": "string",
      "city": "string",
      "country": "AR",
      "state": "string",
      "zip_code": "string"
    },
    "shipping_address": {
      "address_line_1": "string",
      "address_line_2": "string",
      "city": "string",
      "country": "AR",
      "state": "string",
      "zip_code": "string"
    }
  },
  "payment_method": {
    "detail": {
      "bank_transfer": {
        "account_type": "CHECKINGS",
        "bank_name": "string",
        "bank_id": "string",
        "beneficiary_name": "string",
        "bank_account": "string",
        "beneficiary_document_type": "string",
        "beneficiary_document": "string",
        "reference": "string",
        "bank_account_mask_number": "string",
        "mandate": {
          "id": "string",
          "info": "string",
          "received_status": "string",
          "existing_status": "string",
          "created_at": "1970-01-01T00:00:00.000Z",
          "updated_at": "1970-01-01T00:00:00.000Z"
        }
      }
    }
  }
}'
Response
{
  "id": "f2d6884a-f737-4565-ae32-ff60b19089e3",
  "account_id": "",
  "description": "Duplicate",
  "country": "US",
  "status": "REFUNDED",
  "sub_status": "REFUNDED",
  "merchant_order_id": "AAB01-432245",
  "created_at": "2025-04-14T17:51:45.179645Z",
  "updated_at": "2025-04-14T17:52:07.908698Z",
  "amount": {
    "captured": 0,
    "currency": "USD",
    "currency_conversion": null,
    "refunded": 30000,
    "value": 30000
  },
  "checkout": {
    "session": "",
    "sdk_action_required": false
  },
  "payment_method": {
    "vaulted_token": "",
    "type": "CARD",
    "vault_on_success": false,
    "token": "",
    "parent_payment_method_type": null,
    "payment_method_detail": {
      "card": {
        "verify": false,
        "capture": false,
        "installments": 1,
        "installments_plan_id": null,
        "first_installment_deferral": 0,
        "installments_type": "",
        "installment_amount": null,
        "soft_descriptor": "",
        "authorization_code": "216303",
        "retrieval_reference_number": "",
        "acquirer_reference_number": "",
        "voucher": null,
        "card_data": {
          "holder_name": "John Doe",
          "iin": "41111111",
          "lfd": "1111",
          "number_length": 16,
          "security_code_length": 3,
          "brand": "VISA",
          "issuer_name": "CHASE BANK USA",
          "issuer_code": null,
          "country_code": "US",
          "category": "CLASSIC",
          "type": "DEBIT",
          "three_d_secure": {
            "version": null,
            "electronic_commerce_indicator": null,
            "cryptogram": null,
            "transaction_id": null,
            "directory_server_transaction_id": null,
            "pares_status": null,
            "acs_id": null
          },
          "fingerprint": "d244e20d-43a1-43f7-9b48-0a76423be35e",
          "expiration_month": 3,
          "expiration_year": 26
        },
        "stored_credentials": {
          "reason": null,
          "usage": null,
          "subscription_agreement_id": null,
          "network_transaction_id": null
        }
      }
    }
  },
  "customer_payer": {
    "id": null,
    "merchant_customer_id": "1744653105",
    "first_name": "John",
    "last_name": "Doe",
    "gender": "M",
    "date_of_birth": "1990-02-28",
    "email": "john.doe@example.com",
    "nationality": "US",
    "ip_address": "192.168.1.1",
    "device_fingerprint": null,
    "device_fingerprints": [
      null
    ],
    "browser_info": null,
    "document": {
      "document_type": "SSN",
      "document_number": "123-45-6789"
    },
    "phone": {
      "number": "5551234567",
      "country_code": "1"
    },
    "billing_address": {
      "address_line_1": "1234 Elm Street",
      "address_line_2": "Apt 5B",
      "country": "US",
      "state": "California",
      "city": "Los Angeles",
      "zip_code": "90001",
      "neighborhood": null
    },
    "shipping_address": {
      "address_line_1": "1234 Elm Street",
      "address_line_2": "Apt 5B",
      "country": "US",
      "state": "California",
      "city": "Los Angeles",
      "zip_code": "90001",
      "neighborhood": null
    },
    "merchant_customer_created_at": null
  },
  "additional_data": null,
  "transactions": {
    "id": "5414f862-51e6-433f-a54c-b46b176e87a0",
    "type": "REFUND",
    "status": "SUCCEEDED",
    "category": "CARD",
    "amount": 30000,
    "provider_id": "YUNO_TEST_PAYMENT_GW",
    "payment_method": {
      "vaulted_token": "",
      "type": "CARD",
      "vault_on_success": false,
      "token": "",
      "parent_payment_method_type": null,
      "detail": {
        "card": {
          "verify": false,
          "capture": false,
          "installments": 1,
          "installments_plan_id": null,
          "first_installment_deferral": 0,
          "installments_type": "",
          "installment_amount": null,
          "soft_descriptor": "",
          "authorization_code": "216303",
          "retrieval_reference_number": "",
          "acquirer_reference_number": "",
          "voucher": null,
          "card_data": {
            "holder_name": "John Doe",
            "iin": "41111111",
            "lfd": "1111",
            "number_length": 16,
            "security_code_length": 3,
            "brand": "VISA",
            "issuer_name": "CHASE BANK USA",
            "issuer_code": null,
            "country_code": "US",
            "category": "CLASSIC",
            "type": "DEBIT",
            "three_d_secure": {
              "version": null,
              "electronic_commerce_indicator": null,
              "cryptogram": null,
              "transaction_id": null,
              "directory_server_transaction_id": null,
              "pares_status": null,
              "acs_id": null
            },
            "fingerprint": "d244e20d-43a1-43f7-9b48-0a76423be35e",
            "expiration_month": 3,
            "expiration_year": 26
          },
          "stored_credentials": {
            "reason": null,
            "usage": null,
            "subscription_agreement_id": null,
            "network_transaction_id": null
          }
        }
      }
    },
    "response_code": "SUCCEEDED",
    "response_message": "Transaction successful",
    "reason": "REQUESTED_BY_CUSTOMER",
    "description": "Test refund",
    "merchant_reference": "REFUND_001",
    "provider_data": {
      "id": "YUNO_TEST_PAYMENT_GW",
      "transaction_id": "2e5c04d5-4cf7-4d2a-b57a-dd5eb9a687bc",
      "account_id": "",
      "status": "",
      "sub_status": "",
      "status_detail": "",
      "response_message": null,
      "response_code": "SUCCEEDED",
      "raw_request": {},
      "raw_response": {
        "message": "provider response"
      },
      "third_party_transaction_id": null,
      "third_party_account_id": null,
      "iso8583_response_code": null,
      "iso8583_response_message": null
    },
    "connection_data": {
      "id": "58cc35f4-faef-4107-8e09-d18d60121d38",
      "name": "Connection name"
    },
    "created_at": "2025-04-14T17:52:07.768528Z",
    "updated_at": "2025-04-14T17:52:07.862912Z"
  },
  "transactions_history": null,
  "metadata": [
    null
  ],
  "fraud_screening": null,
  "payment_link_id": "",
  "subscription_code": null,
  "routing_rules": null,
  "simplified_mode": false
}