The Offer Response
This page describes the Offer object that was received from the requesting offer API call.
To learn how to request an offer from Hoox, please read requesting offers from Hoox API call.
The Offer Object
The Offer object is a POJO (Javascript object) representing an offer to be displayed to the user. Here's an example of an offer object:
{
"numberOfInstallments": 1,
"maxNumberOfInstallments": 12,
"name": "Free Shipping",
"description": "Pay with MasterCard card and get free shipping.",
"localizedDescription": "Paga con la tarjeta MasterCard y obtén envío gratis.",
"currencyCode": "USD",
"value": "20",
"hooxType": "freeShipping",
"campaignId": "12345678",
"images": {
"dark": "https://www.offerBanner.com/dark",
"light": "https://www.offerBanner.com/ligth",
"colored": "https://www.offerBanner.com/color",
"kiosk" : "https://www.offerBanner.com/kiosk",
"terminal" : "https://www.offerBanner.com/terminal",
"web" : "https://www.offerBanner.com/web",
},
"date": "2023-01-04T10:27:12.628Z",
"hooxReference": "href123456",
"requestId": "reid12345",
"branchTransactionId": "btid12345",
"postTransactionImages": {
"dark": "https://www.postTransactionImage.com/dark",
"light": "https://www.postTransactionImage.com/light",
"colored": "https://www.postTransactionImage.com/color",
"kiosk" : "https://www.postTransactionImage.com/kiosk",
"terminal" : "https://www.postTransactionImage.com/terminal",
},
"postTransactionDescription" : "Redeem your cashback at www.cashback.online"
}
numberOfInstallments
: number
The minimum number of installments granted to the customer, if applicable.
maxNumberOfInstallments
: number
The maximum number of installments granted to the user, if applicable.
name
: string
The name of the offer.
description
: string
The description of the offer, in english.
localizedDescription
: string
The localized description of the offer, if applicable.
currencyCode
: string
The currency code in which the offer's value is specified.
value
: number
The value of the offer in terms of the specified currency.
hooxType
: string
The type of the offer, such as "Free Shipping", "Percentage Based" , "Fixed Value" etc.
campaignId
: string
The campaign that the offer belongs to.
images
: Object
An object containing the banner urls. The values are the url of the image to be presented to the user:
dark - a url to a dark background banner.
light - a url to a light background banner.
colored - a url to a colored background banner.
kiosk - a url to the kiosk size banner.
terminal - a url to the terminal size banner.
date
: Date
The date in which the offer was issued.
hooxReference
: string
A string representing the Hoox reference id. This id is unique and must be kept by the merchants to be passed to ReportTransaction function later on.
requestId
: string
A string representing the request id as it was listed by Hoox. This id is unique and must be kept by the merchants to be passed to ReportTransaction function later on.
branchTransactionId
: string
The merchant's transaction id that was sent in the OfferRequest payload. This id must be kept by the merchants to be passed to ReportTransaction function later on.
postTransactionImages
: Object
An object containing the post transaction banner to be presented to the buyer post purchase. Only applicable for some offers.
postTransactionDescription
: string
A string containing the message to be presented to the user post purchase, if the validationRequest was validated (meaning that the target card was correct and the reward should be presented to the user).
If the customer accepted the offer, the merchant should report a transaction to Hoox using the Reporting transaction to Hoox API call. Merchants should keep the
hooxReference
andrequestId
since they are to be sent later in the report transaction API call.
Last updated