{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/transactions/approval","auth":"optional","settings":"","results":{"codes":[{"code":"","language":"text"}]},"method":"put","examples":{"codes":[]},"params":[{"name":"transaction-id","type":"string","default":"","desc":"either `transaction-id` or `merchant-transaction-id` is <b>required</b><br />ID of the transaction to be approved/declined","required":false,"in":"path","ref":"","_id":"57b6ec9e49a12a0e007b469d"},{"name":"merchant-transaction-id","type":"string","default":"","desc":"either `transaction-id` or `merchant-transaction-id` is <b>required</b><br />merchant's transaction ID number for the transaction to be approved/declined","required":false,"in":"path","ref":"","_id":"5e5d698e2d9cf700347de893"},{"name":"approve-transaction","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":"path","ref":"","_id":"5ed568a3ba7e3a06e5b736cd"}]},"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 `transaction-id` or `merchant-transaction-id`.  \n\nFor example: \n\n>`services/2/transactions/approval?transaction-id=38612140&approve-transaction=true`\n\nOR\n\n>`services/2/transactions/approval?merchant-transaction-id=MyUniqueMTI&approve-transaction=true`\n\n**Note:** If `approve-transaction` is not included, `true` is assumed.\n\n###Response Details\nIf successful, the response HTTP status code is `200 OK` and will include the following parameters:\n\n**Possible Responses**\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Case\",\n    \"0-0\": \"**Approve**\",\n    \"1-0\": \"* Auth Only (with amount > 0)\",\n    \"1-1\": \"with `transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Waiting</transaction-status>\\n</merchant-approval>\\n```\\n\\nwith `merchant-transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Waiting</transaction-status>\\n    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>\\n</merchant-approval>\\n```\",\n    \"h-1\": \"Examples\",\n    \"2-0\": \"* Auth Only (with amount = 0)\\n* Auth Capture \\n* Create PayPal Transaction\\n* Create Local Bank Transfer Transaction\",\n    \"3-0\": \"* Create Subscription\\n* Create Merchant-Managed Subscription\",\n    \"4-0\": \"**Decline**\",\n    \"5-0\": \"* Create Local Bank Transfer Transaction\",\n    \"6-0\": \"* all others\",\n    \"2-1\": \"with `transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Approved</transaction-status>\\n</merchant-approval>\\n```\\n\\nwith `merchant-transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Approved</transaction-status>\\n    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>\\n</merchant-approval>\\n```\",\n    \"3-1\": \"with `transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <subscription-id>39606170</subscription-id>\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Approved</transaction-status>\\n</merchant-approval>\\n```\\n\\nwith `merchant-transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <subscription-id>39606170</subscription-id>\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Approved</transaction-status>\\n    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>\\n</merchant-approval>\\n```\",\n    \"5-1\": \"with `transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Short OrderContext Declined By Vendor &#x28;Refund Needed&#x29;</transaction-status>\\n</merchant-approval>\\n```\\n\\nwith `merchant-transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Short OrderContext Declined By Vendor &#x28;Refund Needed&#x29;</transaction-status>\\n    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>\\n</merchant-approval>\\n```\",\n    \"6-1\": \"with `transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Canceled</transaction-status>\\n</merchant-approval>\\n```\\n\\nwith `merchant-transaction-id`\\n```xml\\n<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Canceled</transaction-status>\\n    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>\\n</merchant-approval>\\n```\"\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?transaction-id=38612140&approve-transaction=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?transaction-id=38612140&approve-transaction=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\": \"<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Approved</transaction-status>\\n</merchant-approval>\",\n      \"language\": \"xml\",\n      \"name\": \"Response:  200 OK with Transaction ID\"\n    },\n    {\n      \"code\": \"<merchant-approval xmlns=\\\"http://ws.plimus.com\\\">\\n    <transaction-id>38611602</transaction-id>\\n    <transaction-status>Approved</transaction-status>\\n    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>\\n</merchant-approval>\",\n      \"language\": \"xml\",\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 `transaction-id` field. This automatically inserts the ID into the request URL.","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5ed5174637c3c607440c0a36","project":"57336fd5a6a9c40e00e13a0b","version":{"version":"8976-XML","version_clean":"8976.0.0-XML","codename":"3.34.0 Release","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5ed5174637c3c607440c098b","5ed5174637c3c607440c098c","5ed5174637c3c607440c098d","5ed5174637c3c607440c098e","5ed5174637c3c607440c098f","5ed5174637c3c607440c0990","5ed5174637c3c607440c0991","5ed5174637c3c607440c0992","5ed5174637c3c607440c0993","5ed5174637c3c607440c0994","5ed5174637c3c607440c0995","5ed5174637c3c607440c0996","5ed5174637c3c607440c0997","5ed5174637c3c607440c0998","5ed5174637c3c607440c0999","5ed5174637c3c607440c099a","5ed5174637c3c607440c099b","5ed5174637c3c607440c099c"],"_id":"5ed5174637c3c607440c0a3c","project":"57336fd5a6a9c40e00e13a0b","__v":0,"forked_from":"5e5d3a02fb6fb40050cb3c15","createdAt":"2018-04-24T15:24:22.608Z","releaseDate":"2018-04-24T15:24:22.608Z"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Fraud Review","slug":"fraud","order":10,"from_sync":false,"reference":false,"_id":"5ed5174637c3c607440c099b","project":"57336fd5a6a9c40e00e13a0b","version":"5ed5174637c3c607440c0a3c","createdAt":"2020-03-02T20:01:10.436Z","__v":0},"user":"5beb1b96bc2003003ecd645e","createdAt":"2020-03-02T20:10:58.520Z","__v":26,"parentDoc":null}

putMerchant Approve Transaction


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

transaction-id:
string
either `transaction-id` or `merchant-transaction-id` is <b>required</b><br />ID of the transaction to be approved/declined
merchant-transaction-id:
string
either `transaction-id` or `merchant-transaction-id` is <b>required</b><br />merchant's transaction ID number for the transaction to be approved/declined
approve-transaction:
booleantrue
Set to `true` to approve the transaction or to `false` to decline the transaction. Default value is `true`.

Documentation

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

Try it in the API Explorer

Request Content

The request must include either the transaction-id or merchant-transaction-id.

For example:

services/2/transactions/approval?transaction-id=38612140&approve-transaction=true

OR

services/2/transactions/approval?merchant-transaction-id=MyUniqueMTI&approve-transaction=true

Note: If approve-transaction is not included, true is assumed.

Response Details

If successful, the response HTTP status code is 200 OK and will include the following parameters:

Possible Responses

Case
Examples

Approve

  • Auth Only (with amount > 0)

with transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Waiting</transaction-status>
</merchant-approval>

with merchant-transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Waiting</transaction-status>
    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>
</merchant-approval>
  • Auth Only (with amount = 0)
  • Auth Capture
  • Create PayPal Transaction
  • Create Local Bank Transfer Transaction

with transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Approved</transaction-status>
</merchant-approval>

with merchant-transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Approved</transaction-status>
    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>
</merchant-approval>
  • Create Subscription
  • Create Merchant-Managed Subscription

with transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <subscription-id>39606170</subscription-id>
    <transaction-id>38611602</transaction-id>
    <transaction-status>Approved</transaction-status>
</merchant-approval>

with merchant-transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <subscription-id>39606170</subscription-id>
    <transaction-id>38611602</transaction-id>
    <transaction-status>Approved</transaction-status>
    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>
</merchant-approval>

Decline

  • Create Local Bank Transfer Transaction

with transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Short OrderContext Declined By Vendor &#x28;Refund Needed&#x29;</transaction-status>
</merchant-approval>

with merchant-transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Short OrderContext Declined By Vendor &#x28;Refund Needed&#x29;</transaction-status>
    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>
</merchant-approval>
  • all others

with transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Canceled</transaction-status>
</merchant-approval>

with merchant-transaction-id

<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Canceled</transaction-status>
    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>
</merchant-approval>


Example

Request Example

curl -v -X PUT https://sandbox.bluesnap.com/services/2/transactions/approval?transaction-id=38612140&approve-transaction=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?transaction-id=38612140&approve-transaction=false \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \ 
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '

Response Examples

<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Approved</transaction-status>
</merchant-approval>
<merchant-approval xmlns="http://ws.plimus.com">
    <transaction-id>38611602</transaction-id>
    <transaction-status>Approved</transaction-status>
    <merchant-transaction-id>MerchantTransactionID122222</merchant-transaction-id>
</merchant-approval>


API Explorer

To test a call, enter an existing transaction ID in the transaction-id field. This automatically inserts the ID into the request URL.


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 }}