On This Page
Refund a Payment
Refunding a payment returns the entire captured amount or part of the captured amount to
the customer's account. Klarna supports multiple refund requests when the total amount
of all refunds is less than the captured amount.'
Cybersource
recommends using the optional fields for a refund to ensure
the request is successful. For more information, see Optional Fields for a Refund.Endpoints
Production:
POST
https://api.cybersource.com
/pts/v2/payments/{id}
/refundsTest:
POST
https://apitest.cybersource.com
/pts/v2/payments/{id}
/refundsThe is the request ID
contained in the original transaction request.
{id}
Response Statuses
The refund service responds with one of these statuses as the
status
field
value:- FAILED: The refund request is not successful. Send a new refund request. A failed request can be due to either Klarna rejecting the transaction or a technical error.
- PENDING: The refund request is accepted but is not refunded. Request the check status service to retrieve status updates. For more information, see Check a Request Status.
- REFUNDED: The captured payment is successfully refunded.
The refund service also responds with a reason code as the field value. For more information about reason
codes, see the .
Required Fields for a Refund
Include these required fields to refund a payment.
Optional Fields for a Refund
- merchantDefinedInformation[].value
- orderInformation.billTo.city
- Set tocoupon.
- orderInformation.shipTo.city
Example: Issuing a Refund
Request
{ "paymentInformation": { "paymentType": { "name": "INVOICE", "method": { "name": "KLARNA" } } }, "processingInformation": { "actionList": "AP_REFUND" }, "orderInformation": { "amountDetails": { "totalAmount": "1.00", "currency": "USD" } } }
Response to a Successful Request
{ "_links": { "self": { "method": "GET", "href": "/pts/v2/refunds/7297199754036380503955" }, "status": { "method": "POST", "href": "/pts/v2/refresh-payment-status/7297199754036380503955" } }, "clientReferenceInformation": { "code": "refnum-1234", "returnReconciliationId": "XZCJ2230ILKT" }, "id": "7297199754036380503955", "orderInformation": { "amountDetails": { "currency": "USD" } }, "processorInformation": { "responseDetails": "00006", "transactionId": "7ee251a9-6b9b-4f32-b486-30223db781cf", "responseCode": "00006" }, "reconciliationId": "XFZ552EH3ISS", "refundAmountDetails": { "refundAmount": "1.00" }, "status": "REFUNDED", "submitTimeUtc": "2024-10-21T17:06:50Z" }