Schemas

Refer to the tables below for a summary.

SchemaDescriptionTypeExample
KeySignatureAn HMAC signature header provided on Deko callbacks to verify it is from DekoStringM4wYp1MKvDpQtVOnN7LVt9L8or4pKyVLhfUFVJxHemU=
AccessTokenRequestAn object representing the request for an Access Token.ObjectYou need to supply a client_id and client_secret
AccessTokenResponseAn object representing an OAuth Access TokenObjectSee Access Token Example
AccessTokenA valid access tokenStringSee Access Token Example
AccessTokenExpiresA number of seconds before the token is due to expireNumber86400
AccessTokenTypeAccess Token TypeStringBearer
CheckoutRequestA request sent by a merchant to Deko to authorise itObjectThe request must include: customer
basket
products
callbackUri
MerchantUniqueReferenceA unique merchant reference for a customer checkoutString'd290f1ee-6c54-4b01-90e6-d701748f0851'
MerchantCustomerAdditional data describing the customerObjectYou can include:
billingAddress
shippingAddress
phone
email
birthDate
AddressA customer address (e.g. billing address)ObjectThe following fields are mandatory:
firstName
lastName
address1
town
county
postcode
country
AmountA positive numeric amount with 2 decimals represented as stringString1345.23
CurrencyAn ISO3 currency codeStringGBP
MerchantBasketA representation of all the items that the customer is attempting to purchaseObjectThe following fields are mandatory:
currency
total
items
LineItemA specific item in the customer basket. Includes the description, price, and quantityObjectThe following fields are mandatory:
description
quantity
price
type
LineItemTypeType of line item (e.g. "sku", "discount", "shipping", "tax")StringValid values are:
sku
discount
shipping
tax
ProductOne of the existing Deko products (e.g. "split")StringValid values are:
split
monthly
revolving_credit
InitTokenA JWT token containing the products available to the merchantStringSee Token Example
CheckoutAuthorizationCertificateA base-64 encoded certificate to authorise the customer to checkoutStringSee Token Example
CheckoutResultThe result of a processed CheckoutObjectThe following fields are mandatory:
_links
basket
product
status
created
last_updated
CheckoutIdA UUID of a customer checkoutStringd81fc604-f089-455e-b7c4-43b43399f211
CheckoutStatusThe status of the customer checkoutStringValid values are:
success
failed
cancelled
initialised
ClientIdA valid client ID API consumers receive when onboardedStringvL0ZsEN9j5NT4VP3cFKBp1jF94sm5C8v
ClientSecretClient secret merchants receive when onboarded; used to obtain authentication tokenStringjTQKBCmoMyvrWGSwIwyNJVG3_APoftqb
ynyU61hScV1nCnj0gLAvMCocsOTT44xj
MerchantCallbackUriThe callback URL to send success or failure to on the Merchant integrationStringhttps://merchant-platform.fake/deko/callback
ApplicationThe current applicationObjectConsists of:
_links
id
ApplicationIdCredit application Unique identifier generated by Deko.Stringf7210019-2e4a-49f7-bd7b-b167285c5424
ApplicationStatusThe current status of the customer application. Used to pass information to frontend clients, such as Deko WalletObjectConsists of:
last_updated
state
_links
PollIntervalThe interval (in seconds) it is recommended to poll the application status. Failure to adhere to the poll recommendation (ie, polling too rapidly) may lead to rate limitingInteger5
PublicSigningKeyA Deko public key used to verify signatures from DekoObjectConsists of:
_links
key
public
expiry
SigningKeyHeaderAn object describing the key used to sign the payloadObjectConsists of:
description
key:public
key:verify
SigningKeyUriURL to the signing keyObjecthref object example:
/key/32b76dab-1e49-41f0-a802-219cccc0ce54/verify
SigningKeyVerifierUriURL to the signing key verifierObjecthref object example:
/key/32b76dab-1e49-41f0-a802-219cccc0ce54/verify
SigningKeyIdA key ID used to denote a particular public key used for signing payloads from DekoStringn/a

Access Token Example

eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Imp6SXZmaU1HNkJqVEpUWGxkRlVwZSJ9.eyJpc3MiOiJodHRwczovL2Rla29wYXktbWVyY2hhbnQtZGV2LmV1LmF1dGgwLmNvbS8iLCJzdWIiOiJ2TDBac0VOOWo1TlQ0VlAzY0ZLQnAxakY5NHNtNUM4dkBjbGllbnRzIiwiYXVkIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgxL2FwaS9jaGVja291dCIsImlhdCI6MTYxNjU5MTU4NywiZXhwIjoxNjE2Njc3OTg3LCJhenAiOiJ2TDBac0VOOWo1TlQ0VlAzY0ZLQnAxakY5NHNtNUM4diIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyJ9.F-dzPkJVF0ub2kGiWn1As5PSMnIiqAriOhyux47t7lbNk0tD9Wu655JGHmjuAqqQ3uWyqXx9-feuYjv61xufgBfxH17OkIqBB9lVJzEONoVqF5uIzsnaTD2z0FTzcvOuH8RXzA-_q7vFZwvbboE9iZCFd-JN8vI_1jjWDUpdKFWzGk0-AmID9F7qgNnyC2WEb6DK4Ky5VttXPXcGfnIGD2ybOgkg1dOlBhzabJBT9jU_UQuBoKjqQoNqVm1ovhFJzzSWMsHqDIDOb7r-0zXRB33ka4_oKoVnVrvxL2hGblgC-2Jg6gfB7uuVPdbM5FIBFx8Cbt4T83KxXbpJy5hQbg