3. Hash Validation Batch Request
This page describes the Hoox Validate Hashes Batch Request API call.
Overview
Use this API call to get the reward, if granted, and present it to the buyer.
This API call should be sent right after the buyer has completed a successful transaction.
In some cases, this API call can be used to send multiple validation requests as a batch in a single operation. If the hashes are validated, Hoox creates a transaction for each valid hash and returns the reward data. No further API calls are required.
When Should You Send This Call
After the buyer has completed a successful transaction with the merchant.
Sendone or multiple hash validation requests in a single call. Used to make sure the user payed with the promoted credit card after a successful transaction was made with the merchant. If seccessful, a transaction with Hoox is created so no further API calls are needed.
Use this call in a cashBack, giftCard, free shipping, store credits or coupon offers, where there is no need to make decsicions during the payment flow.
Payload to send in the Validate Hashes batch request body. this request is sent after the buyer has completed their purchase. The last 4 digits can be sent in plain text under the key cardDigits or after hashed using the Hoox encryptor library or service, under the key hashedDigits.
The merchant ID provided by Hoox.
mid@FdnU121922
The branch ID provided by Hoox.
is@FdnU121311
The API Key provided by Hoox.
bc@ut654!
The merchant's store name. Will reflect in Hoox reports.
Times Square
The Key Policy key provided by Hoox.
hkp254768901
POST /validatehashes/batch HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 385
{
"merchantId": "mid@FdnU121922",
"branchId": "is@FdnU121311",
"apiKey": "bc@ut654!",
"storeName": "Times Square",
"keyPolicy": "hkp254768901",
"data": [
{
"userHashes": [
"mcBne!T$n&Ya"
],
"appId": "abd&6hnbba54",
"hashedDigits": "a3412KuIass12",
"cardDigits": "1234",
"cardIssuer": "Mastercard",
"cardBrand": "Citi Double Cash",
"cardBin": "123456",
"requestId": "so367i22d",
"branchTransactionId": "lpid24500312"
}
]
}
{
"message": "Batch Validation Completed",
"data": [
{
"hashes": [
"mcBne!T$n&Ya"
],
"hooxReference": "hr563Ads45",
"hooxValidationId": "aU1b6g87",
"validated": true,
"transactionConfirmationId": "abRtxM6a",
"cardIssuer": "Mastercard",
"cardBrand": "Citi Double Cash",
"result": "matched",
"reward": {
"name": "Free Shipping",
"description": "Pay with Master Card and get free shipping",
"rewardCode": "Bas5gT5",
"rewardType": "freeShipping",
"rewardValue": 20,
"transactionId": "scy67g4Url",
"bannerUrls": {
"web": "www.images.com/banner"
},
"imageUrl": "www.images.com/image",
"linkUrl": "www.rewardLink.com",
"queryUrl": "www.rewards.hooxpay.com",
"pinCode": "",
"currencyCode": "USD",
"currencySign": "$",
"localizedDescriptions": {
"en": "Thank you for using Master Card. Shipping is on us!"
}
}
}
]
}
No further API calls are needed :)
Last updated