The Merchant Approve Transaction request lets you approve or decline transactions with invoice status of PENDING_MERCHANT_REVIEW.
Send a test request
Go to API Explorer to send a test request to our sandbox environment and receive a response in real time.
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
Case | Examples |
---|---|
Approve | |
| with transactionId json { "transactionId": "38611602", "transactionStatus": "Waiting" } with merchantTransactionId json { "transactionId": "38611602", "transactionStatus": "Waiting", "merchantTransactionId": "merchantTransactionId122222" } |
| with transactionId json { "transactionId": "38611602", "transactionStatus": "Approved" } with merchantTransactionId json { "transactionId": "38611602", "transactionStatus": "Approved", "merchantTransactionId": "merchantTransactionId122222" } |
| with transactionId json { "subscriptionId": 39606170, "transactionId": "38611602", "transactionStatus": "Approved" } with merchantTransactionId json { "subscriptionId": 39606170, "transactionId": "38611602", "transactionStatus": "Approved", "merchantTransactionId": "merchantTransactionId122222" } |
Decline | |
| with transactionId json { "transactionId": "38611592", "transactionStatus": "Canceled" } with merchantTransactionId json { "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 or merchant transaction ID. This automatically inserts the ID into the request URL.