Search Overlay

Process a Refund

POST /alternatepayments/v1/accounts/account_id/payments/payment_id/refunds

To make a full or partial refund, you must make a POST request to the refunds endpoint.

Only completed payments – i.e., those with the status of COMPLETED – can be refunded. You can issue a series of refunds as long as the combined total does not exceed the original payment amount.

See the Alternate Payments Overview page to see which payment methods support refunds.

curl -X POST https://api.test.paysafe.com/alternatepayments/v1/accounts/1001070130/payments/eda8ab88-4962-4c58-9c46-5dd73d305eee/refunds \
-u testuser:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json' \
-d '{
"merchantRefNum": "UniqueRef1234",
"dupCheck": true,
"paymentType": "NETELLER",
"currencyCode": "EUR",
"amount": 100
}'

Prior to trying the example above, you should:

  • Provide a unique merchant reference number (merchantRefNum) for each transaction.
  • Replace the account number (1001070130) in the URL with the Test account number you received for the alternate payments method you are testing.
  • Replace the payment ID (eda8ab88-4962-4c58-9c46-5dd73d305eee) with the payment ID you received in the response to your Payment request.
  • Replace the API key (after the -u) with the Test API key you have received.

For completed payments in the manual settlement flow, merchants can issue refunds against either the payment or the settlement (see settlement refunds for information on issuing refunds to a settlement). However, note the following:

  • If you have issued a partial refund against a settlement using the settlements endpoint, you cannot then issue a subsequent refund against the associated payments endpoint.
  • If you have issued a partial refund against a settlement using the payments endpoint, you cannot then issue a subsequent refund against the associated settlements endpoint.

{
"id": "a3e300b0-f0ba-48d9-bef2-43ebb8bc2a05",
"merchantRefNum": "UniqueRef1234",
"dupCheck": true,
"amount": 100,
"currencyCode": "EUR",
"paymentType": "NETELLER",
"txnTime": "2017-04-03T16:05:00Z",
"liveMode": true,
"status": "COMPLETED",
"gatewayResponse": {
"code": "000.000.000",
"description": "Request successfully processed",
"id": "43de56a14cb04fbd8e461a92f0ca7b59",
"processor": "PAYON",
"paymentType": "RF"
},
"links": [
{
"rel": "self",
"href": "http://api.test.paysafe.com/alternatepayments/v1/accounts/1004509430/refunds/a3e300b0-f0ba-48d9-bef2-43ebb8bc2a05"
}
{
"rel": "payment",
"href": "http://api.test.paysafe.com/alternatepayments/v1/accounts/1004509430/payments/eda8ab88-4962-4c58-9c46-5dd73d305eee"
}
]
}

The settlement response contains the following parameters:

Value Type Description
id string This is a unique ID for this refund operation. You can use it, e.g., to look up a refund request.
merchantRefNum string This is the merchant reference number created by the merchant and submitted as part of the request.
dupCheck boolean

true indicates this is not a duplicate transaction.

A request is considered a duplicate if the merchantRefNum has already been used in a previous request within the past 90 days.

amount integer This is the amount of the request, in minor units.
currencyCode enum

This is the three-digit currency code for the currency of the merchant account specified by the account_id in the request URL.

paymentType enum This is the payment type used for the request (e.g., NETELLER).
txnTime dateTime This is the transaction time and date in UTC format.
liveMode boolean

true indicates this is a real transaction.

false indicates this is a test transaction.

status enum

This is the status of the refund.

  • CANCELLED – The authorization request has been fully reversed.
  • COMPLETED – The transaction has been completed.
  • ERROR – The transaction failed due to an error (e.g., missing required parameter).
  • EXPIRED – The authorization of the payment or the payment initiation has expired.
  • FAILED – The transaction was declined.
  • PROCESSING – The request was authorized by the customer, awaiting payment provider authorization.
  • RECEIVED – Our system has received the request and is waiting for the payment provider's response.
gatewayResponse object This contains the response from the payment provider and varies depending on the payment method used.
links array of link objects

The array contains a self link that can be used to look up details about the request.

On this Page