Deko API URL

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>

Did this page help you?