{"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":"path","ref":"","_id":"57b6ec9e49a12a0e007b469d"},{"name":"merchantTransactionId","type":"string","default":"","desc":"either `transactionId` or `merchantTransactionId` <b>is required</b> <br /><br />merchant's transaction ID number for the transaction to be approved/declined","required":false,"in":"path","ref":"","_id":"5e5d566681704f00186f00c4"}]},"next":{"description":"","pages":[]},"title":"Merchant Approve Transaction","type":"endpoint","slug":"merchant-approval","excerpt":"","body":"The Merchant Approve Transaction request lets you approve or decline a 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\nEnter the `transactionId` or `merchantTransactionId` and the `approveTransaction` parameter into the request URL. The request must include either the `transactionId` or `merchantTransactionId`.  \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\nIf `approveTransaction` is not included, `true` is assumed.\n\n**Query Parameters**\n\nParameter | Description\n--- | ---\n`transactionId` | ID of the transaction to be approved/declined \n`merchantTransactionId` | merchant's transaction ID number for the transaction to be approved/declined\n`approveTransaction` | the merchant's approval descision<br />`true` = approve<br />`false` = decline\n\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\nPossible Responses\n\nCase | with transactionId | with merchantTransactionId\n--- | --- | ---\n**Approve**||\nauth-only with amount > 0 | { <br />\"transactionId\": \"38611602\",<br />\"transactionStatus\": \"Waiting\"<br />} | {<br />\"transactionId\": \"38611602\",<br />\"transactionStatus\": \"Waiting\",<br />\"merchantTransactionId\": \"merchantTransactionId122222\"<br />}\nauth-only with 0$<br />auth-capture <br />create PayPal |  { <br />\"transactionId\": \"38611602\",<br />\"transactionStatus\": \"Approved\"<br />} | {<br />\"transactionId\": \"38611602\",<br />\"transactionStatus\": \"Approved\",<br />\"merchantTransactionId\": \"merchantTransactionId122222\"<br />}\ncreate subscription <br />(regular or managed) |  { <br />\"subscriptionId\": 39606170,<br />\"transactionId\": \"38611602\",<br />\"transactionStatus\": \"Approved\"<br />} | {<br />\"subscriptionId\": 39606170,<br />\"transactionId\": \"38611602\",<br />\"transactionStatus\": \"Approved\",<br />\"merchantTransactionId\": \"merchantTransactionId122222\"<br />}\n<b>Decline</b>||\nall | { <br />\"transactionId\": \"38611592\",<br />\"transactionStatus\": \"Canceled\"<br />} | {<br />\"transactionId\": \"38611592\",<br />\"transactionStatus\": \"Canceled\",<br />\"merchantTransactionId\": \"merchantTransactionId122222\"<br />}\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/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 in the `transactionId` field. This automatically inserts the ID into the request URL. Leave the `Body Content` field empty.","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e5d4aa7ba46850021e1278a","project":"57336fd5a6a9c40e00e13a0b","version":{"version":"8976-JSON","version_clean":"8976.0.0-JSON","codename":"Live","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e5d3aa2dc4d35003d784cf0","5e5d3aa2dc4d35003d784cf1","5e5d3aa2dc4d35003d784cf2","5e5d3aa2dc4d35003d784cf3","5e5d3aa2dc4d35003d784cf4","5e5d3aa2dc4d35003d784cf5","5e5d3aa2dc4d35003d784cf6","5e5d3aa2dc4d35003d784cf7","5e5d3aa2dc4d35003d784cf8","5e5d3aa2dc4d35003d784cf9","5e5d3aa2dc4d35003d784cfa","5e5d3aa2dc4d35003d784cfb","5e5d3aa2dc4d35003d784cfc","5e5d3aa2dc4d35003d784cfd","5e5d3aa2dc4d35003d784cfe","5e5d57ed1362cf0064910881","5e7a7ac40efab8003ae688c3"],"_id":"5e5d3aa2dc4d35003d784d9d","project":"57336fd5a6a9c40e00e13a0b","__v":2,"forked_from":"5c6c23e4735b81006177d0a4","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":9,"from_sync":false,"reference":false,"_id":"5e5d57ed1362cf0064910881","project":"57336fd5a6a9c40e00e13a0b","version":"5e5d3aa2dc4d35003d784d9d","createdAt":"2020-03-02T19:01:01.717Z","__v":0},"user":"5beb1b96bc2003003ecd645e","createdAt":"2020-03-02T18:04:23.387Z","__v":33,"parentDoc":null}

putMerchant Approve Transaction


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

transactionId:
string
either `transactionId` or `merchantTransactionId` <b>is required</b> <br />ID of the transaction to be approved/declined
merchantTransactionId:
string
either `transactionId` or `merchantTransactionId` <b>is required</b> <br /><br />merchant's transaction ID number for the transaction to be approved/declined

Documentation

The Merchant Approve Transaction request lets you approve or decline a transactions with invoice status of PENDING_MERCHANT_REVIEW.

Try it in the API Explorer

Request Content

Enter the transactionId or merchantTransactionId and the approveTransaction parameter into the request URL. 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

If approveTransaction is not included, true is assumed.

Query Parameters

Parameter Description
transactionId ID of the transaction to be approved/declined
merchantTransactionId merchant's transaction ID number for the transaction to be approved/declined
approveTransaction the merchant's approval descision
true = approve
false = decline

Response Details

If successful, the response HTTP status code is 204.
The response will be in MerchantApprovalResource and contain the following parameters:

Possible Responses

Case with transactionId with merchantTransactionId
Approve
auth-only with amount > 0 {
"transactionId": "38611602",
"transactionStatus": "Waiting"
}
{
"transactionId": "38611602",
"transactionStatus": "Waiting",
"merchantTransactionId": "merchantTransactionId122222"
}
auth-only with 0$
auth-capture
create PayPal
{
"transactionId": "38611602",
"transactionStatus": "Approved"
}
{
"transactionId": "38611602",
"transactionStatus": "Approved",
"merchantTransactionId": "merchantTransactionId122222"
}
create subscription
(regular or managed)
{
"subscriptionId": 39606170,
"transactionId": "38611602",
"transactionStatus": "Approved"
}
{
"subscriptionId": 39606170,
"transactionId": "38611602",
"transactionStatus": "Approved",
"merchantTransactionId": "merchantTransactionId122222"
}
Decline
all {
"transactionId": "38611592",
"transactionStatus": "Canceled"
}
{
"transactionId": "38611592",
"transactionStatus": "Canceled",
"merchantTransactionId": "merchantTransactionId122222"
}


Example

Request Example

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 '

Response Examples

{
	"transactionId": "38611602",
	"transactionStatus": "Approved"
}
{
	"transactionId": "38611602",
	"transactionStatus": "Approved",
	"merchantTransactionId": "merchantTransactionId122222"
}


API Explorer

To test a call, enter an existing transaction ID in the transactionId field. This automatically inserts the ID into the request URL. Leave the Body Content field empty.


User Information

Try It Out


put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}