Retrieve

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.


📘

Tip

You can test out a request that hits our sandbox in real-time. Follow the instructions here to use the "Try It!" feature on the right side.

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.

Back to Top


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
}

Back to Top

API Explorer

To test out a basic API request, click the "Try It!" button in the right-hand column to test using the default, pre-populated sample values. To test with your own values, edit the parameter fields below. You'll see them populate in the right-hand column and you can click the "Try It!" button to submit your test request and see a response.

Enter an existing transaction ID (e.g. 1011582369) in the transactionId field. This will automatically insert the ID into the request URL.

Language
Authentication
Header
Click Try It! to start a request and see the response here!