{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/transactions/:transaction-id/refund","auth":"optional","examples":{"codes":[]},"method":"put","results":{"codes":[{"code":"","language":"text"}]},"settings":"","params":[{"name":"transaction-id","type":"string","default":"","desc":"ID of the transaction to be refunded","required":true,"in":"path","ref":"","_id":"57b6ec9e49a12a0e007b469d"}]},"next":{"description":"","pages":[]},"title":"Refund","type":"endpoint","slug":"refund","excerpt":"","body":"The Refund request enables you to perform a full or partial refund on a transaction that was processed through the Payment API. \n\nTo retrieve a transaction that has been refunded, use the [Retrieve Card Transaction](doc:retrieve), \n[Retrieve PayPal Transaction](doc:paypal-retrieve), [Retrieve ECP Transaction](doc:retrieve-ecp-transaction), or [Retrieve SEPA DD Transaction](doc:retrieve-sepa-dd-transaction) request.\n \n[block:callout]\n{\n \"type\": \"info\",\n \"title\": \"Notes\",\n \"body\": \"* The refund is automatically performed in the currency that was used for the original transaction.\\n* For card and ACH transactions, when you issue a refund we will first attempt to void the transaction. \\n * For cards, if the transaction cannot be voided, a refund will be issued.\\n * For ACH, you will need to issue a refund once the transaction has been settled.\\n* To view details about the refunds on a specific transaction, use the **Retrieve** call corresponding to the type of transaction (such as card or ECP).\"\n}\n[/block]\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\nEnter the transaction ID and any of the optional query parameters below into the request URL. For example:\n`services/2/transactions/1111111/refund?amount=9.20`\n\n**Query Parameters**\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Parameter Name\",\n \"h-1\": \"Description\",\n \"h-2\": \"Example\",\n \"0-0\": \"`amount`\",\n \"1-0\": \"`reason`\",\n \"2-0\": \"`cancelsubscriptions`\",\n \"0-1\": \"*Optional*\\nAmount to be refunded, if this is a partial refund.\\nThe amount parameter value must be greater than 0 and no more than the total amount.\",\n \"1-1\": \"*Optional*\\nReason the shopper cancelled or requested a refund for the order. If this parameter is empty, the default string is \\\"Per your instructions\\\". Maximum 4000 characters.\",\n \"2-1\": \"*Optional*\\n**Note**: Set to true if not passed.\\n**true** = (default) Cancel the shopper's subscription associated with this invoice ID. \\n**false** = Just refund the selected purchase and do not cancel the subscription.\",\n \"0-2\": \"`amount=9.20`\",\n \"1-2\": \"`reason=unsatisfied+customer`\",\n \"2-2\": \"`cancelsubscriptions=true`\",\n \"3-1\": \"*Optional*\\nAmount to be refunded to vendor. If no vendor amount parameters are passed, the transaction is refunded based on the original commission split.\\n\\n*Note:* Only used for Marketplace transactions with vendors when `amount` parameter is passed.\",\n \"3-0\": \"`vendor.{vendor ID}.amount`\",\n \"3-2\": \"`vendor.10398030.amount=4.10`\"\n },\n \"cols\": 3,\n \"rows\": 4\n}\n[/block]\n###Response Details\nIf successful, the response HTTP status code is 204 No Content.\nThere is no content in the response body.\n\n\n<hr>\n\n##Example\n\n###Request Example\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions/1111111/refund?amount=9.20 \\\\\\n-H 'Content-Type: application/xml' \\\\\\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\",\n \"language\": \"curl\",\n \"name\": \"Refund Request\"\n }\n ]\n}\n[/block]\n###Response Example\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"HTTP/ 1.1 204 No Content\",\n \"language\": \"xml\",\n \"name\": \"Refund Response: 204 No Content\"\n }\n ]\n}\n[/block]\n<hr>\n\n##API Explorer\nTo test a call, enter an existing transaction ID in the `transaction-id` field. This automatically inserts the ID into the request URL. Leave the `Body Content` field empty.","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5fd26704abd1b6004f12d6fd","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Refunds","slug":"refunds","order":9,"from_sync":false,"reference":false,"_id":"5fd26704abd1b6004f12d679","version":"5fd26704abd1b6004f12d72c","project":"57336fd5a6a9c40e00e13a0b","createdAt":"2016-08-19T11:04:31.283Z","__v":0},"project":"57336fd5a6a9c40e00e13a0b","parentDoc":null,"user":"560d5913af97231900938124","version":{"version":"8976-XML","version_clean":"8976.0.0-XML","codename":"3.36 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5fd26704abd1b6004f12d673","5fd26704abd1b6004f12d674","5fd26704abd1b6004f12d675","5fd26704abd1b6004f12d676","5fd26704abd1b6004f12d677","5fd26704abd1b6004f12d678","5fd26704abd1b6004f12d679","5fd26704abd1b6004f12d67a","5fd26704abd1b6004f12d67b","5fd26704abd1b6004f12d67c","5fd26704abd1b6004f12d67d","5fd26704abd1b6004f12d67e","5fd26704abd1b6004f12d67f","5fd26704abd1b6004f12d680","5fd26704abd1b6004f12d681","5fd26704abd1b6004f12d682","5fd26704abd1b6004f12d683","5fd26704abd1b6004f12d684","5fd26704abd1b6004f12d685","5fd97a5a79ae260012a454d2"],"_id":"5fd26704abd1b6004f12d72c","project":"57336fd5a6a9c40e00e13a0b","__v":1,"forked_from":"5f43d7f192d43e01ff6f11c2","createdAt":"2018-04-24T15:24:22.608Z","releaseDate":"2018-04-24T15:24:22.608Z"},"createdAt":"2016-01-12T17:43:39.621Z","githubsync":"","__v":13}
putRefund
Definition
Parameters
Path Params
Documentation
The Refund request enables you to perform a full or partial refund on a transaction that was processed through the Payment API.
To retrieve a transaction that has been refunded, use the Retrieve Card Transaction,
Retrieve PayPal Transaction, Retrieve ECP Transaction, or Retrieve SEPA DD Transaction request.
Notes
- The refund is automatically performed in the currency that was used for the original transaction.
- 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.
- To view details about the refunds on a specific transaction, use the Retrieve call corresponding to the type of transaction (such as card or ECP).
amount
Optional
Amount to be refunded, if this is a partial refund.
The amount parameter value must be greater than 0 and no more than the total amount.
amount=9.20
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". Maximum 4000 characters.
reason=unsatisfied+customer
cancelsubscriptions
Optional
Note: Set to true if not passed.
true = (default) Cancel the shopper's subscription associated with this invoice ID.
false = Just refund the selected purchase and do not cancel the subscription.
cancelsubscriptions=true
vendor.{vendor ID}.amount
Optional
Amount to be refunded to vendor. If no vendor amount parameters are passed, the transaction is refunded based on the original commission split.
Note: Only used for Marketplace transactions with vendors when amount
parameter is passed.
vendor.10398030.amount=4.10
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions/1111111/refund?amount=9.20 \
-H 'Content-Type: application/xml' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
HTTP/ 1.1 204 No Content