Authentication
Authentication requires generating a hashed message authentication code (HMAC-SHA256).
A signature is created by using a sorted string of all parameters in the request (except for api_key, signature, product_description, preferred_product_type, and additional_dataparameters) with the format “{PARAMETER}={value}&” . Parameter key should be upper-cased and value is provided as is.
Example
{
"amount": "300.00",
"api_key": "IHEu22iGjmDokj72aCRVl5Ol",
"success_url": "http://www.supplier.com/success/",
"failure_url": "http://www.supplier.com/failure/",
"preferred_product_type": "paylater",
"currency": "GBP",
"order_reference": "26352",
"signature": "429b5cc0ebb3da57fb55992757c36377f42e9df8672971befa772b99124c2923",
"first_name": "John",
"last_name": "Smith",
"product_description": [
{
"item": "Pirelli Cinturato P7 Tyre",
"quantity": "2",
"price": "150.00"
},
{
"item": "Pirelli Cinturato P8 Tyre",
"quantity": "1",
"price": "150.00"
}
],
"email": "[email protected]",
"product_id": "4",
"mobile": "0778879989",
"vehicle_reg": "XYZ1234",
"flat_number": "23",
"building_name": "ABC Building",
"building_number": "39",
"street": "DEF way",
"town": "Southampton",
"county": "Hampshire",
"postcode": "SO14 3AB",
"country": "UK",
"send_sms": false,
"send_email": false
}Sorted and upper-cased:
Using a secret of "9f*u/[`tt*.*k725X;u&Zkz , this string would result in the following signature hash:
8be9b278125a4fa15c2af43f28307d2af90ec4c1e8f52c096b0652a1b66d49c7
Last updated