API Reference

Get an Access Token

Ask for an access token before you create a payment. A token is valid for 600 seconds (10 minutes).

Endpoint:POST{{base_url}}/authentication/token

ParameterTypeDetails
client_idstringYour client ID from DPay Merchant
secret_idstringYour secret key from DPay Merchant

Request example (PHP, Guzzle)

PHP
<?php
require_once('vendor/autoload.php');
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', '{{base_url}}/authentication/token', [
  'json' => [
    'client_id' => 'YOUR_CLIENT_ID',
    'secret_id' => 'YOUR_SECRET_KEY',
  ],
  'headers' => [
    'accept' => 'application/json',
    'content-type' => 'application/json',
  ],
]);
echo $response->getBody();

Response: success (200)

JSON
{
  "message": { "code": 200, "success": ["SUCCESS"] },
  "data": { "access_token": "ACCESS_TOKEN", "expire_time": 600 },
  "type": "success"
}

Response: error

JSON
{
  "message": { "code": 400, "error": ["Requested credentials is invalid"] },
  "data": [],
  "type": "error"
}

Get the App

Coming soon on Google Play
Coming soon on the App Store

DPay is coming to Android and iPhone. Leave your e-mail in the footer and we will tell you when it is ready.

Prefer your browser? Open an account on the web