The Refund request allows you to perform a full or partial refund on a transaction that was processed through the Payment API.
Notes
Refund currency
The refund is automatically performed in the currency of the original transaction.Refunds for card and ACH transactions
For card and ACH transactions, when you issue a refund, we will first attempt to void the transaction.
- For cards, if the transaction cannot be voided, a refund will be issued.
- For ACH, you will need to issue a refund once the transaction has been settled.
Retrieving refund details
To view details about the refunds on a specific transaction, use the Retrieve call for that transaction type (such as Retrieve Card Transaction or Retrieve ACH/ECP Transaction).
- Retrieve the transaction using the
transaction-id
to view all refunds for that transaction.- Retrieve the transaction using the
refund-transaction-id
to view a specific refund and all its details (such as metadata).
Request Content
Send a refund object, with the following:
amount
decimal optional
tax-amount
decimal optional (included if a partial refund of transaction involving taxes)
reason
string optional
cancel-subscriptions
boolean optional
vendors-refund-info
container optional (see vendors-refund-info)
transaction-meta-data
container optional (see transaction-meta-data)
Response Details
If successful, the response HTTP status code is 200 OK and contains the refund object.
Example
Request Example
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions/refund/1039318399 \
-H 'Content-Type: application/xml' \
-H 'Accept: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<refund xmlns="http://ws.plimus.com">
<reason>Refund for order #1992</reason>
<cancel-subscriptions>false</cancel-subscriptions>
<transaction-meta-data>
<meta-data>
<meta-key>refundedItems</meta-key>
<meta-value>1552,8832</meta-value>
<meta-description>Refunded Items</meta-description>
</meta-data>
<meta-data>
<meta-key>keyNumber2</meta-key>
<meta-value>KTD</meta-value>
<meta-description>Metadata 2</meta-description>
</meta-data>
</transaction-meta-data>
</refund>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions/refund/1039287997 \
-H 'Content-Type: application/xml' \
-H 'Accept: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<refund xmlns="http://ws.plimus.com">
<amount>10</amount>
<cancel-subscriptions>false</cancel-subscriptions>
</refund>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions/refund/1039287997 \
-H 'Content-Type: application/xml' \
-H 'Accept: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<refund xmlns="http://ws.plimus.com">
<amount>52.50</amount>
<tax-amount>2.50</tax-amount>
</refund>'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions/refund/merchant/1011671987 \
-H 'Content-Type: application/xml' \
-H 'Accept: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
<refund xmlns="http://ws.plimus.com">
<reason>Refund for order #1992</reason>
</refund>'
Response Example
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<refund xmlns="http://ws.plimus.com">
<refund-transaction-id>1039318651</refund-transaction-id>
<transaction-meta-data>
<meta-data>
<meta-key>refundedItems</meta-key>
<meta-value>1552,8832</meta-value>
<meta-description>Refunded Items</meta-description>
</meta-data>
<meta-data>
<meta-key>keyNumber2</meta-key>
<meta-value>KTD</meta-value>
<meta-description>Metadata 2</meta-description>
</meta-data>
</transaction-meta-data>
<reason>Refund for order #1992</reason>
<cancel-subscriptions>false</cancel-subscriptions>
</refund>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<refund xmlns="http://ws.plimus.com">
<refund-transaction-id>1039318669</refund-transaction-id>
<amount>10</amount>
<cancel-subscriptions>false</cancel-subscriptions>
</refund>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<refund xmlns="http://ws.plimus.com">
<refund-transaction-id>1039318670</refund-transaction-id>
<amount>52.50</amount>
<tax-amount>2.50</tax-amount>
</refund>
Example Descriptions
For details about the above examples, see:
Full refund with metadata
This example shows a refund request with metadata for the full transaction amount. Simply omit amount
to refund the full transaction amount. To pass metadata, include transaction-meta-data
in the request.
Partial refund
This example shows a partial refund, with the amount specified by the amount
parameter.
Partial refund with tax
This example shows a partial refund for a transaction involving taxes. The refund amount, including tax, is specified by the amount
parameter, and the tax amount to be refunded is specified in the tax-amount
parameter. See the Taxes guide for more information.
with Merchant Transaction ID
This example shows a basic refund request using the merchant-transaction-id
at the end of the request URL instead of the transactionId
.
API Explorer
To test a call, enter an existing transaction ID in the transaction-id
field. This automatically inserts the ID into the request URL. Enter any relevant parameters in the request body. You can use the code below as a starting point. Click Try It when you're ready to run your request.
<refund xmlns="http://ws.plimus.com">
<reason>Refund for order #1992</reason>
<cancel-subscriptions>false</cancel-subscriptions>
<transaction-meta-data>
<meta-data>
<meta-key>refundedItems</meta-key>
<meta-value>1552,8832</meta-value>
<meta-description>Refunded Items</meta-description>
</meta-data>
<meta-data>
<meta-key>keyNumber2</meta-key>
<meta-value>KTD</meta-value>
<meta-description>Metadata 2</meta-description>
</meta-data>
</transaction-meta-data>
</refund>