# Refund

Return funds from a purchase transaction back to a customer.

## Refund a purchase transaction

/v1/transactions/{systemTransactionId}/modifications

### Request examples

Use the following request to return funds from a purchase transaction back to the original payment method.

For **Card** and **PayPal**, you can also perform a refund by [initiating a transaction](/guides/transactions/initiate-transactions) 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`.

Card
Use the following request to refund a card purchase. Partial refunds are supported up to the original transaction amount.

```json
{
  "fundingType": "Card",
  "merchant": "MERCHANT-1",
  "site": "SITE-1",
  "merchantTransactionId": "TRANSACTION-2",
  "merchantTransactionDate": "2025-01-27T08:51:02.826Z",
  "amounts": {
    "transaction": 24.99
  },
  "operation": "Refund"
}
```

SPEI
Use the following request to issue a full refund of a SPEI deposit. Partial refunds aren't supported. `apmProvider` must be `Spei`, and `currencyCode` must be `MXN`.

```json
{
  "fundingType": "PayByBank",
  "apmProvider": "Spei",
  "merchant": "MERCHANT-1",
  "site": "SITE-1",
  "merchantTransactionId": "SPEI-RFD-001",
  "currencyCode": "MXN",
  "amounts": {
    "transaction": 100.00
  },
  "operation": "Refund"
}
```

CVU
Use the following request to issue a full refund of a CVU deposit. Partial refunds aren't supported. `apmProvider` must be `Cvu`, and `currencyCode` must be `ARS`.

```json
{
  "fundingType": "PayByBank",
  "apmProvider": "Cvu",
  "merchant": "MERCHANT-1",
  "site": "SITE-1",
  "merchantTransactionId": "CVU-RFD-001",
  "currencyCode": "ARS",
  "amounts": {
    "transaction": 1400.00
  },
  "operation": "Refund"
}
```

Bre-B
Use the following request to issue a full refund of a Bre-B deposit. Partial refunds aren't supported. Refund against the pay-in `systemTransactionId`. `apmProvider` must be `Breb`, and `currencyCode` must be `COP`.

```json
{
  "fundingType": "PayByBank",
  "apmProvider": "Breb",
  "merchant": "MERCHANT-1",
  "site": "SITE-1",
  "merchantTransactionId": "BREB-RFD-001",
  "merchantTransactionDate": "2026-08-28T12:00:00Z",
  "currencyCode": "COP",
  "amounts": {
    "transaction": 100.00
  },
  "operation": "Refund"
}
```

| Parameter  | Description |
|  --- | --- |
| `fundingType`string (enum) | The type of funding source used for the transaction.Possible values:`Card``Paypal``PayByBank` |
| `apmProvider`string (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. |
| `merchant`string (≤ 20 characters) | Your unique merchant identifier, as assigned by PXP. |
| `site`string (≤ 20 characters) | Your unique site identifier, as assigned by PXP. |
| `merchantTransactionId`string (≤ 50 characters) | The unique identifier for this transaction, as chosen by you. |
| `merchantTransactionDate`date-time | The date and time when the initial transaction happened, in ISO 8601 format. |
| `currencyCode`string (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`. |
| `amounts`object | Details about the transaction amount. |
| `amounts.transaction`string | 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.gratuity`number | The gratuity or tip amount. |
| `operation`string | The type of modification that you want to make. Set this to `Refund`.Possible values:`Capture``FinalCapture``Refund``Incremental``Void`For SPEI, CVU, and Bre-B, only `Refund` is supported. |
| `remark`string | Optional remark or note about the modification. |
| `data`object | Optional key-value pairs for additional data. |
| `dccData`object | Details about the Dynamic Currency Conversion (DCC). |
| `dccData.rateSelectedIndicator`string (enum) | Whether a DCC rate was selected for the transaction.Possible values:`NotSelected``Selected``NotAvailable``CardNotEligible``Error` |
| `dccData.amounts`object | Details about the transaction amount in the local currency and the cardholder's currency. |
| `dccData.amounts.local`string | Details about the transaction amount in the local currency. |
| `dccData.amounts.local.transaction`number | The transaction amount in the local currency. |
| `dccData.amounts.local.currencyCode`string | The currency code in ISO 4217 format. |
| `dccData.amounts.cardholder`object | Details about the transaction amount in the cardholder's currency. |
| `dccData.amounts.cardholder.transaction`number | The transaction amount in the cardholder's currency. |
| `dccData.amounts.cardholder.currencyCode`string | The currency code in ISO 4217 format. |
| `dccData.exchangeRate`number | The exchange rate used for the DCC. |
| `dccData.providerData`object | Details about the DCC provider. |
| `dccData.providerData.provider`string | The name of the DCC provider. |
| `dccData.providerData.referenceId`string | The reference ID provided by the DCC provider. This is required if your provider is Elavon, otherwise it's ignored. |
| `dccData.providerData.merchantId`string | The merchant ID assigned by the DCC provider. This is required if your provider is Elavon, otherwise it's ignored. |
| `dccData.providerData.terminalId`string | The terminal ID assigned by the DCC provider. This is required if your provider is Elavon, otherwise it's ignored. |
| `dccData.providerData.markupTextIndicator`integer | The mark-up text indicator for the DCC provider. |
| `dccData.markupRate`number or null | The mark-up rate. |
| `dccData.disclaimer`string or null | The disclaimer text. |


### Response examples

Card
If your request is successful, you'll receive a `200` response containing a new `systemTransactionId`. You'll also receive a Transaction (Authorised) webhook notification.

```json
{
  "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
     }
  }
}
```

SPEI
If your request is successful, you'll receive a `200` response with `state` set to `Pending`. The `spei-transaction-order-refunded` webhook confirms settlement. [Learn more about webhooks](/guides/get-started/about-webhooks).

```json
{
  "state": "Pending",
  "systemTransactionId": "1ed768bb-e88a-4636-91ae-67927ccbb02b",
  "merchantTransactionDate": "2024-01-27T08:51:02.826Z",
  "merchantTransactionId": "SPEI-RFD-001",
  "providerTransactionId": "8d2e4f6a-1b3c-4d5e-9f6a-7b8c9d0e1f2a",
  "fundingData": {
    "payByBank": {
      "apmProvider": "Spei",
      "paymentId": "3b4c5d6e-7f8a-4b9c-8d1e-2f3a4b5c6d7e",
      "processorPaymentId": "8d2e4f6a-1b3c-4d5e-9f6a-7b8c9d0e1f2a"
    }
  }
}
```

CVU
If your request is successful, you'll receive a `200` response with `state` set to `Pending`. The CVU refund response doesn't include `providerTransactionId`. The `cvu-transaction-order-refunded` webhook confirms settlement. Use `systemTransactionId` for any follow-up. [Learn more about webhooks](/guides/get-started/about-webhooks).

```json
{
  "state": "Pending",
  "systemTransactionId": "2fe879cc-f99b-5747-a2bf-78a38ddcc13c",
  "merchantTransactionDate": "2024-01-27T08:51:02.826Z",
  "merchantTransactionId": "CVU-RFD-001"
}
```

Bre-B
If your request is successful, you'll receive a `200` response with `state` set to `Pending`. The Bre-B refund response doesn't include `providerTransactionId` or `fundingData`. The `breb-transaction-order-refunded` webhook confirms settlement. Use `systemTransactionId` for any follow-up. [Learn more about webhooks](/guides/get-started/about-webhooks).

```json
{
  "state": "Pending",
  "systemTransactionId": "3ab45678-cdef-9012-3456-789abcdef012",
  "merchantTransactionDate": "2026-08-28T12:00:00Z",
  "merchantTransactionId": "BREB-RFD-001",
  "amounts": {
    "transaction": 100.00,
    "currencyCode": "COP"
  }
}
```