Auth Only is a request to check whether a credit card is valid and has the funds to complete a specific transaction (i.e. purchase). It does not actually run the charge on the card, but does temporarily hold the funds aside. Note that each credit card company will only hold the authorization for a limited period (for example, 3-10 days, depending on the credit card scheme).
Zero value auth for card validity checks
If you wish to check the validity of a card without authorizing any charge amount, simply enter 0 as the value for the
amount
property in this request.
Request Content
Send a cardTransaction object, with the following:
walletId
long required if using Visa Checkout
wallet
object required if using Apple Pay or Google Pay™ (refer to wallet)
amount
decimal required
vaultedShopperId
integer required if using a vaulted shopper
merchantTransactionId
string optional
softDescriptor
string optional
descriptorPhoneNumber
string optional
vendorsInfo
container optional applicable if using marketplace vendor(s) (refer to vendorsInfo)
cardHolderInfo
object required for LatAm local processing (refer to cardHolderInfo)
currency
string required
transactionFraudInfo
object optional (refer to transactionFraudInfo)
creditCard
object required if sending card data or if vaulted shopper has multiple cards.
Do not include if sending pfToken
or wallet
(refer to creditCard)
cardTransactionType
string required, value must be AUTH_ONLY
threeDSecure
object optional (refer to threeDSecure)
transactionMetaData
object optional (refer to transactionMetaData)
pfToken
string required if using Hosted Payment Fields or Secured Payment Collector
level3Data
object optional (refer to level3Data)
storeCard
boolean optional (refer to cardTransaction)
Response Details
If successful, the response HTTP status code is 200 OK.
The response contains the request properties plus these additions:
vaultedShopperId
processingInfo
fraudResultInfo
if fraud prevention is enabled
threeDSecure
if sending 3D Secure authentication data
transactionId
vendorsInfo
if using marketplace vendor(s)
level3Data
if sending Level 2/3 data
storeCard
if sending store card data
Examples
Request Examples
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"softDescriptor": "DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"transactionFraudInfo": {
"shopperIpAddress": "123.12.134.1",
"fraudSessionId": 1234,
"customerId": "121341",
"customerCreationDate": "2021-08-05",
"company": "BBBBB",
"shippingContactInfo": {
"zip": "02453",
"country": "US",
"firstName": "YY",
"lastName": "LL",
"city": "Juneau",
"address2": "Address2",
"address1": "Address1",
"state": "AL"
}
},
"creditCard": {
"expirationYear": "2023",
"securityCode": "837",
"expirationMonth": "02",
"cardNumber": "4263982640269299"
},
"cardTransactionType": "AUTH_ONLY"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"softDescriptor": "DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"transactionFraudInfo": {
"enterpriseSiteId": "DEFAULT",
"shopperIpAddress": "123.12.134.1",
"fraudSessionId": 1234,
"customerId": "121341",
"customerCreationDate": "2021-08-05",
"enterpriseUdfs": {"udf": [
{
"udfValue": "aaa",
"udfName": "ENT_UDF1"
},
{
"udfValue": "bbb",
"udfName": "ENT_UDF2"
}
]},
"company": "BBBBB",
"shippingContactInfo": {
"zip": "02453",
"country": "US",
"firstName": "YY",
"lastName": "LL",
"city": "Juneau",
"address2": "Address2",
"address1": "Address1",
"state": "AL"
}
},
"creditCard": {
"expirationYear": "2023",
"securityCode": "837",
"expirationMonth": "02",
"cardNumber": "4263982640269299"
},
"cardTransactionType": "AUTH_ONLY"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"vaultedShopperId": 20781033,
"softDescriptor": "DescTest",
"currency": "USD",
"cardTransactionType": "AUTH_ONLY"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"vaultedShopperId": 20769005,
"softDescriptor": "DescTest",
"currency": "USD",
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA"
},
"cardTransactionType": "AUTH_ONLY"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"softDescriptor": "DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"creditCard": {
"expirationYear": "2023",
"securityCode": "837",
"expirationMonth": "02",
"cardNumber": "4263982640269299"
},
"cardTransactionType": "AUTH_ONLY",
"transactionMetaData": {"metaData": [
{
"metaValue": 20,
"metaKey": "stateTaxAmount",
"metaDescription": "State Tax Amount"
},
{
"metaValue": 20,
"metaKey": "cityTaxAmount",
"metaDescription": "City Tax Amount"
},
{
"metaValue": 10,
"metaKey": "shippingAmount",
"metaDescription": "Shipping Amount"
}
]}
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"currency": "USD",
"merchantTransactionId": "cc-412",
"cardHolderInfo": {
"firstName": "Jane",
"lastName": "Smith",
"zip": "02453"
},
"creditCard": {
"expirationYear": "2023",
"securityCode": "837",
"expirationMonth": "02",
"cardNumber": 4263982640269299
},
"cardTransactionType": "AUTH_ONLY"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"walletId": 21,
"amount": 11,
"currency": "USD",
"cardTransactionType": "AUTH_ONLY"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"softDescriptor": "DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"creditCard": {
"expirationYear": "2023",
"encryptedCardNumber": "$bsjs_1_0_3$B23uuxq8drUwOYZm3wZi+Qm69V5GPEt8PEio+Edwcm8akczQSK7odgLQH/Au+VqOCsGspW1Q9mPyQIzGLSZLVToAQVfq5C1ld+2ogIIsDL32Hd6IojboLyVlYT1FvPQoDyz19K6N0CUHh5uk0kCLuHSUyjvoJH38ojHZifbJSm/7S5vAtiuC3BJt2z8k9nauQaAXkbyoAYwrS1yDpqOt2k2lGhKcmdQ4ImDR0RL8m8xig6sFrki9oqo3Mju/M5r7wXXVTf7TMtWiQbzdfREOxKUnviXJZpncdHqVjj5GvPYun2qgopKVKr8F5+yd19TVW2gvA1kXBkXonFL9159Gxg==$zckJgo2i8jXDiAHwVVHBKypXFnWqF2e+6luBkmtQQRKniDXyXaalRVKLtYscBaGd$W7Ojqk1Q2iOJVeGL39RAsZTtfup3f1deSzvxrvC9rXA=",
"encryptedSecurityCode": "$bsjs_1_0_3$MB1nBpok/YkuWPG1/7e6dyFFhDPHB8p8E9Yo+0YHHV+xkHuzFKr02wAnE8PJ8QCzWH+2ctXy5FN6wLKjwFrfTOgy0BJ9k9+NDEe8mhsu66wMlyc3lnwrbvMRCWN1O+5gUNCFExj7B0mDtf4gtxecXs74KZ5l5dbpGWdKUk5i7OewWyTqsONbn9taLfVBOwuIOy2Jgi4fx+yB8Q05KdZeHSNSBJh8H/47AUNAn5dM+d9iO6yGQB3obzEzzR3UtHlkGR52ZsgbbFh0JMm9lBM2ClgYM8jvmQjS9HX2ojt1fkbhuPEb1IY/M498a+1wDPpI4aMfDxO1lSpJneRSpY5k4g==$XaKq1NbPcS0iHy9N9jHekEIByHYS4G3wJXlC9EQjAGM=$BJn6X6mBYGUo8Eoq4RQz69gsi4Azl8jT973mNpG9Yuo=",
"expirationMonth": "07"
},
"cardTransactionType": "AUTH_ONLY"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"softDescriptor": "DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"cardTransactionType": "AUTH_ONLY",
"pfToken": "abcde12345**********"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"softDescriptor": "DescTest",
"vendorsInfo": {
"vendorInfo": [
{"vendorId": "514147"}
]
},
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"transactionFraudInfo": {
"shopperIpAddress": "123.12.134.1",
"fraudSessionId": 1234,
"company": "BBBBB",
"shippingContactInfo": {
"zip": 02453,
"country": "US",
"firstName": "YY",
"lastName": "LL",
"city": "Juneau",
"address2": "Address2",
"address1": "Address1",
"state": "AL"
}
},
"creditCard": {
"expirationYear": "2023",
"securityCode": "837",
"expirationMonth": "02",
"cardNumber": 4263982640269299
},
"cardTransactionType": "AUTH_ONLY"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"cardTransactionType": "AUTH_ONLY",
"softDescriptor": "DescTest",
"amount": 11.00,
"currency": "USD",
"wallet": {
"walletType": "APPLE_PAY",
"encodedPaymentToken": "ImRhdGEiOiJuY1AvRitIUy8zeG5bXhCMFd"
}
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"vaultedShopperId": 20769005,
"softDescriptor": "DescTest",
"currency": "USD",
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"securityCode": "837"
},
"cardTransactionType": "AUTH_ONLY"
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"cardTransactionType": "AUTH_ONLY",
"softDescriptor": "DescTest",
"amount": "11.00",
"currency": "USD",
"vaultedShopperId": "20769005",
"creditCard": {
"cardNumber": "4012000033330026",
"securityCode": "111",
"expirationMonth": "07",
"expirationYear": "2023"
}
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"amount": 11,
"softDescriptor": "DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"transactionFraudInfo": {
"shopperIpAddress": "123.12.134.1",
"fraudSessionId": 1234,
"company": "BBBBB",
"shippingContactInfo": {
"zip": 02453,
"country": "US",
"firstName": "YY",
"lastName": "LL",
"city": "Juneau",
"address2": "Address2",
"address1": "Address1",
"state": "AL"
}
},
"creditCard": {
"expirationYear": "2023",
"securityCode": "837",
"expirationMonth": "02",
"cardNumber": "4263982640269299"
},
"cardTransactionType": "AUTH_ONLY",
"storeCard": true
}'
curl -v -X POST https://sandbox.bluesnap.com/services/2/transactions \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=' \
-d '
{
"cardTransactionType": "AUTH_ONLY",
"softDescriptor": "DescTest",
"amount": 11.00,
"currency": "USD",
"wallet": {
"walletType": "GOOGLE_PAY",
"encodedPaymentToken": "ImRhdGEiOiJuY1AvRitIUy8zeG5bXhCMFd"
}
}'
Response Examples
{
"amount": 11,
"vaultedShopperId": 1234,
"processingInfo": {
"avsResponseCodeAddress": "M",
"processingStatus": "success",
"cvvResponseCode": "MA",
"avsResponseCodeName": "U",
"avsResponseCodeZip": "M"
},
"softDescriptor": "BLS*DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"fraudResultInfo": {"deviceDataCollector": "Y"},
"creditCard": {
"cardLastFourDigits": 9299,
"cardSubType": "CREDIT",
"cardType": "VISA",
"cardCategory": "CLASSIC"
},
"cardTransactionType": "AUTH_ONLY",
"transactionId": 38488222
}
{
"amount": 11,
"vaultedShopperId": 19549066,
"processingInfo": {
"avsResponseCodeAddress": "M",
"processingStatus": "success",
"avsResponseCodeName": "U",
"avsResponseCodeZip": "M"
},
"softDescriptor": "BLS*DescTest",
"currency": "USD",
"creditCard": {
"cardLastFourDigits": 9299,
"cardSubType": "CREDIT",
"cardType": "VISA",
"cardCategory": "CLASSIC"
},
"cardTransactionType": "AUTH_ONLY",
"transactionId": 38488224
}
{
"amount": 11,
"vaultedShopperId": 1234,
"processingInfo": {
"avsResponseCodeAddress": "U",
"processingStatus": "success",
"cvvResponseCode": "MA",
"avsResponseCodeName": "U",
"avsResponseCodeZip": "U"
},
"softDescriptor": "BLS*DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"avsResponseCode": "G",
"currency": "USD",
"creditCard": {
"cardLastFourDigits": 9299,
"cardSubType": "CREDIT",
"cardType": "VISA",
"cardCategory": "CLASSIC"
},
"cardTransactionType": "AUTH_ONLY",
"transactionMetaData": {"metaData": [
{
"metaValue": 20,
"metaKey": "stateTaxAmount",
"metaDescription": "State Tax Amount"
},
{
"metaValue": 20,
"metaKey": "cityTaxAmount",
"metaDescription": "City Tax Amount"
},
{
"metaValue": 10,
"metaKey": "shippingAmount",
"metaDescription": "Shipping Amount"
}
]},
"transactionId": 38497126
}
{
"cardTransactionType": "AUTH_ONLY",
"merchantTransactionId": "cc-412",
"transactionId": "1035748005",
"softDescriptor": "BLS*default_descriptor",
"amount": 11,
"usdAmount": 11,
"currency": "USD",
"cardHolderInfo": {
"firstName": "Jane",
"lastName": "Smith",
"zip": "02453"
},
"vaultedShopperId": 28911419,
"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"
},
"fraudResultInfo": {}
}
{
"amount": 11,
"vaultedShopperId": 123,
"processingInfo": {
"processingStatus": "success",
"cvvResponseCode": "NC"
},
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name"
},
"currency": "USD",
"creditCard": {
"cardLastFourDigits": 9299,
"cardSubType": "CREDIT",
"cardType": "VISA",
"cardCategory": "CLASSIC"
},
"cardTransactionType": "AUTH_ONLY",
"transactionId": 1011702615
}
{
"amount": 11,
"vaultedShopperId": 1234,
"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"
},
"currency": "USD",
"creditCard": {
"cardLastFourDigits": 1111,
"cardSubType": "CREDIT",
"cardType": "VISA",
"cardCategory": "CLASSIC"
},
"cardTransactionType": "AUTH_ONLY",
"transactionId": 38504158
}
{
"amount": 11,
"vaultedShopperId": 1234,
"processingInfo": {
"avsResponseCodeAddress": "M",
"processingStatus": "success",
"cvvResponseCode": "MA",
"avsResponseCodeName": "U",
"avsResponseCodeZip": "M"
},
"softDescriptor": "BLS*DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"creditCard": {
"cardLastFourDigits": 9299,
"cardSubType": "CREDIT",
"cardType": "VISA",
"cardCategory": "CLASSIC"
},
"cardTransactionType": "AUTH_ONLY",
"transactionId": 38486450
}
{
"cardTransactionType": "AUTH_ONLY",
"vendorInfo": {
"vendorId": 514147,
"commissionPercent": 20
},
"vendorsInfo": {
"vendorInfo": [
{
"vendorId": 514147,
"commissionPercent": 20
}
]
},
"transactionId": "1015593705",
"softDescriptor": "BLS*DescTest",
"amount": 11,
"currency": "USD",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"vaultedShopperId": 22324271,
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "GOLD"
},
"processingInfo": {
"processingStatus": "success",
"cvvResponseCode": "MA",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
}
}
{
"cardTransactionType": "AUTH_ONLY",
"transactionId": 38486450,
"softDescriptor": "BLS*DescTest",
"amount": 11,
"currency": "USD",
"vaultedShopperId": 1234,
"wallet": {
"walletType": "APPLE_PAY",
"billingContactInfo": {
"firstName": "John",
"lastName": "Doe",
"address1": "61 Main St.",
"city": "New York",
"state": "NY",
"zip": "02453",
"country": "us"
},
"tokenizedCard": {
"dpanExpirationMonth": "7",
"dpanExpirationYear": "2019",
"dpanLastFourDigits": "0010",
"cardLastFourDigits": "1471",
"cardType": "MASTERCARD",
"cardSubType": "DEBIT",
"binCategory": "CONSUMER",
"cardRegulated": "N",
"issuingCountryCode": "us"
}
},
"processingInfo": {
"processingStatus": "success",
"cvvResponseCode": "MA",
"avsResponseCodeZip": "M",
"avsResponseCodeAddress": "M",
"avsResponseCodeName": "U"
}
}
{
"cardTransactionType": "AUTH_ONLY",
"transactionId": "1012751945",
"softDescriptor": "BLS*DescTest",
"amount": 11,
"currency": "USD",
"vaultedShopperId": 20769005,
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "CLASSIC"
},
"processingInfo": {
"processingStatus": "success",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
}
}
{
"cardTransactionType": "AUTH_ONLY",
"transactionId": "1014303431",
"softDescriptor": "BLS*DescTest",
"amount": 11,
"currency": "USD",
"vaultedShopperId": 20769005,
"creditCard": {
"cardLastFourDigits": "0026",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "CLASSIC"
},
"processingInfo": {
"processingStatus": "success",
"cvvResponseCode": "ND",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
}
}
{
"cardTransactionType": "AUTH_ONLY",
"transactionId": "1016888481",
"softDescriptor": "BLS*DescTest",
"amount": 11,
"currency": "USD",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "123456"
},
"vaultedShopperId": 22730353,
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "GOLD"
},
"processingInfo": {
"processingStatus": "success",
"cvvResponseCode": "MA",
"avsResponseCodeZip": "U",
"avsResponseCodeAddress": "U",
"avsResponseCodeName": "U"
}
}
{
"cardTransactionType": "AUTH_ONLY",
"transactionId": "1012751937",
"softDescriptor": "BLS*DescTest",
"amount": 11,
"currency": "USD",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"vaultedShopperId": 21289371,
"creditCard": {
"cardLastFourDigits": "9299",
"cardType": "VISA",
"cardSubType": "CREDIT",
"cardCategory": "CLASSIC"
},
"processingInfo": {
"processingStatus": "success"
}
}
{
"cardTransactionType": "AUTH_ONLY",
"transactionId": "1012751937",
"softDescriptor": "BLS*DescTest",
"amount": 11,
"currency": "USD",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453",
"country": "us"
},
"vaultedShopperId": 21289371,
"wallet": {
"walletType": "GOOGLE_PAY",
"billingContactInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453",
"country": "us"
},
"tokenizedCard": {
"cardLastFourDigits": "1111",
"cardType": "VISA",
"cardSubType": "CREDIT",
"dpanExpirationMonth": "9",
"dpanExpirationYear": "2025",
"dpanLastFourDigits": "2222"
}
},
"processingInfo": {
"processingStatus": "success"
}
}
{
"amount": 11,
"vaultedShopperId": 1234,
"processingInfo": {
"avsResponseCodeAddress": "M",
"processingStatus": "success",
"cvvResponseCode": "MA",
"authorizationCode": "654321",
"avsResponseCodeName": "U",
"avsResponseCodeZip": "M"
},
"softDescriptor": "BLS*DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"fraudResultInfo": {"deviceDataCollector": "Y"},
"creditCard": {
"cardLastFourDigits": 9299,
"cardSubType": "CREDIT",
"cardType": "VISA",
"cardCategory": "CLASSIC"
},
"cardTransactionType": "AUTH_ONLY",
"transactionId": 38488222
}
Example Descriptions
Basic Auth Only with fraud info
This example shows a basic Auth Only request, containing the minimum required fields for a one-time payment using a credit card. It includes the required fraud info in thetransactionFraudInfo
property within the cardTransaction object. Refer to transactionFraudInfo.
An additional example with fraud info is above. Complete fraud info is supported only for merchants who have signed up for the Complete-level fraud service from BlueSnap. Refer to Fraud prevention.
Auth Only with vaulted shopper
To perform an Auth Only request with an existing vaulted shopper, you'll need to include the vaultedShopperId
property within the cardTransaction object. When specifying a credit card for a vaulted shopper, you must include the cardLastFourDigits
and cardType
properties within the creditCard object.
Above are two vaulted shopper examples. The first is with a vaulted shopper who only has one credit card, so there is no need to specify which credit card to charge. The second is with a vaulted shopper who has multiple cards, so the request must indicate which card to charge.
Auth Only with metadata
To send metadata for the transaction, you'll need to include the transactionMetaData
property within the cardTransaction object. You can include up to 20 metadata key-value pairs in each transactionMetaData
property. Refer to transactionMetaData.
Above is an example of a request with metadata, including state tax, city tax, and the shipping amount.
Auth Only with Merchant Transaction ID
You may wish to assign your own ID to each transaction, for example in order to track the transactions in your own internal systems. To do this, you'll need to include the merchantTransactionId
property within the cardTransaction object.
Above is an example of a request that includes a Merchant Transaction ID (MTI), along with the minimum required fields for a one-time payment using a credit card.
Auth Only with wallet ID
If the shopper is paying via Visa Checkout, you can include the walletId
in the request. For details, refer to Visa Checkout Guide.
Above is an example of a request with a Masterpass wallet.
Note:
When you include the wallet ID in the request, a vaulted shopper will be automatically created and the vaulted shopper ID will be returned to you in the response.
If you prefer to save the wallet information in an existing shopper, it is recommended to instead send a Create Vaulted Shopper request with the wallet ID and then use that vaulted shopper in your Auth Only request.
Auth Only with encrypted credit card
Your PCI compliance requirements and API permission level may require that you send credit card data in encrypted format only. To do this, you'll need to include the encryptedCardNumber
and encryptedSecurityCode
properties within the cardTransaction object.
Above is an example of a request with an encrypted credit card number.
Auth Only with Hosted Payment Fields token
If you are using BlueSnap's Hosted Payment Fields, you can process the shopper's payment using the information from the Hosted Payment Fields by including the token within the pfToken
property in your request.
Above is an example of a request with the Hosted Payment Fields token.
Note that the response will look like a regular response for a credit card, with the card's last four digits and card type.
Auth Only with Vendors Info
This example shows an Auth Only request with a marketplace vendor. If you are a Marketplace Merchant and you would like to link one or more vendors to the transaction in the authorization step, include vendorsInfo
in the body. For more details, refer to the Marketplace Guide.
Auth Only with Apple Pay
This example shows an Auth Only request with Apple Pay. In the request, include walletType
= APPLE_PAY and encodedPaymentToken
inside wallet
. Instructions on how to extract the encodedPaymentToken
can be found in the Apple Pay Guide.
Note:
To test Apple Pay, follow the steps in the Apple Pay Guide. The API Explorer does not support Apple Pay testing.
Auth Only with vaulted shopper & CVV
You may wish to collect CVV on your checkout form from all your shoppers – even from returning shoppers. One reason you might choose to do this is that transactions with CVV generally result in higher success rates.
Above is an example of sending CVV in a transaction request involving a returning shopper.
Include vaultedShopperId
and CVV in the request as in the example.
Auth Only with vaulted shopper & new card
This example shows an Auth Only request with a vaulted shopper and a new card. If you include vaultedShopperId
and a new card in the request, the shopper's card will be charged and the card details will be added to the shopper.
Auth Only with store card approval
This example shows an Auth Only request with the storeCard
value set. You will want to use this value to define if the shopper has approved storing their credit card information for future use. The default value is set to true. If set to false, the credit card data will not be stored.
Auth Only with Google Pay
This example shows an Auth Only request with Google Pay. In the request, include walletType
= GOOGLE_PAY and encodedPaymentToken
inside wallet
. Instructions on how to extract the encodedPaymentToken
can be found in the Google Pay Guide.
Back to Top
API Explorer
To test out a call, enter the request content below and then click Try it!
Tip
Use the JSON code below as a starting point. You can enter different parameters and test credit card numbers to see how your test scenario would work. The request headers, including authorization, are already built in for you in this test area, so you should not include them here.
{
"amount": 11,
"softDescriptor": "DescTest",
"cardHolderInfo": {
"firstName": "test first name",
"lastName": "test last name",
"zip": "02453"
},
"currency": "USD",
"creditCard": {
"expirationYear": 2023,
"securityCode": 837,
"expirationMonth": "02",
"cardNumber": 4263982640269299
},
"cardTransactionType": "AUTH_ONLY"
}