Retrieve is a request that gets details about a past transaction, such as the transaction type, amount, cardholder or vaulted shopper, credit card, processing info, and so on.
Note: If you are using the API + Hosted Page Hybrid solution, this can also return transactions created in Hosted Payment Pages.
Request Content
No content is required in the request body. Enter the relevant IDs in the request URL, as follows:
Retrieve based on Transaction ID
Enter the transactionId
into the web service URL, in the format:
services/2/transactions/{transactionId}
For example:
services/2/transactions/1011582369
Retrieve based on Merchant Transaction ID and Merchant ID
Enter the merchantTransactionId
and merchantId
into the web service URL, in the format:
services/2/transactions/{merchantTransactionId},{merchantId}
For example:
services/2/transactions/3,456
Response Details
If successful, the response HTTP status code is 200 OK.
The response contains the retrieved cardTransaction object.
If you passed metadata in the original transaction request, this metadata will also be retrieved.
Examples
Request Examples
curl -v -X GET https://sandbox.bluesnap.com/services/2/transactions/1035512245 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
curl -v -X GET https://sandbox.bluesnap.com/services/2/transactions/3,456 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
Response Examples
{
"cardTransactionType": "AUTH_CAPTURE",
"transactionId": "1035512245",
"softDescriptor": "BLS*DescTest",
"amount": 11,
"usdAmount": 11,
"openToCapture": 0,
"currency": "USD",
"transactionApprovalDate": "09/29/2020",
"transactionApprovalTime": "14:00:16",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"vaultedShopperId": 28855619,
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "PLATINUM",
"binCategory": "CONSUMER",
"cardRegulated": "N",
"issuingBank": "ALLIED IRISH BANKS PLC",
"issuingCountryCode": "ie"
},
"processingInfo": {
"processingStatus": "SUCCESS",
"cvvResponseCode": "MA",
"authorizationCode": "02453",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
}
}
{
"cardTransactionType": "AUTH_CAPTURE",
"transactionId": "1035512711",
"softDescriptor": "BLS*DescTest",
"amount": 11,
"usdAmount": 11,
"openToCapture": 0,
"currency": "USD",
"transactionApprovalDate": "09/29/2020",
"transactionApprovalTime": "14:02:13",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"vaultedShopperId": 28855625,
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "PLATINUM",
"binCategory": "CONSUMER",
"cardRegulated": "N",
"issuingBank": "ALLIED IRISH BANKS PLC",
"issuingCountryCode": "ie"
},
"transactionMetaData": {
"metaData": [
{
"metaKey": "shippingAmount",
"metaValue": "10",
"metaDescription": "Shipping Amount"
},
{
"metaKey": "cityTaxAmount",
"metaValue": "20",
"metaDescription": "City Tax Amount"
},
{
"metaKey": "stateTaxAmount",
"metaValue": "20",
"metaDescription": "State Tax Amount"
}
]
},
"processingInfo": {
"processingStatus": "SUCCESS",
"cvvResponseCode": "MA",
"authorizationCode": "02453",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
}
}
{
"cardTransactionType": "REFUND",
"merchantTransactionId": "12345678901234567890123456789012345678901234567890",
"transactionId": "38417916",
"softDescriptor": "BLS*DescTest1234567",
"amount": 99.99,
"currency": "EUR",
"usdAmount": 117.43,
"transactionApprovalDate": "09/29/2020",
"transactionApprovalTime": "13:08:47",
"cardHolderInfo": {
"firstName": "John",
"lastName": "Doe",
"country": "fr",
"zip": "756543",
"phone": "1413555666"
},
"vaultedShopperId": 19490030,
"creditCard": {
"cardLastFourDigits": "1111",
"cardType": "VISA"
},
"processingInfo": {
"processingStatus": "SUCCESS",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
},
"refunds": {
"refund": [
{
"amount": 55.55,
"currency": "EUR",
"date": "2020-09-30"
},
{
"amount": 44.44,
"currency": "EUR",
"date": "2030-10-13"
}
]
}
}
{
"amount": 11,
"usdAmount": 11,
"currency": "USD",
"transactionApprovalDate": "09/29/2020",
"transactionApprovalTime": "13:08:47",
"vaultedShopperId": 1234,
"vendorinfo": {
"vendorId": 397808,
"commissionPercent": 30
},
"merchantTransactionId": 3,
"processingInfo": {
"avsResponseCodeAddress": "U",
"processingStatus": "success",
"cvvResponseCode": "ND",
"avsResponseCodeName": "U",
"avsResponseCodeZip": "U"
},
"softDescriptor": "BLS*DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"creditCard": {
"cardLastFourDigits": "0026",
"cardSubType": "CREDIT",
"cardType": "VISA"
},
"cardTransactionType": "AUTH_ONLY",
"transactionId": 1011582369
}
Example Descriptions
Retrieve based on Transaction ID
This is a retrieval based on the transactionId
, which is the ID of the relevant transaction (received in the response for the original transaction).
Retrieve based on Merchant Transaction ID and Merchant ID
This is a retrieval based on the merchantTransactionId
and merchantId
. It is applicable to merchants who pass their own Merchant Transaction IDs with each transaction.
Response for transaction with refunds
If one or more refunds (including partial refunds) have been applied to the transaction, the cardTransactionType
value will be REFUND. The refund details appear in the refunds object.
Back to Top
API Explorer (for request based on Transaction ID)
To test out a call, enter an existing transaction ID (e.g. 1011582369) in the transactionId
field. This will automatically insert the ID into the request URL. Leave the Body Content field empty.