Refund Invoice

Definition

https://sandbox.bluesnap.com/services/2/orders/refund?:query-parameters


The Refund Invoice request enables you to refund either the full amount or a partial amount of a given invoice. You can provide a cancellation reason and determine whether to cancel a subscription at the same time.

📘

Notes

  • The refund is automatically performed in the currency that was used for the original transaction.
  • For card and ACH transactions, if you issue a refund the same day as the initial transaction, the transaction is a void, rather than a refund.

Request Content

Enter the relevant query parameters into the web service URL, in the format: services/2/orders/refund?{query-parameters}

Query Parameters

Parameter Name

Description

Example

invoiceId

Required ID of the invoice to refund.

invoiceid=38420528

reason

Optional Reason the shopper cancelled or requested a refund for the order. If this parameter is empty, the default string is "Per your instructions".

reason=unsatisfied+customer

cancelSubscriptions

Optional true = Cancel the shopper's subscription associated with this invoice ID. false = Just refund the selected purchase and do not cancel the subscription.

cancelSubscription=true

amount

Optional Amount to be refunded, if this is a partial refund. The amount parameter value must be:

  • Greater than 0.
  • Less than the maximum refundable amount.

amount=9.20

sku.{sku ID}.amount

Required if performing a partial refund on an order with multiple SKUs The amount parameter value must be:

  • Greater than 0.
  • Less than the maximum refundable amount for this SKU.

sku.789.amount=20.00

Response Details

If successful, the response HTTP status code is 204 No Content. There is no content in the response body. For details about possible errors, refer to: General Errors and Payment & Processor Errors.


Examples

Request Examples

curl -v -X PUT https://sandbox.bluesnap.com/services/2/orders/refund?invoiceId=38410844&reason=unsatisfied+customer \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
curl -v -X PUT https://sandbox.bluesnap.com/services/2/orders/refund?invoiceid=38420528&cancelsubscriptions=true \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
curl -v -X PUT https://sandbox.bluesnap.com/services/2/orders/refund?invoiceid=38420528&amount=9.20 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
curl -v -X PUT https://sandbox.bluesnap.com/services/2/orders/refund?invoiceid=38420528&sku.789.amount=20.00 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='

Response Example

HTTP/ 1.1 204 No Content

Back to Top