Documentation


Welcome to Deko Docs! Here you'll find a comprehensive integration guide and API documentation to help you get up and running with Deko.


Get Started

API Requests

Before you get started

Registering Your IP Address(es): Please notify us of the IP address(es) from which we can expect to receive your POST’s by emailing retailersupport@dekopay.com. We do not accept ranges of IP addresses for security reasons.

Test and Live Credentials: We supply separate accounts for both live and test environments. Each environment has its own API key, installation ID and finance codes. You will need to ensure your credentials correspond to the correct environment to make a successful request.

All requests must be a HTTP POST and go in to a signal entry point for each platform as detailed below in the table. All requests are logged and bound to your API Key, you can see the API Logs in the Integration section of BackOffice.

Every request must have the following POST field on top of the individual additional request fields.

POST Field
Type
Required
Notes

api_key

STRING

YES

Your unique account identifier located in the integration section of BackOffice

The following can be uses as a base for all requests made to the Deko API.

<?php

$interface = [Deko API URL];

$postFields = Array(
  "Identification[api_key]" => "[API KEY]",
  // Add 1 for each post field
  "[POST Field]" => "[POST Value]"
);

$curlSession = curl_init();
curl_setopt($curlSession, CURLOPT_URL, $interface);
curl_setopt($curlSession, CURLOPT_HEADER, 0);
curl_setopt($curlSession, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlSession, CURLOPT_POST, 1);
curl_setopt($curlSession, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlSession, CURLOPT_TIMEOUT, 180);
curl_setopt($curlSession, CURLOPT_FOLLOWLOCATION, 1);
$curlResponse = curl_exec($curlSession);
string url = [Pay4Later API URL];

NameValueCollection data = new NameValueCollection();

data.Add("api_key", "[API KEY]");
// Add 1 for each post field
data.Add("[POST Field]", "[POST Value]");

// WebClient is part of the System.Net namespace
WebClient client = new WebClient();
client.UploadValues(url, data);

Each request has a standard error response in XML which you can see below. The error description will be in the 'ERROR' tags.

<?xml version="1.0"?>
<p4l>
  <ERROR>[Error Description]</ERROR>
</p4l>

The following are requests you can make to Deko's API.

Credit Application Initialisation

Create an online application link which you can give to the customer or redirect the customer to.

Request Fields

POST Field Type Required Notes
action STRING Yes This should be 'credit_application_link' in lower case.
Identification[api_key] STRING Yes Your unique account identifier
Identification[RetailerUniqueRef] STRING Yes The merchant unique reference to tie applications to their system
Identification[InstallationID] INTEGER Yes The installation associated with this credit request. Installations enable you to associate credit requests with different sales channels and/or websites. Each installation can have a unique configuration (logo, return URL’s, CSN URL’s etc…)
Goods[Description] STRING Yes Description of order contents
Goods[Price] INTEGER Yes The overall total order value expressed in pennies
Finance[Code] STRING Yes Specifies the finance product, please refer to product codes for a full list of our lender product codes
Finance[Deposit] INTEGER Yes The deposit amount expressed in pennies
Consumer[Title] STRING No The title of the customer
Consumer[Forename] STRING No The forename of the customer
Consumer[Surname] STRING No The surname of the customer
Consumer[DateOfBirthDay] INTEGER No The day of the month for the customer's birth date
Consumer[DateOfBirthMonth] INTEGER No The month the customer's birth date (i.e. 7)
Consumer[DateOfBirthYear] INTEGER No The year of birth for the customer (i.e 1978)
Consumer[Gender] STRING No The customer's gender
  • M=Male
  • F=Female
Consumer[MaritalStatus] STRING No The customer's martial status
  • M=Married
  • S=Single
  • C=Cohabiting
  • D=Divorced
  • P=Seperated
  • W=Widowed
Consumer[MobileNumber] STRING No The mobile phone number of the customer. Not required, but if set, must match the following regex: /(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)/ It will match local and both international formats: 07123456789 00447123456789 +447123456789
Consumer[EmailAddress] STRING No The customer's email address
Consumer[ResidentialStatus] STRING No The customer's residential status
  • H=Homeowner
  • T=Tenant
  • L=Living with parents
  • R=Renting
  • C=Council Renting
  • O=Other
Consumer[Employment][Status] STRING No The customer's employment status
  • P=Employed Full Time
  • PT=Employed Part Time
  • S=Self Employed
  • M=Military
  • R=Retired
  • H=Houseperson
Consumer[Employment][Occupation] STRING No The customer's occupation
Consumer[Employment][EmployerName] STRING No The customer's employer name
Consumer[Employment][Years] STRING No How long the customer has worked for the employer
Consumer[Employment][Salary] STRING No The customer's current salary
Consumer[Bank][AccountName] STRING No The owner's of the customer's bank account name
Consumer[Bank][AccountNumber] STRING No The customer's bank account number
Consumer[Bank][SortCode] STRING No The customer's bank branch sort code
Consumer[Bank][Years] STRING No How long the customer has been using the bank account, years 0-9 to be passed though as a string of 0-9 in order to populate the field, a value of 10 needs to be passed across in order to display more then 10 years on the application form.

Example Successful Response

https://secure.dekopay.com/s-e37hrteuxa3kyfkuexw6cxc2wg5tb8jv

Create a Credit Application Resume Link

Please note:

The application must have been initialised online and it must be in one of the following statuses: ACCEPTED, AMENDED or ACTION-CONSUMER.

You can remarket to customers that have dropped out of the application journey by returning them to where they left off, we've also created a 'how to' guide here.

To generate a link to resume an application, please see the request below:

Request Fields

POST Field
Type
Required
Notes

action

STRING

Yes

Enter the string "credit_application_resume_link" as the value here

cr_id

INTEGER

Yes

The Deko ID for this credit application which you want resume.

Identification[InstallationID]

STRING

Yes

The id of the installation you are using

Example Successful Response

http://secure.dekopay.com/credit-application/form/d-74445257aca73ff2982bfbf8f67e1e07

Fulfilment

Fulfil a credit application.

Request Fields

POST Field
Type
Required
Notes

cr_id

INTEGER

Yes

The Deko ID for this credit application which you want to fulfil.

new_state

STRING

Yes

Enter the string "fulfilled" as the value here

fulfilment_ref

STRING

Yes

A reference for fulfilment

api_key

STRING

Yes

Your unique account identifier

Example Successful Response

<?xml version="1.0"?>
<p4l>
  <result>success</result>
</p4l>

Resend CSN

Resend the latest CSN for a credit application.

Request Fields

POST Field
Type
Required?
Notes

cr_id

INTEGER

Yes

The Deko ID for this credit application which you want to resend a CSN for.

action

STRING

Yes

This should be ‘resend_csn’ in lower case.

api_key

STRING

Yes

Your unique account identifier

Example Successful Response

<?xml version="1.0"?>
<p4l>
  <result>success</result>
</p4l>

Cancellation

Cancel an application.

Request Fields

POST Field
Type
Required?
Notes

cr_id

INTEGER

Yes

The Deko ID for this credit application which you want to cancel.

new_state

STRING

Yes

This should be ‘cancelled’ in lower case

cancellation_note

STRING

Yes

The reason why the credit application is being cancelled

api_key

STRING

Yes

Your unique account identifier

Example Successful Response

<?xml version="1.0"?>
<p4l>
  <result>success</result>
</p4l>

Status Request

Find the current status of a credit application.

Request Fields

POST Field
Type
Required?
Notes

retaileruniqueref

STRING

Yes

Your unique reference supplied with the initial credit application.

request_state

STRING

Yes

This variable must be present and set to ‘true’ in lower case.

api_key

STRING

Yes

Your unique account identifier

Example Successful Response

<?xml version="1.0" ?>
<p4l>
  <cr_id>
    1111111
  </cr_id>
  <decision>
    ACCEPT
  </decison>
</p4l>

Amendment

Amendments to the value and description of orders of accepted applications can be amended whilst they are in ACCEPT or VERIFIED states (so have not yet been marked as fulfilled).

Once an order amendment is issued, the application will be updated to AMENDED status, a CSN will be sent to you and the customer sent an email with a link to review and confirm the amendment. Once the customer confirms the amendment it will be resubmitted for credit scoring, if a deposit remains to be paid, it will go return to ACCEPT state, if no deposit remains to be paid it will return to VERIFIED state. The CSN details will be updated to reflect the new amendment.

Request Fields

POST Field
Type
Required?
Notes

cr_id

INTEGER

Yes

The Deko ID for this credit application which you want to amend.

action

STRING

Yes

This should be 'order_amendment' in lower case.

new_price

INTEGER

Yes

The amount in pounds (£) of the new total order value.

new_description

STRING

Yes

A plain text description for the entire new order (not just the amendment), it will replace any previous order description.

api_key

STRING

Yes

Your unique account identifier

Example Successful Response

<?xml version="1.0"?>
<p4l>
  <result>success</result>
</p4l>

API Requests