Return funds from a purchase transaction back to a customer.
Use the following request to return funds from a purchase transaction back to the original payment method.
For Card, you can also perform a refund by initiating a transaction and setting the intent to Refund.
For SPEI, CVU, and Bre-B, use this modifications endpoint only. Don't create a new transaction with intent Refund.
Use the following request to refund a card purchase. Partial refunds are supported up to the original transaction amount.
{
"fundingType": "Card",
"merchant": "MERCHANT-1",
"site": "SITE-1",
"merchantTransactionId": "TRANSACTION-2",
"merchantTransactionDate": "2025-01-27T08:51:02.826Z",
"amounts": {
"transaction": 24.99
},
"operation": "Refund"
}| Parameter | Description |
|---|---|
fundingTypestring (enum) required | The type of funding source used for the transaction. Possible values:
|
apmProviderstring (enum) | The APM provider. Required when fundingType is PayByBank. For SPEI set this to Spei. For CVU set this to Cvu. For Bre-B set this to Breb. If you omit apmProvider on a Pay by bank modification, the Gateway may route the request to a different provider. |
merchantstring (≤ 20 characters) required | Your unique merchant identifier, as assigned by PXP. |
sitestring (≤ 20 characters) required | Your unique site identifier, as assigned by PXP. |
merchantTransactionIdstring (≤ 50 characters) required | The unique identifier for this transaction, as chosen by you. |
merchantTransactionDatedate-time required | The current date and time, in ISO 8601 format. |
currencyCodestring (3 characters) | The currency code for the modification amount, in ISO 4217 format. Required for SPEI, CVU, and Bre-B refunds. For SPEI this must be MXN. For CVU this must be ARS. For Bre-B this must be COP. |
amountsobject required | Details about the transaction amount. |
amounts.transactionstring required | The value of the transaction. For Refund operations, this can't be more than the original transaction value.For SPEI, CVU, and Bre-B refunds, this must be the same as the original transaction amount (only full refunds are supported). |
amounts.gratuitynumber | The gratuity or tip amount. |
operationstring required | The type of modification that you want to make. Set this to Refund.Possible values:
For SPEI, CVU, and Bre-B, only Refund is supported. |
remarkstring | Optional remark or note about the modification. |
dataobject | Optional key-value pairs for additional data. |
dccDataobject | Details about the Dynamic Currency Conversion (DCC). |
dccData.rateSelectedIndicatorstring (enum) required | Whether a DCC rate was selected for the transaction. Possible values:
NotAvailable |
dccData.amountsobject required | Details about the transaction amount in the local currency and the cardholder's currency. |
dccData.amounts.localstring required | Details about the transaction amount in the local currency. |
dccData.amounts.local.transactionnumber required | The transaction amount in the local currency. |
dccData.amounts.local.currencyCodestring required | The currency code in ISO 4217 format. |
dccData.amounts.cardholderobject required | Details about the transaction amount in the cardholder's currency. |
dccData.amounts.cardholder.transactionnumber required | The transaction amount in the cardholder's currency. |
dccData.amounts.cardholder.currencyCodestring required | The currency code in ISO 4217 format. |
dccData.exchangeRatenumber required | The exchange rate used for the DCC. |
dccData.providerDataobject required | Details about the DCC provider. |
dccData.providerData.providerstring required | The name of the DCC provider. |
dccData.providerData.referenceIdstring required | The reference ID provided by the DCC provider. This is required if your provider is Elavon, otherwise it's ignored. |
dccData.providerData.merchantIdstring required | The merchant ID assigned by the DCC provider. This is required if your provider is Elavon, otherwise it's ignored. |
dccData.providerData.terminalIdstring required | The terminal ID assigned by the DCC provider. This is required if your provider is Elavon, otherwise it's ignored. |
dccData.providerData.markupTextIndicatorinteger required | The mark-up text indicator for the DCC provider. |
dccData.markupRatenumber or null | The mark-up rate. |
dccData.disclaimerstring or null | The disclaimer text. |
If your request is successful, you'll receive a 200 response containing a new systemTransactionId. You'll also receive a Transaction (Authorised) webhook notification.
{
"state": "Authorised",
"stateData": {},
"merchantTransactionDate": "2025-03-27T10:53:38.499Z",
"merchantTransactionId": "ac47966d-b732-4706-8f29-c4335fd84f02",
"systemTransactionId": "bfdf16cc-d824-4812-8ee6-a206a2c08043",
"fundingData": {
"cardScheme": "MasterCard",
"maskedPrimaryAccountNumber": "526600******0075",
"expiryMonth": "12",
"expiryYear": "2031",
"gatewayTokenId": "5fbd77ce-02c1-40ed-94bc-1016660b7512",
"providerResponse": {
"provider": "pxpfinancial",
"code": "00",
"emvDataResponse": {},
"paymentAccountReference": "637607302178175469",
"merchantAdvice": {},
"authorisedAmount": 0
}
}
}