{"_id":"5c6c23e4735b81006177d01f","category":{"_id":"5c6c23e4735b81006177d00b","version":"5c6c23e4735b81006177d0a4","project":"57336fd5a6a9c40e00e13a0b","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-08-19T11:04:31.283Z","from_sync":false,"order":5,"slug":"refunds","title":"Refunds"},"user":"560d5913af97231900938124","project":"57336fd5a6a9c40e00e13a0b","parentDoc":null,"version":{"_id":"5c6c23e4735b81006177d0a4","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5bedd214812951004a2ad9df","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z","categories":["5c6c23e4735b81006177d006","5c6c23e4735b81006177d007","5c6c23e4735b81006177d008","5c6c23e4735b81006177d009","5c6c23e4735b81006177d00a","5c6c23e4735b81006177d00b","5c6c23e4735b81006177d00c","5c6c23e4735b81006177d00d","5c6c23e4735b81006177d00e","5c6c23e4735b81006177d00f","5c6c23e4735b81006177d010","5c6c23e4735b81006177d011","5c6c23e4735b81006177d012","5c6c23e4735b81006177d013","5c6c23e4735b81006177d014"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"Main","version_clean":"8976.0.0-JSON","version":"8976-JSON"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-12T17:43:39.621Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"method":"put","results":{"codes":[{"language":"text","code":""}]},"settings":"57ee593a21ceb20e0061959e","auth":"optional","params":[{"_id":"57b6ec9e49a12a0e007b469d","ref":"","in":"path","required":true,"desc":"ID of the transaction to be refunded","default":"","type":"string","name":"transactionId"}],"url":"/transactions/:transactionId/refund"},"isReference":false,"order":0,"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\": \"Requirements\",\n \"body\": \"The refund will automatically be performed in the currency that was used for the original transaction.\"\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\\\".\",\n \"2-1\": \"*Optional*\\n**true** = 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\": \"`cancelsubscription=true`\",\n \"3-0\": \"`vendor.{vendor ID}.amount`\",\n \"3-1\": \"*Optional*\\nAmount to be refunded to vendor. If no vendor amount parameters are passed, the transaction will be refunded based on the original commission split.\\n\\n*Note:* Only used for Marketplace transactions with vendors when `amount` parameter is passed.\",\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[block:callout]\n{\n \"type\": \"success\",\n \"body\": \"To view details about the refunds on a specific transaction, retrieve the transaction as described in [Retrieve Card Transaction](doc:retrieve) and [Retrieve PayPal Transaction](doc:paypal-retrieve).\",\n \"title\": \"Refund details appear in retrieved transactions\"\n}\n[/block]\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/json' \\\\\\n-H 'Accept: application/json' \\\\ \\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\": \"json\",\n \"name\": \"Refund Response: 204 No Content\"\n }\n ]\n}\n[/block]\n<hr>\n\n##API Explorer\nTo test out a call, enter an existing transaction ID in the `transactionId` field. This will automatically insert the ID into the request URL. Leave the Body Content field empty.","excerpt":"","slug":"refund","type":"endpoint","title":"Refund"}
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.
The refund will automatically be performed in the currency that was used for the original transaction.
Try it in the API Explorer
Enter the transaction ID and any of the optional query parameters below into the request URL. For example:
services/2/transactions/1111111/refund?amount=9.20
Cardigan Lana Cardigan In Neri Neri Glamood In Lana Glamood ulT3FcK1J
Query Parameters
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".
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
vendor.{vendor ID}.amount
Optional
Amount to be refunded to vendor. If no vendor amount parameters are passed, the transaction will be 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
If successful, the response HTTP status code is 204 No Content.
There is no content in the response body.
To view details about the refunds on a specific transaction, retrieve the transaction as described in Retrieve Card Transaction and Retrieve PayPal TransactionA RigheDi Colore Top Escada Blu Farfetch Y7gbyf6v.
curl
-v
-X
PUT https://sandbox.bluesnap.com/services/2/transactions/1111111/refundAmazon Viola Block Tee Southpole Tech Color 0nmN8w?amount
=
9.20 \
-H
'Content-Type: application/json'
\
-H
'Accept: application/json'
\
-H
'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ='
\
-d
'
HTTP
/
1.1E Stampa Full Zip Ferrari Con Felpa Donna Sulle Maniche Ygy6bf7
204
No
Content
To test out a call, enter an existing transaction ID in the
transactionId
field. This will automatically insert the ID into the request URL. Leave the Body Content field empty.
{{ tryResults.results }}E Stampa Full Zip Ferrari Con Felpa Donna Sulle Maniche Ygy6bf7
Method | {{ tryResults.method }} |
---|---|
Request Headers |
{{ tryResults.requestHeaders }} |
URL | {{ tryResults.url }} |
Request Data |
{{ tryResults.data }} |
Status | |
Response Headers |
{{ tryResults.responseHeaders }} |