{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/transactions/approval","auth":"optional","settings":"57ee593a21ceb20e0061959e","results":{"codes":[{"code":"","language":"text"}]},"method":"put","examples":{"codes":[]},"params":[{"name":"transactionid","type":"string","default":"","desc":"either `transactionid` or `merchanttransactionid` <b>is required</b> <br />ID of the transaction to be approved/declined","required":false,"in":"query","ref":"","_id":"57b6ec9e49a12a0e007b469d"},{"name":"merchanttransactionid","type":"string","default":"","desc":"either `transactionid` or `merchanttransactionid` <b>is required</b> <br />merchant's transaction ID number for the transaction to be approved/declined","required":false,"in":"query","ref":"","_id":"5e5d566681704f00186f00c4"},{"name":"approvetransaction","type":"boolean","default":"true","desc":"Set to `true` to approve the transaction or to `false` to decline the transaction. Default value is `true`.","required":false,"in":"query","ref":"","_id":"5ed51e1bd6b31c07c13ff5e2"}]},"next":{"description":"","pages":[]},"title":"Merchant Approve Transaction","type":"endpoint","slug":"merchant-approval","excerpt":"","body":"[block:html]\n{\n \"html\": \"<script>\\n // hide body textbox of API Explorer\\n $(document).ready(function() {\\n $(\\\"textarea[placeholder='Body Content']\\\").hide(); \\n }); \\n</script> \"\n}\n[/block]\nThe Merchant Approve Transaction request lets you approve or decline transactions with invoice status of PENDING_MERCHANT_REVIEW.\n\n<a class=\"btn btn-success\" href=\"#section-api-explorer\" role=\"button\">Try it in the API Explorer</a>\n\n###Request Content\nThe request must include either the `transactionid` or `merchanttransactionid`. \n\nFor example: \n\n>`services/2/transactions/approval?transactionid=38612140&approvetransaction=true`\n\nOR\n\n>`services/2/transactions/approval?merchanttransactionid=MyUniqueMTI&approvetransaction=true`\n\n**Note:** If `approvetransaction` is not included, `true` is assumed.\n\n###Response Details\nIf successful, the response HTTP status code is 204.\nThe response will be in `MerchantApprovalResource` and contain the following parameters. \n\n**Possible Responses**\n[block:parameters]\n{\n \"data\": {\n \"h-0\": \"Case\",\n \"h-1\": \"Examples\",\n \"h-2\": \"with merchantTransactionId\",\n \"0-0\": \"**Approve**\",\n \"1-0\": \"* Auth Only (with amount > 0)\",\n \"1-1\": \"with `transactionId`\\n```json\\n{\\n \\\"transactionId\\\": \\\"38611602\\\",\\n \\\"transactionStatus\\\": \\\"Waiting\\\"\\n}\\n```\\n\\nwith `merchantTransactionId`\\n```json\\n{\\n \\\"transactionId\\\": \\\"38611602\\\",\\n \\\"transactionStatus\\\": \\\"Waiting\\\",\\n \\\"merchantTransactionId\\\": \\\"merchantTransactionId122222\\\"\\n}\\n```\",\n \"1-2\": \"\",\n \"2-0\": \"* Auth Only (with amount = 0)\\n* Auth Capture \\n* Create PayPal Transaction \\n* Create Local Bank Transfer Transaction\",\n \"2-1\": \"with `transactionId`\\n```json\\n{\\n \\\"transactionId\\\": \\\"38611602\\\",\\n \\\"transactionStatus\\\": \\\"Approved\\\"\\n}\\n```\\n\\nwith `merchantTransactionId`\\n```json\\n{\\n \\\"transactionId\\\": \\\"38611602\\\",\\n \\\"transactionStatus\\\": \\\"Approved\\\",\\n \\\"merchantTransactionId\\\": \\\"merchantTransactionId122222\\\"\\n}\\n```\",\n \"2-2\": \"\",\n \"3-0\": \"* Create Subscription \\n* Create Merchant-Managed Subscription\",\n \"3-1\": \"with `transactionId` \\n```json\\n{\\n \\\"subscriptionId\\\": 39606170,\\n \\\"transactionId\\\": \\\"38611602\\\",\\n \\\"transactionStatus\\\": \\\"Approved\\\"\\n}\\n```\\n\\nwith `merchantTransactionId`\\n```json\\n{\\n \\\"subscriptionId\\\": 39606170,\\n \\\"transactionId\\\": \\\"38611602\\\",\\n \\\"transactionStatus\\\": \\\"Approved\\\",\\n \\\"merchantTransactionId\\\": \\\"merchantTransactionId122222\\\"\\n}\\n```\",\n \"3-2\": \"\",\n \"4-0\": \"**Decline**\",\n \"5-0\": \"* Create Local Bank Transfer Transaction\",\n \"5-1\": \"with `transactionId`\\n```json\\n{\\n \\\"transactionId\\\": \\\"38523084\\\",\\n \\\"transactionStatus\\\": \\\"Short OrderContext Declined By Vendor (Refund Needed)\\\"\\n}\\n```\\n\\nwith `merchantTransactionId`\\n```json\\n{\\n \\\"transactionId\\\": \\\"38523084\\\",\\n \\\"transactionStatus\\\": \\\"Short OrderContext Declined By Vendor (Refund Needed)\\\",\\n \\\"merchantTransactionId\\\": \\\"merchantTransactionId122222\\\"\\n}\\n```\",\n \"5-2\": \"\",\n \"6-0\": \"* all others\",\n \"6-1\": \"with `transactionId`\\n```json\\n{\\n \\\"transactionId\\\": \\\"38611592\\\",\\n \\\"transactionStatus\\\": \\\"Canceled\\\"\\n}\\n```\\n\\nwith `merchantTransactionId`\\n```json\\n{\\n \\\"transactionId\\\": \\\"38611592\\\",\\n \\\"transactionStatus\\\": \\\"Canceled\\\",\\n \\\"merchantTransactionId\\\": \\\"merchantTransactionId122222\\\"\\n}\\n```\",\n \"6-2\": \"\"\n },\n \"cols\": 2,\n \"rows\": 7\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/approval?transactionid=38612140&approvetransaction=true \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\",\n \"language\": \"curl\",\n \"name\": \"Request: Approve transaction\"\n },\n {\n \"code\": \"curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions/approval?transactionid=38612140&approvetransaction=false \\\\\\n-H 'Content-Type: application/json' \\\\\\n-H 'Accept: application/json' \\\\ \\n-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \\\\\\n-d '\",\n \"language\": \"curl\",\n \"name\": \"Request: Decline transaction\"\n }\n ]\n}\n[/block]\n###Response Examples\n[block:code]\n{\n \"codes\": [\n {\n \"code\": \"{\\n\\t\\\"transactionId\\\": \\\"38611602\\\",\\n\\t\\\"transactionStatus\\\": \\\"Approved\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"Response: 200 OK with Transaction ID\"\n },\n {\n \"code\": \"{\\n\\t\\\"transactionId\\\": \\\"38611602\\\",\\n\\t\\\"transactionStatus\\\": \\\"Approved\\\",\\n\\t\\\"merchantTransactionId\\\": \\\"merchantTransactionId122222\\\"\\n}\",\n \"language\": \"json\",\n \"name\": \"with Merchant Transaction ID\"\n }\n ]\n}\n[/block]\n<hr>\n\n##API Explorer\nTo test a call, enter an existing transaction ID or merchant transaction ID. This automatically inserts the ID into the request URL.","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"628531cd1258c8003f6dd262","project":"57336fd5a6a9c40e00e13a0b","version":{"version":"8976-JSON","version_clean":"8976.0.0-JSON","codename":"3.42 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["628531cd1258c8003f6dd1bf","628531cd1258c8003f6dd1c0","628531cd1258c8003f6dd1c1","628531cd1258c8003f6dd1c2","628531cd1258c8003f6dd1c3","628531cd1258c8003f6dd1c4","628531cd1258c8003f6dd1c5","628531cd1258c8003f6dd1c6","628531cd1258c8003f6dd1c7","628531cd1258c8003f6dd1c8","628531cd1258c8003f6dd1c9","628531cd1258c8003f6dd1ca","628531cd1258c8003f6dd1cb","628531cd1258c8003f6dd1cc","628531cd1258c8003f6dd1cd","628531cd1258c8003f6dd1ce","628531cd1258c8003f6dd1cf","628531cd1258c8003f6dd1d0","628531cd1258c8003f6dd1d1","628531cd1258c8003f6dd1d2"],"_id":"628531cd1258c8003f6dd27d","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"622783372cd60c003782d77e","createdAt":"2018-04-24T15:22:41.561Z","releaseDate":"2018-04-24T15:22:41.561Z"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Fraud Review","slug":"fraud-review","order":12,"from_sync":false,"reference":false,"_id":"628531cd1258c8003f6dd1ce","project":"57336fd5a6a9c40e00e13a0b","version":"628531cd1258c8003f6dd27d","createdAt":"2020-03-02T19:01:01.717Z","__v":0},"user":"5beb1b96bc2003003ecd645e","createdAt":"2020-03-02T18:04:23.387Z","__v":83,"parentDoc":null}
putMerchant Approve Transaction
Definition
Parameters
Query Params
Documentation
The Merchant Approve Transaction request lets you approve or decline transactions with invoice status of PENDING_MERCHANT_REVIEW.
Request Content
The request must include either the transactionid
or merchanttransactionid
.
For example:
services/2/transactions/approval?transactionid=38612140&approvetransaction=true
OR
services/2/transactions/approval?merchanttransactionid=MyUniqueMTI&approvetransaction=true
Note: If approvetransaction
is not included, true
is assumed.
Response Details
If successful, the response HTTP status code is 204.
The response will be in MerchantApprovalResource
and contain the following parameters.
Possible Responses
Approve
- Auth Only (with amount > 0)
with transactionId
{
"transactionId": "38611602",
"transactionStatus": "Waiting"
}
with merchantTransactionId
{
"transactionId": "38611602",
"transactionStatus": "Waiting",
"merchantTransactionId": "merchantTransactionId122222"
}
- Auth Only (with amount = 0)
- Auth Capture
- Create PayPal Transaction
- Create Local Bank Transfer Transaction
with transactionId
{
"transactionId": "38611602",
"transactionStatus": "Approved"
}
with merchantTransactionId
{
"transactionId": "38611602",
"transactionStatus": "Approved",
"merchantTransactionId": "merchantTransactionId122222"
}
- Create Subscription
- Create Merchant-Managed Subscription
with transactionId
{
"subscriptionId": 39606170,
"transactionId": "38611602",
"transactionStatus": "Approved"
}
with merchantTransactionId
{
"subscriptionId": 39606170,
"transactionId": "38611602",
"transactionStatus": "Approved",
"merchantTransactionId": "merchantTransactionId122222"
}
Decline
- Create Local Bank Transfer Transaction
with transactionId
{
"transactionId": "38523084",
"transactionStatus": "Short OrderContext Declined By Vendor (Refund Needed)"
}
with merchantTransactionId
{
"transactionId": "38523084",
"transactionStatus": "Short OrderContext Declined By Vendor (Refund Needed)",
"merchantTransactionId": "merchantTransactionId122222"
}
- all others
with transactionId
{
"transactionId": "38611592",
"transactionStatus": "Canceled"
}
with merchantTransactionId
{
"transactionId": "38611592",
"transactionStatus": "Canceled",
"merchantTransactionId": "merchantTransactionId122222"
}
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions/approval?transactionid=38612140&approvetransaction=true \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions/approval?transactionid=38612140&approvetransaction=false \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"transactionId": "38611602",
"transactionStatus": "Approved"
}
{
"transactionId": "38611602",
"transactionStatus": "Approved",
"merchantTransactionId": "merchantTransactionId122222"
}