Payments
Refund a payment
Initiates a new refund against a previously captured payment
post/payments/{paymentId}/refund
Path parameters
paymentIdstring required
The unique identifier for the payment.
This can be sourced from the paymentId field in the response we sent to you when creating the payment or payout.
Request body
Example request
{
"amount": 1234,
"merchantTransactionId": "yourUniqueRequestId",
"customerRefundCode": "ABC123"
}Response
Refund request completed successfully.
Example response
{
"code": "1000",
"id": "463ac35c9f6413ad48485a3953bb6124",
"psp": {
"name": "Checkout.com",
"transactionId": "6418da68-0b3d-4409-ab14-1ceb752b0b1f",
"switchAccountId": "switch-account-123",
"provisionedUserId": "Vx0H4pdAtPCz",
"additionalInfo": {
"customerFirstName": "John",
"customerLastName": "Smith",
"customerDateOfBirth": "2000-01-01",
"customerIpAddress": "123.100.100.200",
"customerId": "de5d7b4a-9410-40e1-85fd-8ceee23c9fd0",
"paysafecardCustomerId": "151743187547"
},
"rawPspResponses": [
{
"httpStatusCode": 200,
"pspName": "Checkout.com",
"headers": {
"content-type": [
"application/json"
]
}
}
]
},
"installmentsPlan": {
"code": "1000",
"message": "Approved",
"provider": "Visa Installments",
"operation": "cancellation",
"planActivationId": "6ccc5c91-f869-4063-9368-40b4cb30c6ce"
},
"merchantTransactionId": "yourUniqueRequestId",
"customerRefundCode": "ABC123"
}