Product widget JWT structure
The <JWT> must contain the encoded and signed content required to create the checkout. The content (before being encoded and signed) should have the following JSON format:
{
"iss": "<MERCHANT_ID>",
"sub": 'Merchant',
"iat": "<CURRENT_TIMESTAMP>",
"data": {
"currency": "GBP",
"merchantPrice": {
"valueBeforeTax": <ITEM_N/MERCHANT_PRICE/VALUE_BEFORE_TAX>,
"valueAfterTax": <ITEM_N/MERCHANT_PRICE/VALUE_AFTER_TAX>,
"taxValue": <ITEM_N/MERCHANT_PRICE/TAX_VALUE>,
"taxPercentage": <ITEM_N/MERCHANT_PRICE/TAX_PERCENTAGE>
},
"variant": {
"reference": "<ITEM_N/VARIANT/REFERENCE>"
}
}
}Field details
iss
String
Required. This should contain the merchant ID, which will be provided to the merchant ahead of time
iat
Integer
Required. This should be the timestamp when the payload is generated following the UNIX epoc time format
Data type
merchantReference
String
Required. Merchant reference for the checkout
merchantPrice
Required. Refer to the Merchant price type for more info on its structure.
Merchant price type
valueBeforeTax
Float
Required. Merchant price value before tax
valueAfterTax
Float
Required. Merchant price value after tax
taxPercentage
Float
Required. Tax percentage associated with the merchant price
Variant type
reference
String
Required. Merchant reference that identifies uniquely the variant
Encode and sign payload content
To encode and sign the payload content the following is required:
Signing algorithm
Signing key
Last updated
Was this helpful?