Refund
Return funds from a purchase transaction back to a customer.
Refund a purchase transaction
Request example
Use the following request to return funds from a purchase transaction back to the original payment method.
You can also perform a refund by initiating a transaction and setting the intent to
Refund
.
{
"merchant": "MERCHANT-1",
"site": "SITE-1",
"merchantTransactionId": "TRANSACTION-2",
"merchantTransactionDate": "2025-01-27T08:51:02.826Z",
"amounts": {
"transaction": 24.99
},
"operation": "Refund"
}
Parameter | Description |
---|---|
merchant string (≤ 20 characters) required | Your unique merchant identifier, as assigned by PXP. |
site string (≤ 20 characters) required | Your unique site identifier, as assigned by PXP. |
merchantTransactionId string (≤ 50 characters) required | The unique identifier for this transaction, as chosen by you. |
merchantTransactionDate date-time required | The date and time when the initial transaction happened, in ISO 8601 format. |
amounts object required | Details about the transaction amount. |
amounts.transaction string required | The value of the transaction. For Refund operations, this can't be more than the original transaction value. |
operation string required | The type of modification that you want to make. Set this to Refund .Possible values:
|
Response example
If your request is successful, you'll receive a 200
request 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",
"primaryAccountNumber": "526600******0075",
"expiryMonth": "12",
"expiryYear": "2031",
"gatewayTokenId": "5fbd77ce-02c1-40ed-94bc-1016660b7512",
"providerResponse": {
"provider": "pxpfinancial",
"code": "00",
"emvDataResponse": {},
"paymentAccountReference": "637607302178175469",
"merchantAdvice": {},
"authorisedAmount": 0
},
"processorTransactionId": "b4fcc6d6-5891-4ad0-a92a-81e5ebdf27c2"
}
}
Updated about 1 month ago