FILTER BY TAG

Refund a Payment

When a customer returns a purchase, you can request a refund to return the entire or partial payment amount to the customer's account. Include the request ID from a completed capture or sale. A
PENDING
response status indicates that the refund was successful. Send a follow-on check status request periodically to receive the current status of the refund. The payment is refunded when the check status request responds with the
REFUNDED
status. For more information about sending a check status request, see Check Status for a Transaction.

Endpoints

Production:
POST
https://api.cybersource.com
/pts/v2/payments/
{id}
/refunds
Test:
POST
https://apitest.cybersource.com
/pts/v2/payments/
{id}
/refunds
The
{id}
is the request ID contained in the original transaction request.

Required Fields for Refunding a Payment

Set to one of these values:
  • payPal
    : the PayPal payment method.
  • venmo
    : the Venmo payment method.
Set to
eWallet
.
Set to
AP_REFUND
.

Example: Refunding a Payment

Request
{ "orderInformation": { "amountDetails": { "totalAmount": "31", "currency": "USD" } }, "paymentInformation": { "paymentType": { "method": { "name": "payPal" }, "name": "eWallet" } }, "processingInformation": { "actionList": [ "AP_REFUND" ] } }
Response to a Successful Request
{ "processorInformation": { "transactionId": "8EY55721B5181393M" }, "message": "Successful", "status": "REFUNDED", "id": "7262018791236022601991", "submitTimeUtc": "2024-09-13T04:31:19Z" }

Response Statuses for Refunding a Payment

Cybersource
responds to your request with one of these statuses in the
status
response field:
  • PENDING
    : The refund request was successful and is being reviewed by PayPal. Use the check status request as often as necessary until the status updates.
  • INVALID_REQUEST
    : The refund request was not successful. Send a new refund request.
When you request the status of a refund,
Cybersource
responds with one of these statuses in the
status
response field:
  • REFUNDED
    : The captured funds were successfully refunded to the customer's account. This status can also occur during a customer dispute, such as a chargeback or reversal.