Refund Invoice

Definition

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


Documentation

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

  <th>
    Description
  </th>

  <th>
    Example
  </th>
</tr>
  <td>
    <span style="color:#F37500">**Required**</span>\
    ID of the invoice to refund.
  </td>

  <td>
    `invoiceid=38420528`
  </td>
</tr>

<tr>
  <td>
    `reason`
  </td>

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

  <td>
    `reason=unsatisfied+customer`
  </td>
</tr>

<tr>
  <td>
    `cancelSubscriptions`
  </td>

  <td>
    *Optional*

    * \*true\*\* = Cancel the shopper's subscription associated with this invoice ID.
    * \*false\*\* = Just refund the selected purchase and do not cancel the subscription.
  </td>

  <td>
    `cancelSubscription=true`
  </td>
</tr>

<tr>
  <td>
    `amount`
  </td>

  <td>
    *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.
  </td>

  <td>
    `amount=9.20`
  </td>
</tr>

<tr>
  <td>
    `sku.{sku ID}.amount`
  </td>

  <td>
    *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.
  </td>

  <td>
    `sku.789.amount=20.00`
  </td>
</tr>
Parameter Name
`invoiceId`

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