NAV
shell php

Introduction

The API is accessible only via https with the following base URL: https://api.dasgateway.com/v1/

Welcome to the DASGATEWAY API reference.

The API is designed around the REST architectural style; providing a set of HTTP endpoints to facilitate the interaction between third party software and DASGATEWAY. To ensure compatibility, the API provides resource oriented URLs which uses built-in HTTP features like HTTP authentication, HTTP verbs or HTTP response codes which are understood by the majority of HTTP clients.

To enable developers, the API provides Live and Test accounts. Each of these accounts have their own pair of API keys. Using the appropriate pair of keys on the same API URL will differentiate between the Live and Test account.

Using the API reference

The API reference is ordered by endpoints. A description of the different endpoints and a few examples are provided.

While the examples are limited to a few development languages, the same principle can be applied to any language which has access to a HTTP client.

Request body

Example of a POST request body

{
"number": "4543474002249996",
"expiry_month": "06",
"expiry_year": "2020",
"cvc": "956",
"name": "Test Card 01"
}

Endpoints using the POST method requires the attributes to be passed in a JSON object with the Content-Type header set to application/json.

Response body

All response attributes will be in a JSON object with the Content-Type response header set to application/json.

Example of an API response

{
"card_token": "card_a4048621782149269e71de304d651f2b",
"failure_information": [],
"response": [],
"success": true
}

Handling errors

Example of failure information

{
"card_token": null, "failure_information": [ { "errorcode": "870", "errormessage": "Card Number Missing/ Invalid" }, { "errorcode": "870", "errormessage": "Expiry Month Missing/ Invalid" } ], "response": [], "success": false }

All endpoints include two nodes in the response JSON object: success and failure_information.

When success is true, the API executed the request successfully. In this event, failure_information will return an empty object.

When success is false, the API could not complete the request. The reasons of failure will be included in the object returned by failure_information.

It is imperative for the third party applications to check the success node on every request.

Transaction Flow

The following flow must be followed to complete a transaction:

  1. Create a card token via the create card token endpoint. The card token is used to represent the card details in the create transaction endpoint. Card details can be sent directly on step 2 if merchant is collecting card data on their servers
  2. Create a transaction via the create transaction endpoint. The transaction can be auto captured for immediate billing or pre-authorized for future capture.
  3. Optional: Capture a pre-authorized transaction via the capture endpoint.

Authentication

API Key

The API key is used for authorization and authentication; and will determine if the API will execute the request or not. Each merchant has access to a pair of keys, a secret key and a publishable key, for each the test and live account via the Admin Panel.

The API uses HTTP Basic Authentication where the API key is passed as credentials in the Authorization header. A colon will need to be suffixed to key to instruct the server that the credential is not in username:password format. Ex: secret_ex_key_123456789 will be passed as secret_ex_key_123456789:

Note that HTTP Basic Authentication expects the credentials to be base64 encoded. Some HTTP client will automatically encode the key into base64 (for example by using the -u flag with bash cURL) while others will require manual encoding (for example using CURLOPT_HTTPHEADER in PHP cURL).

Secret Key

The secret key has access to all the exposed endpoints and should be used only for server to server communication. As the name suggests, this key must be kept secret; and not exposed to the public via client-side scripts.

Publishable Key

Authenticating with the API

curl https://api.dasgateway.com/v1/{Endpoint} \
-u secret_ex_key_123456789: \
-H "Content-Type: application/json"
/* Update to a valid Key */
$api_key = "secret_ex_key_123456789";

/* Encode key to base64 */
$base64_key = base64_encode($api_key);

/* Create the array containing the Authorization header */
$headers = array("Authorization: Basic ".$base64_key,
"Content-Type: application/json"
);

/* Replace with a valid endpoint */
$url = "https://api.dasgateway.com/v1/{Endpoint}"

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER, TRUE);
/* Set the cURL header */
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);

$curl_response = curl_exec($curl);
/* The response of the endpoint will be in $curl_response.
You will want to check the HTTP response code and body. */

curl_close($curl);

The publishable key is valid only for the create card token endpoint. It allows third party applications to create card tokens via client side scripts like Javascript. In this scenario, clear cards details never transit via the third party application’s servers. The browser of the customer communicates directly with DASGATEWAY servers to generate a card token based on the card details of the customer; and the card token is then used by third party application’s servers to complete the required transactions.

Cross-origin resource sharing (CORS) is supported only on the create card token endpoint. This allows third party applications to interact securely with the endpoint from client-side web applications.

Card Endpoint

The card endpoint allows the creation of card tokens for each customer’s card. Since the original card details cannot be derived from the token, the third party applications can safely manipulate the card token. Note that card tokens are one time use only.

Create Card

Method: POST
Endpoint: /card
Authentication Key: Publishable key, Secret key

This endpoint allows the creation of tokens from card details.

Request Attributes

Create a card token

curl https://api.dasgateway.com/v1/card \
-u secret_ex_key_123456789: \
-X POST \
-H "Content-Type: application/json" \
-d '{
"number": "4543474002249996",
"expiry_month": "06",
"expiry_year": "2020",
"cvc": "956",
"name": "Cardholder Name"
}'
/* Update to a valid Key */
$api_key = "secret_ex_key_123456789";

/* Encode key to base64 */
$base64_key = base64_encode($api_key);

/* Create the array containing the Authorization header */
$headers = array("Authorization: Basic ".$base64_key,
"Content-Type: application/json"
);

$url = "https://api.dasgateway.com/v1/card";

/* Create an array of the request attributes */
$post_vals = array(
"number" => "4543474002249996",
"expiry_month" => "06",
"expiry_year" => "2020",
"cvc" => "956",
"name" => "Cardholder Name"
);

/* Convert the array to a JSON object */
$post_data = json_encode($post_vals);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER, TRUE);
/* Set the cURL header */
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
/* Set the cURL method to POST */
curl_setopt($curl, CURLOPT_POST, 1);
/* Set the POST payload */
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

/* Execute the cURL request */
$curl_response = curl_exec($curl);

curl_close ($curl);
Attributes Type Mandatory Description
number integer Yes The card number (PAN)
expiry_month integer Yes The expiry month of the card. Example: ‘06’ for June.
expiry_year integer Yes The expiry year of the card. Example: ‘2020’ for year 2020.
cvc integer Yes The card security code (Also called CID, CVC2, CVD, CVN2, CVV2 etc).
name string Yes The card holder’s name.

Response Attributes

Sample response

{
"card_token": "card_7b9dae1004dc4f2ea63f84de3de3a29d",
"failure_information": [],
"response": null,
"success": true
}
Attributes Description
card_token The card token based on the card details. Null on failure.
failure_information Empty object if request was executed successfully. Object containing errors when the request execution failed.
response Contains a Boolean stating whether the response was successful
success true on successful execution. false on failure.

Transaction Endpoint

The transaction endpoint allows third party applications to manage transactions. This endpoint allows transactions to be captured or pre-authorized.

Create Transaction

Method: POST
Endpoint: /Transaction/Create
Authentication Key: Secret key

The create transaction endpoint captures or pre-authorizes a transaction.

Request Attributes

Execute a transaction

curl https://api.dasgateway.com/v1/transaction/create \
-u secret_ex_key_123456789: \
-X POST \
-H "Content-Type: application/json" \
-d '{
"card_token": "card_8e38eebbb20b41e7ba91bcb76c6426db",
"amount": "10.00",
"currency": "USD",
"billing_address":
{
"country":"MU",
"email":"test@test.com",
"phone":"123456789"
},
"auto_capture": "false",
"merchant_txn_ref": "merchant ref"
}'
/* Update to a valid Key */
$api_key = "secret_ex_key_123456789";

/* Encode key to base64 */
$base64_key = base64_encode($api_key);

/* Create the array containing the Authorization header */
$headers = array("Authorization: Basic ".$base64_key,
"Content-Type: application/json"
);

$url = "https://api.dasgateway.com/v1/Transaction/Create";

/* Create an array of the request attributes */
$post_vals = array(
"card_token" => "card_ef15e41c221e4dcd9ade693e1c799660",
"amount" => "10.00",
"currency" => "USD",
"billing_address":
{
"country":"MU",
"email":"test@test.com",
"phone":"123456789"
},
"auto_capture" => "true",
"merchant_txn_ref" => "Invoice 01",
"merchant_ip" => "192.168.1.1",
"visit_ip" => "192.168.1.25",
"description" => "Test Description"
);

/* Convert the array to a JSON object */
$post_data = json_encode($post_vals);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER, TRUE);
/* Set the cURL header */
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
/* Set the cURL method to POST */
curl_setopt($curl, CURLOPT_POST, 1);
/* Set the POST payload */
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

/* Execute the cURL request */
$curl_response = curl_exec($curl);

curl_close ($curl);
/* Update to a valid Key */
$api_key = "secret_ex_key_123456789";

/* Encode key to base64 */
$base64_key = base64_encode($api_key);

/* Create the array containing the Authorization header */
$headers = array("Authorization: Basic ".$base64_key,
"Content-Type: application/json"
);

$url = "https://api.dasgateway.com/v1/Transaction/Create";

/* Create an array of the request attributes */
$post_vals = array(
"card":
{
"number":"4543474002249996",
"expiry_month":"06",
"expiry_year"2020"
"cvc":"956",
"name"Cardholder Name"
},
"amount" => "10.00",
"currency" => "USD",
"billing_address":
{
"country":"MU",
"email":"test@test.com",
"phone":"123456789"
},
"auto_capture" => "true",
"merchant_txn_ref" => "Invoice 01",
"merchant_ip" => "192.168.1.1",
"visit_ip" => "192.168.1.25",
"description" => "Test Description"
);

/* Convert the array to a JSON object */
$post_data = json_encode($post_vals);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER, TRUE);
/* Set the cURL header */
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
/* Set the cURL method to POST */
curl_setopt($curl, CURLOPT_POST, 1);
/* Set the POST payload */
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

/* Execute the cURL request */
$curl_response = curl_exec($curl);

curl_close ($curl);
curl https://api.dasgateway.com/v1/transaction/create \
-u secret_ex_key_123456789: \
-X POST \
-H "Content-Type: application/json" \
-d '{
"card":
{
"number": "4543474002249996",
"expiry_month": "06",
"expiry_year": "2020",
"cvc": "956",
"name": "Cardholder Name"
},
"amount": "10.00",
"currency": "USD",
"billing_address":
{ "country":"MU", "email":"test@test.com", "phone":"123456789", "city":"cityname", "address1":"address1", "address2":"address2", "postal_code":"480", "state":"state" }, "shipping_address":
{ "country":"MU", "email":"test@test.com", "phone":"123456789", "city":"cityname", "address1":"address1", "address2":"address2", "postal_code":"480", "state":"state" },
"auto_capture": false, "merchant_txn_ref": "merchant ref", "visit_ip": "192.168.100.118", "recurring": { "type": "1", "roottxnid": "10574189", "paymenttype": "recurring", "planname": "DayPlan0403", "interval": "Day", "intervalduration": "1", "cycle": "7", "isfreetrial": "false" }
}
Attributes Type Mandatory Description
card_token integer Yes The token generated from the create card token endpoint. Not required if the card attribute is supplied
amount decimal Yes The billable amount of the transaction. Ex: 1234.43
currency string Yes The billable currency of the transaction.
billing_address object Yes A JSON object containing the billing address details.
billing_address: country string Yes The customer’s country code under the billing address object.
billing_address: email string Yes The customer’s email address under the billing address object.
billing_address: phone string Yes The customer’s phone number under the billing address object.
billing_address: city string Yes The customer’s city under the billing address object.
billing_address: address1 string Yes The customer’s address1 under the billing address object.
billing_address: address2 string Yes The customer’s address2 under the billing address object.
billing_address: postal_code string Yes The customer’s postal code under the billing address object.
billing_address: state string Yes The customer’s state under the billing address object.
shipping_address object Yes A JSON object containing the shipping address details.
shipping_address: country string Yes The customer’s country code under the shipping address object.
shipping_address: email string Yes The customer’s email address under the shipping address object.
shipping_address: phone string Yes The customer’s phone number under the shipping address object.
shipping_address: city string Yes The customer’s city under the shipping address object.
shipping_address: address1 string Yes The customer’s address1 under the shipping address object.
shipping_address: address2 string Yes The customer’s address2 under the shipping address object.
shipping_address: postal_code string Yes The customer’s postal code under the shipping address object.
shipping_address: state string Yes The customer’s state under the shipping address object.
auto_capture boolean No The transaction will be captured immediately if set to true. The transaction will be pre-authorized if set to false and will need to be captured via the capture endpoint. true by default.
merchant_txn_ref string No A reference for the transaction set by the merchant (ex: invoice number).
visit_ip string No The IP of the customer.
card object No A JSON object containing card details.
Type string No Indicate whether it is an Initial Transaction or Subsequent Transaction.
RootTrxID (RootTransactionID) String No Root transaction ID is a reference ID that user/merchant is sending for a subsequent transaction.
PaymentType String No Refers to the type of payment (Recurring or Installment).
PlanName String No Name of the plan
Interval String No Frequency of subscription charges. Possible values are: Day, Week, Month and Year.
IntervalDuration Integer No Number of intervals between subscription charges. For example, interval=day and intervalCount=10 will result in charge every 10 days.
Cycle Integer No Number of charges after which subscription will be automatically cancelled. Value of null means no limit on number of charges.
isFreeTrial boolean No Represents a period of time in which the user has full access of the plan with no cost.

Response Attributes

Sample response

{
"transaction_token": "tran_9c0e341ab49547819f573cd701df722a", "merchant_txn_ref": "Invoice 01", "action": "Purchase", "merchant_ip": "192.168.1.1", "visit_ip": "192.168.1.25", "created_at": "2018-04-26T22:26:07.797", "currency": "USD", "description": "Test Description", "auth_code": "311718", "cvc_check": null, "avs_check": null, "arn": null, "client": null, "transaction": { "payment_token": "pay_fe35191909554d9c859b8534851f8420", "amount": "10.00", "mode": "1", "brand": "Visa", "country": null, "card": "401200******0026", "TransactionIdentifier": "10596399" },
"fraud_details": null, "url": null, "failure_information": [], "response": [ { "responsecode": "0", "responsemessage": "Approved or completed available successfully" } ], "success": true
}
Attributes Description
transaction_token Transaction token should be kept for reference. Is also used in capture endpoint.
merchant_txn_ref A reference for the transaction set by the merchant (ex: invoice number).
action Purchase for auto capture. Authorization for pre-authorization.
merchant_ip The server IP of the merchant.
visit_ip The IP of the customer.
created_at Date at which the transaction was executed.
currency The billable currency of the transaction.
description A description of the transaction.
auth_code Authorization code returned by the bank.
cvc_check A three or four digit number printed on a debit or credit card to provide additional protection for the cardholder. The CVC is required when completing a card-not-present (online) purchase
avs_check The Address Verification Service (AVS) is a tool that enables merchants to detect suspicious credit card transactions and prevent credit card fraud. AVS verifies that the billing address entered by the customer is the same as the one associated with the cardholder's credit card account.
arn The purchase is given a specific number called an acquirer reference number (ARN)
client Internal usage
transaction An object with the transaction details.
transaction: payment_token Internal usage.
transaction: identifier The transaction ID is a special set of numbers that defines each transaction.
transaction: amount The billable amount of the transaction.
transaction: mode Internal usage.
transaction: brand Card brand.
transaction: country Internal Usage.
transaction: card Last four digits of the card.
transaction: identifier The transaction ID is a special set of numbers that defines each transaction.
fraud_details Indicates the types of fraud occurred if any.
url A URL is the address of a given unique resource on the Web
failure_information Empty object if request was executed successfully. Object containing errors when the request execution failed.
response An object with the response details.
responsecode This code indicates what is about to happen. For example a response code of 200 means "OK
responsemessage Response messages are application-defined. So, determining what is in the response message is the responsibility of the application sending the response message as well as the application receiving the response.
success true on successful execution. false on failure

Capture Endpoint

The capture endpoint allows a pre-authorized transaction to be captured.

Capture

Method: POST
Endpoint: /capture
Authentication Key: Secret key

Initiate the capture request.

Request Attributes

Execute a capture

curl https://api.dasgateway.com/v1/capture \
-u secret_ex_key_123456789: \
-X POST \
-H "Content-Type: application/json" \
-d '{
"transaction_token": "tran_9c0e341ab49547819f573cd701df722a",
"amount": "10.00",
"description": "Capture Desc",
"merchant_txn_ref": "123"
}'
/* Update to a valid Key */
$api_key = "secret_ex_key_123456789";

/* Encode key to base64 */
$base64_key = base64_encode($api_key);

/* Create the array containing the Authorization header */
$headers = array("Authorization: Basic ".$base64_key,
"Content-Type: application/json"
);

$url = "https://api.dasgateway.com/v1/capture";

/* Create an array of the request attributes */
$post_vals = array(
"transaction_token" => "tran_9c0e341ab49547819f573cd701df722a",
"amount" => "10.00",
"description" => "Capture Desc"
"merchant_txn_ref" => "123"
);

/* Convert the array to a JSON object */
$post_data = json_encode($post_vals);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER, TRUE);
/* Set the cURL header */
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
/* Set the cURL method to POST */
curl_setopt($curl, CURLOPT_POST, 1);
/* Set the POST payload */
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

/* Execute the cURL request */
$curl_response = curl_exec($curl);

curl_close ($curl);
Attributes Type Mandatory Description
transaction_token string Yes The token generated from the create transaction endpoint. The auto_capture flag must have been set to false to be able to use the capture endpoint.
amount decimal Yes The billable amount of the transaction. Ex: 1234.43. Amount must be equal or smaller than the amount set in the create transaction request.
description string No A description of the transaction.
merchant_txn_ref string No The Merchant Transaction Reference provides the merchant with a way to associate a reference with a transaction and search for transactions associated with the reference.

Response Attributes

Sample response

{
"transaction_token": "tran_f6183d994ab14ceb94fade0660143b98",
"merchant_txn_ref": null,
"action": null,
"merchant_ip": null,
"visit_ip": null, 
"created_at": "2018-04-26T23:26:15.15",
"currency": "USD",
"description": "xyzxcxcxc",
"auth_code": "272943",
"cvc_check": null,
"avs_check": null,
"arn": null,
"client": null,
"transaction": {
"payment_token": null,   
"amount": null, 
"mode": null,
"brand": null,
"country": null,
"card": null
}, "items": [], "tracking": null, "device": null, "fraud_details": null, "url": null, "failure_information": [], "response": [ { "responsecode": "0", "responsemessage": "Approved or completed available successfully" } ], "success": true
}
Attributes Description
transaction_token Transaction token should be kept for reference. Is also used in capture endpoint.
merchant_txn_ref A reference for the transaction set by the merchant (ex: invoice number).
action Purchase for auto capture. Authorization for pre-authorization.
merchant_ip The server IP of the merchant.
visit_ip The IP of the customer.
created_at Date at which the transaction was executed.
currency The billable currency of the transaction.
description A description of the transaction.
auth_code Authorization code returned by the bank.
cvc_check A three or four digit number printed on a debit or credit card to provide additional protection for the cardholder. The CVC is required when completing a card-not-present (online) purchase
avs_check The Address Verification Service (AVS) is a tool that enables merchants to detect suspicious credit card transactions and prevent credit card fraud. AVS verifies that the billing address entered by the customer is the same as the one associated with the cardholder's credit card account.
arn The purchase is given a specific number called an acquirer reference number (ARN)
client Internal usage
transaction An object with the transaction details.
transaction: payment_token Internal usage.
transaction: identifier The transaction ID is a special set of numbers that defines each transaction.
transaction: amount The billable amount of the transaction.
transaction: mode Internal usage.
transaction: brand Card brand.
transaction: country Internal Usage.
transaction: card Last four digits of the card.
failure_information Empty object if request was executed successfully. Object containing errors when the request execution failed.
response An object with the response details.
responsecode This code indicates what is about to happen. For example a response code of 200 means "OK
responsemessage Response messages are application-defined. So, determining what is in the response message is the responsibility of the application sending the response message as well as the application receiving the response.
success true on successful execution. false on failure

Void Authorization

The Void Authorization endpoint allows a transaction in Authorization mode (auto_capture set to false on the Create Transaction endpoint) to be cancelled.

Void Authorization

Method: POST
Endpoint: /void/auth
Authentication Key: Secret key

Initiate the void authorization request.

Request Attributes

Execute a capture

curl https://api.dasgateway.com/v1/void/auth  \
-u secret_ex_key_123456789: \
-X POST \
-H "Content-Type: application/json" \
-d '{
"transaction_token": "tran_f6183d994ab14ceb94fade0660143b98"
}'
/* Update to a valid Key */
$api_key = "secret_ex_key_123456789";

/* Encode key to base64 */
$base64_key = base64_encode($api_key);

/* Create the array containing the Authorization header */
$headers = array("Authorization: Basic ".$base64_key,
"Content-Type: application/json"
);

$url = "https://api.dasgateway.com/v1/void/auth";

/* Create an array of the request attributes */
$post_vals = array(
"transaction_token" => "tran_f6183d994ab14ceb94fade0660143b98"
);

/* Convert the array to a JSON object */
$post_data = json_encode($post_vals);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER, TRUE);
/* Set the cURL header */
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
/* Set the cURL method to POST */
curl_setopt($curl, CURLOPT_POST, 1);
/* Set the POST payload */
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

/* Execute the cURL request */
$curl_response = curl_exec($curl);

curl_close ($curl);
Attributes Type Mandatory Description
transaction_token string Yes The token generated from auto captured transactions from the create transaction endpoint.

Response Attributes

Sample response

{    
"transaction_token": "tran_db6fa0acf4a14cccbcf2865b71c6d1d5",    
"merchant_txn_ref": null,    
"action": null,    
"merchant_ip": null,    
"visit_ip": null,    
"created_at": "2018-08-06T21:15:26.49",    
"currency": null,    
"description": null,   
"auth_code": null,    
"cvc_check": null,    
"avs_check": null,    
"arn": null,    
"client": null,    
"transaction": {        
    "payment_token": null,        
    "amount": null,        
    "mode": null,        
    "brand": null,        
    "country": null,        
    "card": null,
    "TransactionIdentifier": "10596399"    
},    
"items": null,    
"tracking": null,    
"device": null,    
"fraud_details": null,    
"url": null,    
"failure_information": [],    
    "response": [
    	{
    	  "responsecode": "0",
    	  "responsemessage": "Approved or completed available successfully"
    	}
    ],    
"success": true
}
Attributes Description
transaction_token Transaction token should be kept for reference. Is also used in capture endpoint.
merchant_txn_ref A reference for the transaction set by the merchant (ex: invoice number).
action Purchase for auto capture. Authorization for pre-authorization.
merchant_ip The server IP of the merchant.
visit_ip The IP of the customer.
created_at Date at which the transaction was executed.
currency The billable currency of the transaction.
description A description of the transaction.
auth_code Authorization code returned by the bank.
cvc_check A three or four digit number printed on a debit or credit card to provide additional protection for the cardholder. The CVC is required when completing a card-not-present (online) purchase
avs_check The Address Verification Service (AVS) is a tool that enables merchants to detect suspicious credit card transactions and prevent credit card fraud. AVS verifies that the billing address entered by the customer is the same as the one associated with the cardholder's credit card account.
arn The purchase is given a specific number called an acquirer reference number (ARN)
client Internal usage
transaction An object with the transaction details.
transaction: payment_token Internal usage.
transaction: identifier The transaction ID is a special set of numbers that defines each transaction.
transaction: amount The billable amount of the transaction.
transaction: mode Internal usage.
transaction: brand Card brand.
transaction: country Internal Usage.
transaction: card Last four digits of the card.
failure_information Empty object if request was executed successfully. Object containing errors when the request execution failed.
response An object with the response details.
responsecode This code indicates what is about to happen. For example a response code of 200 means "OK
responsemessage Response messages are application-defined. So, determining what is in the response message is the responsibility of the application sending the response message as well as the application receiving the response.
success true on successful execution. false on failure

Refund Endpoint

The refund endpoint allows an already captured transaction to be refunded.

Refund

Method: POST
Endpoint: /refund
Authentication Key: Secret key

Initiate the refund request.

Request Attributes

Execute a capture

curl https://api.dasgateway.com/v1/refund  \
-u secret_ex_key_123456789: \
-X POST \
-H "Content-Type: application/json" \
-d '{
"transaction_token": "tran_f6183d994ab14ceb94fade0660143b98",
"amount": "10.00"
}'
/* Update to a valid Key */
$api_key = "secret_ex_key_123456789";

/* Encode key to base64 */
$base64_key = base64_encode($api_key);

/* Create the array containing the Authorization header */
$headers = array("Authorization: Basic ".$base64_key,
"Content-Type: application/json"
);

$url = "https://api.dasgateway.com/v1/refund";

/* Create an array of the request attributes */
$post_vals = array(
"transaction_token" => "tran_f6183d994ab14ceb94fade0660143b98",
"amount" => "10.00",
"description" => "Refund Description"
);

/* Convert the array to a JSON object */
$post_data = json_encode($post_vals);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER, TRUE);
/* Set the cURL header */
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
/* Set the cURL method to POST */
curl_setopt($curl, CURLOPT_POST, 1);
/* Set the POST payload */
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

/* Execute the cURL request */
$curl_response = curl_exec($curl);

curl_close ($curl);
Attributes Type Mandatory Description
transaction_token string Yes The token generated from auto captured transactions from the create transaction endpoint or from the capture endpoint.
amount decimal Yes The billable amount of the transaction. Ex: 1234.43. Amount must be equal or smaller than the amount set in the create transaction request.

Response Attributes

Sample response

{    
"transaction_token": "tran_2fd7883e011f4274a38f64cd00ae02ae",    
"merchant_txn_ref": null,    
"action": null,    
"merchant_ip": null,    
"visit_ip": null,    
"created_at": "2018-04-26T23:32:21.153",    
"currency": "USD",    
"description": "xyzxcxcxc",    
"auth_code": null,        
"cvc_check": null,    
"avs_check": null,    
"arn": null,    
"client": null,    
"transaction": {        
"payment_token": null,        
"amount": null,        
"mode": null,        
"brand": null,       
"country": null,        
"card": null   
 },
"items": null, "tracking": null, "device": null, "fraud_details": null, "url": null, "failure_information": [], "response": [ { "responsecode": "0", "responsemessage": "Approved or completed available successfully" } ], "success": true }
Attributes Description
transaction_token Transaction token should be kept for reference. Is also used in capture endpoint.
merchant_txn_ref A reference for the transaction set by the merchant (ex: invoice number).
action Purchase for auto capture. Authorization for pre-authorization.
merchant_ip The server IP of the merchant.
visit_ip The IP of the customer.
created_at Date at which the transaction was executed.
currency The billable currency of the transaction.
description A description of the transaction.
auth_code Authorization code returned by the bank.
cvc_check A three or four digit number printed on a debit or credit card to provide additional protection for the cardholder. The CVC is required when completing a card-not-present (online) purchase
avs_check The Address Verification Service (AVS) is a tool that enables merchants to detect suspicious credit card transactions and prevent credit card fraud. AVS verifies that the billing address entered by the customer is the same as the one associated with the cardholder's credit card account.
arn The purchase is given a specific number called an acquirer reference number (ARN)
client Internal usage
transaction An object with the transaction details.
transaction: payment_token Internal usage.
transaction: amount The billable amount of the transaction.
transaction: mode Internal usage.
transaction: brand Card brand.
transaction: country Internal Usage.
transaction: card Last four digits of the card.
failure_information Empty object if request was executed successfully. Object containing errors when the request execution failed.
response An object with the response details.
responsecode This code indicates what is about to happen. For example a response code of 200 means "OK
responsemessage Response messages are application-defined. So, determining what is in the response message is the responsibility of the application sending the response message as well as the application receiving the response.
success true on successful execution. false on failure

Test Cards

Test cards can be used in test mode to simulate transactions.

Brand PAN CVV Expiry Month Expiry Year
AMEX 345678901234564 1056 05 2030
Diners Club 30123456789019 123 05 2030
Discovr 6011111111111117 105 06 2030
JCB 3530111333300000 105 06 2030
MasterCard 5313581000123430 105 10 2030
MasterCard 5436031030606378 257 06 2030
MasterCard 5555555555554444 956 06 2030
MasterCard 2720998831177548 956 06 2030
MasterCard 2720991749726670 956 06 2030
MasterCard 2221002583868729 956 06 2030
VISA 4543474002249996 956 06 2030

Test Environment Values

Different amounts will trigger specific scenarios on the test environment as described below:

Amount Description Expected response from Gateway Expected response from Gateway
x00 Approved - x can be any integer value (ex: 5300) will result in an Approve result 0
x51 INSUFFICIENT FUNDS - x can be any integer value (ex: 8851) will result in a Not sufficient funds 51
x05 DNH - x can be any integer value will result in Do not honour situation 05
x62 RESTRICTED CARDS - x can be any integer value will result in Restricted card situation 62
x12 INVALID TRANSACTION - x can be any integer value will result in Invalid transaction situation 12
9998 TIMEOUT - For timeout please only use 9998 will result in a Time out response 9998
other any amount not in this list will result in Approve transaction situation 0

Plugins

Card Token Generator (Javascript)

Path: https://api.dasgateway.com/sdk/js/cardTokenGeneratorv1.min.js

The card token generator is a javascript plugin that allows the merchant to convert credit card details into card tokens without having the card details of the customer transiting through their servers.

Card Token Generator Flow

Steps Details
1 Include the card token javascript file in your page. It is important to include the js file from DASGATEWAY server instead of downloading the file locally.
2 Either create a static button with the das attributes or make sure that your payment event calls the createCardToken method.
3 The javacript plugin will return a card token, which should be used by the merchant’s server side scripts to post a transaction via the Transaction Endpoint.

Using the static button

Static button example

<!DOCTYPE html>
<html lang="en">
<head>
...
</head>

<body>
...
<button
das-pay
das-key="publish_ex_key_123456789"
das-server-url="http://merchant_system/endpoint_collect_card_token"
das-amount="30"
das-currency="SGD"
das-label="Payment Form">
Checkout 2 - SGD 30
</button>

<script src="https://api.dasgateway.com/sdk/js/cardTokenGeneratorv1.min.js"></script>
</body>
</html>

The merchant’s systems must create a HTML button at render time with das attributes which will take care of creating and retrieving the card token. The static button method will prompt the customer with an overlay form to enter his card details. The form will then generate a card token and post it to the merchant’s systems. Click here for a live example.

Attributes Mandatory Description
das-pay Yes This attributes will call the required card token generator method on a click event.
das-key Yes The publishable key must be defined here. Note that the secret key must never be used here since it will be rendered in the browser.
das-server-url Yes The URL pointing to the merchant’s systems where the generated card token along with the attributes like the amount will me posted. Note that the merchant’s endpoint will have to handle the transaction creation via the Transaction Endpoint.
das-amount Yes The amount of the transaction. Will be posted to the merchant’s endpoint defined in das-server-url.
das-currency Yes The currency code of the transaction which will be posted to the merchant’s endpoint defined in das-server-url.
das-label Yes The label which will appear on the form overlay.

Using javascript events

Javascript events example

<!DOCTYPE html>
<html lang="en">
<head>
...
</head>

<body>
...
<button class="myPayButton">Checkout 3 - Code</button>

<script src="https://api.dasgateway.com/sdk/js/cardTokenGeneratorv1.min.js"></script>
<script>
$(document).ready(function()
{
$(".myPayButton").click(function()
{
var myDasPayment = new DasGateway('publish_ex_key_123456789');
myDasPayment.setAutoPost(
false,
"http://merchant_system/endpoint_collect_card_token",
{"amount":"30", "currency": "SGD"}
);
myDasPayment.createCardToken(
{
'card_number':'4543474002249996',
'expiry_month':'6',
'expiry_year':'2020',
'cvc': '956',
'name':'Test Card 01'
},
function(callback_data)
{
console.log('card token is: ' + data.card_token);
alert('card token is: ' + data.card_token);
/*
If AutoPost is true, data will be posted to specified server.
Else Manually proceed to post to server here.
*/
}
);
});
});
</script>
</body>
</html>

The javascript events method allows the merchant’s systems to handle the card details input via their own forms but still create the card token via the card token generator plugin. To achieve this, the plugins exposes two methods, createCardToken and setAutoPost which must be used by the payment events on the merchant’s checkout page. Click here for a live example.

createCardToken
createCardToken({card details}, function(callback_data) { callback code})
Required: Yes

The createCardToken endpoint will accept the card details as parameters and return a card token which should be handled in the callback function. Note that if setAutoPost is set to true, it will override the callback function and post the card token along with the specified parameters to the specified URL.

Parameters Description
card_number The card number(PAN)
expiry_month The card expiry month
expiry_year The card expiry year
name A description for the card

setAutoPost
setAutoPost(Active, Merchant_endpoint, {Merchant_endpoint_parameters})
Required: No

Parameters Type Description
Active Boolean Default: false. If set to true, will override the createCardToken callback function and post the card token and merchant_enpoint_parameters to the merchant_endpoint
Merchant_endpoint String (URL) The merchant’s endpoint URL where the card token and the specified parameters will be posted. From there, the merchant’s system must handle the transaction creation via the Transaction Endpoint.
Merchant_endpoint_parameters JSON Any parameters which are required by the merchant’s endpoint to process the transaction. Usually information like the amount and currency code are placed here.

Gateway Codes

HTTP Response

HTTP response codes returned by the gateway, indicating the status of the request.

HTTP Response Description
200 OK – The request was understood and executed by the gateway. Check the ‘Success’ and ‘failure_information’ nodes to be sure if the request was executed successfully.
400 Bad Request – There is an issue with the request. Refer to the ‘failure_information’ node to get more details
401 Unauthorized –- Causes: Authorization header missing, Authorization header invalid, API key invalid, Base64 encoding invalid
404 Not Found – The endpoint being accessed does not exist.
405 Method Not Allowed – The endpoint being accessed does not accept the HTTP method through which it is being contacted.
415 Unsupported Media Type – The content type in the request header is incorrect.

Response Codes

Response codes are codes received by the banks.

Code Description Result
0 Approved or completed available successfully Successful
1 Refer to card issuer Not Successful
2 Refer to special conditions for card issuer Not Successful
3 Invalid merchant Not Successful
4 Pick-up Not Successful
5 Do not honour Not Successful
6 Error transaction Not Successful
7 Pick up card, special condition(other than lost/stolen card) Not Successful
8 Honour with identification Not Successful
11 Approved (VIP) Not Successful
12 Invalid transaction Not Successful
13 Invalid amount Not Successful
14 Invalid card number (no such number) Not Successful
15 No such issuer Not Successful
17 Customer cancellation Not Successful
18 Customer dispute Not Successful
19 Re-enter transaction Not Successful
20 Invalid response Not Successful
21 No action taken(unable to back out prior transaction) Not Successful
25 Unable to locate record in file, or account number is missing from inquiry Not Successful
28 File is temporarily unavailable Not Successful
30 Format error Not Successful
31 Bank not supported by switch Not Successful
33 Expired card Not Successful
34 Suspected fraud Not Successful
35 Card acceptor call acquirer security Not Successful
36 Restricted card Not Successful
37 Capture Not Successful
38 Allowable PIN tries exceeded Not Successful
39 No credit account Not Successful
40 Requested function not supported Not Successful
41 Lost card Not Successful
42 Unspecified Failure Not Successful
43 Stolen card or pick up Not Successful
44 No investment account Not Successful
51 Not sufficient fund Not Successful
52 No cheque account Not Successful
53 No savings account Not Successful
54 Expired card Not Successful
55 Incorrect personal identification number Not Successful
56 No record found Not Successful
57 Transaction not permitted to cardholder Not Successful
58 Transaction not allowed at terminal Not Successful
59 Suspected fraud Not Successful
60 Card acceptor contact acquirer Not Successful
61 Exceeds withdrawal amount limit Not Successful
62 Restricted card Not Successful
63 Security violation Not Successful
64 Original amount incorrect Not Successful
65 Exceeds withdrawal frequency limit Not Successful
66 Card acceptor call acquirers security department Not Successful
67 Hard capture Not Successful
68 Response received too late Not Successful
75 Allowable number of PIN tries exceeded Not Successful
76 Approved country club Not Successful
77 Approved pending Not Successful
78 Approved blind Not Successful
79 Reserved for private use transaction Not Successful
80 Approved national NEG hit Not Successful
81 Approved commercial Not Successful
82 Invalid CVV Not Successful
83 Invalid Account Not Successful
84 No PBF Not Successful
85 PBF update error Not Successful
86 Invalid authorization type Not Successful
87 Bad Track Data Not Successful
88 PTLF error Not Successful
89 Invalid route service Not Successful
91 Issuer or switch inoperative Not Successful
92 Destination cannot be found for routing Not Successful
93 Transaction cannot be completed; violation of law Not Successful
94 Duplicate transaction Not Successful
95 Reconciled error Not Successful
96 System malfunction or certain field error condition Not Successful
99 processing failure Not Successful
110 Partial Approval Not Successful
111 Velocity Check Failed Not Successful
113 INVALID AMOUNT OR CURRENCY CONVERSION FIELD OVERFLOW Not Successful
176 UNSOLICITED REVERSAL - A REVERSAL WITH NO ORIGINAL TRANSACTION IN HISTORY. Not Successful
177 Previous message located for a repeat or reversal Not Successful
178 blocked, first used Not Successful
179 ALREADY REVERSED BY SWITCH Not Successful
182 NEGATIVE CAM,DCVV,ICVV OR CVV RESULTS Not Successful
185 No reason to decline a request for account number verification, address verification Not Successful
186 CANNOT VERIFY PIN Not Successful
189 INELIGIBLE TO RECEIVE FINANCIAL POSITION INFORMATION Not Successful
241 Country Code Invalid or Missing Not Successful

Actions

Actions supported by the gateway:

Error Code

Error codes are returned by the gateway indicating issues while processing the requests. Error codes and description will form part of the object returned in the ‘FailureInformation’ node in the response body.

Error Code Description
100 Institution ID required.
101 Brand ID required.
102 Brand Description required.
103 BIN range overlaps an existing brand.
104 Start BIN required.
105 BIN length too long.
106 Start and end BIN lengths differ.
107 End BIN not greater then Start BIN.
108 Invalid Brand ID.
109 Invalid Description.
110 Invalid Payment Intrument List.
140 Brand not Allowed
150 Missing required data.
151 Invalid Action type.
152 Invalid Transaction Amount.
153 Invalid Transaction ID.
154 Invalid Terminal ID.
155 Invalid Batch Track ID.
156 Batch track ID not unique.
157 Invalid Payment Instrument.
158 Card Number Not Numeric.
159 Card Number Missing.
160 Invalid Brand.
161 Invalid Card/Member Name data.
162 Invalid User Defined data.
163 Invalid Address data.
164 Invalid Zip Code data.
165 Invalid Track ID data.
166 Invalid Card Number data.
167 Invalid Currency Code data.
168 Institution ID mismatch.
169 Merchant ID mismatch.
170 Terminal ID mismatch.
171 Payment Instrument mismatch.
172 Card Verification Code Mismatch.
173 Currency Code mismatch.
174 Card Number mismatch.
175 Invalid Result Code.
176 Failed Previous Captures check.
177 Failed Capture Greater Than Auth check.
178 Failed Void Greater Than Original Amount c
179 Failed Previous Voids check.
180 Failed Previous Credits check.
181 Failed Credit Greater Than Debit check.
182 Failed to Load Merchant Record for Validat
183 Card Verification Digit Required.
184 Failed to Load Terminal Record for Validat
200 Address verification failed.
201 Transaction not found.
202 Hack attempt detected.
203 Invalid access: Must use POST method.
204 Invalid Original Transaction ID.
250 Transaction denied: Negative Card
251 Maximum transaction count exceeded.
252 Maximun transaction volume exceeded.
253 Maximum credit volume exceeded.
254 Maximum card debit volume exceeded.
255 Maximum card credit volume exceeded.
256 Maximum card transaction count exceeded.
257 Maximum transaction amount exceeded.
258 Transaction denied: Negative BIN
259 Transaction denied: Declined Card
260 Transaction denied: Credits exceed Capture
261 Transaction denied: Captures exceed Author
300 Institution ID required.
301 Risk Profile ID required.
302 Currency code required.
303 Risk Profile in use.
304 Invalid Risk Profile ID.
305 Invalid Currency Code.
306 Invalid Risk Profile setting.
307 Invalid Max floor limit/$ amount.
308 Invalid Max floor limit transaction count.
309 Invalid Max daily processing amount.
310 Invalid Max credit processing amount.
311 Invalid Max hr debit amount.
313 Invalid Max transaction count daily.
340 Certification Chain Validation Error
348 Capture Over Available Amount
350 Merchant has terminals.
351 Merchant ID required.
352 Institution ID required.
353 Invalid Login.
354 Invalid Login.
355 New password mismatch.
356 New password same as old.
357 Console password required.
358 Invalid Login.
359 ISO Country code is invalid.
360 Website address in invalid.
361 Console Password Confirmation required.
362 Console Password Confirmation invalid.
363 Password Confirmation mismatch.
364 Name is invalid.
365 Institution ID is invalid.
366 Merchant ID is invalid.
367 Category Code is invalid.
368 Address is invalid.
369 City is invalid.
370 State is invalid.
371 Country is invalid.
372 Web Site is invalid.
373 Zip Code is invalid.
374 Phone is invalid.
375 FAX is invalid.
376 Email is invalid.
377 Contact is invalid.
378 Currency Code is invalid.
379 View Tran Detail is invalid.
380 Merchant ID not numeric.
381 Merchant Password data invalid.
382 Merchant Category Description invalid.
383 Merchant Password Confirmation invalid.
384 Merchant New Password invalid.
385 Merchant New Password is required.
386 Merchant New Confirm Password is required.
387 Merchant User Password is expired.
388 Merchant User Name is required.
389 Merchant User Password Confirmation is req
390 Password and confirmation password do not
391 Merchant User password length is too short
392 Merchant User Status is required.
393 Merchant User Status is invalid.
394 Merchant User Password is required.
395 Merchant Password and confirmation passwor
396 Merchant User new password same as old.
397 Merchant User inactive.
398 Merchant User Password length too long.
399 Merchant User ID is invalid.
400 Merchant User Password is invalid.
401 Merchant New Password is invalid.
402 Merchant User Name is invalid.
403 Merchant Password Expire Code is invalid.
404 Merchant Password Expires Date is invalid.
405 Merchant exists with this Merchanat Catego
407 Category code must be numeric.
408 Category code must be four digits.
420 Currency Code data in not available.
421 Currency Code minor digits is invalid.
450 Institution ID required.
451 Merchant ID required.
454 TranPortal password required.
455 TranPortal ID not unique.
456 Invalid TranPortal ID.
457 Action not supported.
458 Invalid Transaction Attempt.
459 Terminal not active.
460 TranPortal ID required.
461 Invalid Transaction amount.
462 Invalid Tranportal Password.
463 Invalid Terminal Institution ID.
464 Invalid Terminal Merchant ID.
465 Invalid Terminal Termainl ID.
466 Invalid Terminal Description.
467 Invalid Terminal External Connection ID.
468 Invalid Terminal Risk Profile.
469 Invalid Terminal Currency Code List.
470 Invalid Terminal Action Code List.
471 Invalid Terminal Payment Instrument List.
472 Invalid Terminal Brand List.
473 Invalid Terminal Option Code List.
474 Invalid Terminal Risk Flag.
475 Invalid Terminal Address Verification List
476 Invalid Terminal Tranportal ID.
477 Invalid Terminal Status.
478 Invalid Terminal Card Acceptor ID.
479 Invalid Terminal Card Acceptor Terminal ID
480 Invalid Terminal Acquirer Institution.
481 Invalid Terminal Base Terminal Data.
482 Invalid Terminal Retailer ID.
483 Invalid Terminal Retailer Group ID.
484 Invalid Terminal Retailer Region ID.
485 Invalid Terminal Cutover Hour.
486 Invalid Terminal Cutover Minute.
550 Category Code missing or invalid.
600 Card number required.
601 Card BIN required.
602 Invalid BIN length.
603 Institution ID required.
604 Merchant ID required.
605 Terminal ID required.
606 Card number required.
607 Invalid Card Number.
608 Invalid Currency Code.
609 Invalid Decline Reason.
610 Invalid Card Number.
611 Invalid Negative Reason.
612 Invalid Card Bin.
613 Invalid Negative Reason.
614 Please click correct button or tab to move
700 No processes available.
701 Batch not processed.
702 Batch could not be started.
703 Institution ID required.
704 Batch ID not numeric.
705 Batch ID required.
706 Invalid Batch Response File Name
750 Error hashing card number.
751 Search results greater than maximum number
752 External message system error
753 No Socket Available for TCPIP Connection.
850 Missing required data.
851 Invalid Action Type.
852 Invalid Card Number.
853 Invalid Card Number.
854 Invalid Expiration Date.
856 Invalid Card Verification Code.
857 Invalid Electronic Commerce Indicator.
858 Missing required data CVV
859 Missing required data Expiry Year
860 Missing required data Expiry Month
861 Missing required data Cardholder Name
862 Missing required data Card Address
863 Missing required data Card Postal Code
864 No initial CVV validated Txn
870 Missing required data.
871 Invalid Action Type.
872 Invalid Card Number.
873 Invalid Card Number.
874 Invalid Expiration Date.
875 Missing required data.
876 Invalid Card Verification Code.
877 Invalid Electronic Commerce Indicator.
878 Missing required data CVV
879 Missing required data Expiry Year
880 Missing required data Expiry Month
881 Missing required data Cardholder Name
882 Missing required data Card Address
883 Missing required data Card Postal Code
884 Missing required data ECI
885 Missing required data XID
886 Missing required data CAVV
950 Batch Upload Directory Required.
951 Batch Download Directory Required.
952 Batch Archive Directory Required.
953 Access Log Retention Days Required.
954 Transaction Log Retention Days Required.
955 Declined Card Retention Minutes Required.
956 Declined Card Maximum Count Required.
957 Access Log Retention Days Invalid.
958 Transaction Log Retention Days Invalid.
959 Declined Card Retention Minutes Invalid.
960 Declined Card Maximum Count Invalid.
961 Multiple Capture Flag Invalid.
962 Multiple Capture Amount Flag Invalid.
963 Multiple Void Flag Invalid.
964 Compare Void Amount Flag Invalid.
965 Multiple Credit Debit Flag Invalid.
966 Compare Credit Debit Amount Flag Invalid.
967 Batch Upload Directory Invalid.
968 Batch Download Directory Invalid.
969 Batch Archive Directory Invalid.
970 Invalid Terminal Cutover Hour.
971 Invalid Terminal Cutover Minute.
972 Card Number Mask Required.
973 Card Number Mask Invalid.
975 FAQ Question ID required.
976 Invalid Language ID.
977 Invalid Question ID.
978 Invalid Question content.
979 Invalid Answer content.
980 Error occurred when updating updating Syst
985 Error occurred when updating updating Merc
990 Card Number Encryption Failure.
995 TranPortal ID invalid.
996 TranPortal Password invalid.
997 Batch Action invalid.
998 Batch Transaction ID invalid.
999 Batch Filename invalid.
1000 Missing/Invalid merchantId/Password
1001 Invalid recurring flag
1001 Missing action Code
1002 Invalid action code
1002 Inavlid installement flag
1003 Recurring Not Allowed
1003 Missing trackid
1004 Missing card number
1005 Invalid card number
1006 Missing cvv
1007 Invalid cvv
1008 Missing expiry year
1010 Missing expiry month
1012 Missing amount
1013 Invalid amount
1014 Missing member
1016 Missing address
1018 Missing zip
1020 Invalid Language ID.
1020 Missing currency Code
1021 Invalid System News Header.
1022 Missing customer ip
1022 Invalid System News Body.
1024 Missing merchant ip
1025 Invalid xml
1026 Blocked customer IP
1027 Card Number blacklisted
1028 Card Number not whitelisted
1029 Bin Blacklisted
1030 Card Blacklisted
1030 Cardnumber Blacklisted
1040 Invalid Languange ID.
1040 Transaction model error
1041 Invalid Merchant Guideline Header.
1042 Invalid Merchant Guideline Body.
1060 Currency Code Required.
1061 Institution ID Required.
1062 Ivalid Minor Digits Range.
1063 Currency Code Not Numeric.
1064 Currency Code Not Valid ISO Code.
1065 Invalid Minor Digits.
1066 Invalid Amount.
1067 Invalid Currency Code Data.
1068 Invalid Currency Description Data.
1069 Invalid Minor Digits Data.
1070 Invalid Currency Symbol Data.
1071 Terminal exists with this Currency Code.
1072 Merchant exists with this Currency Code.
1073 Card Expiration Year Length Invalid
1074 Card Expiration Month Length Invalid
1075 Card Expiration Day Invalid
1076 Error Packing Host Message
1077 Card Postal Code Length Invalid
1078 Card Expiration Year Invalid
1079 Void Over Available Amount
1080 Tran Action Invalid
1081 Unable to determine supported brand for card number
1100 Option Invalid Attempt Lockout is invalid.
1101 Option Maximum Password Days is invalid.
1102 Option Minimum Password Length is invalid.
1103 Option Maximum Password Length is invalid.
1104 Option Min Password Length is greater than
1105 Minimum Bill Address Length is invalid
1106 Minimum Card Holder Length is invalid
1180 Hex required. The characters entered shoul
1181 Invalid Key length.
1182 Key encryption failed.
1190 TranPortal Password required.
1191 TranPortal Password invalid.
1192 Password encryption failed.
1193 Terminal Alias invalid.
1194 Error Generating Merchant Resource.
1200 Invalid parameter
1220 Institution is Invalid or NonNumeric
1221 Institution is Required.
1222 Start Time is Invalid (Format HH:MM).
1223 Start Time is Required.
1224 Process Limit is Invalid or NonNumeric
1225 Suspension Command Invalid.
1300 System Error
1400 Decline Error
1500 Processing Error
1600 Security Error
1700 Unexpected Error
1752 Original Transaction Mismatch
1753 Refund Not Allowed
1754 Multiple Captures Not Allowed
1755 Void After Capture Not Allowed
1800 Business Rule Error
1801 MCC missing to execute routing rule
1802 MCC not found in routing list
1804 Payment ID Invalid
1805 Invalid card brand or currency
1806 Invalid descriptor name
1807 Invalid descriptor city
2002 Virtual terminal transaction not allowed
2003 Maximum daily volume exceeded
2004 Maximum weekly volume exceeded
2005 Maximum monthly volume exceeded
2006 Maximum daily refund volume exceeded
2007 Maximum original credit volume exceeded
2008 Not enough funds for Original Credit
2009 Maximum {} refund volume exceeded
3014 Email on Blacklist
3015 Billing Address Blacklist
3017 Shipping Address Blacklist
3028 Threshold on Transaction Amount Monthly
3029 Threshold on Transaction Ticket
3030 IP/Billing Country Mismatch
3031 BIN/Billing Country Mismatch
3032 Shipping/Billing Country Mismatch
3033 Billing address in high risk country
3034 Shipping address in high risk country
3035 Velocity on BIN Daily
3037 Velocity on BINMonthly
3038 Velocity on IPDaily
3040 Velocity on IPMonthly
3041 Velocity on CardholderDaily
3043 Velocity on CardholderMonthly
3044 Velocity on Card numberDaily
3045 Velocity on Card number (Weekly)
3046 Velocity on Card numberMonthly
3047 Velocity on EmailDaily
3049 Velocity on Email Monthly
3050 Velocity on Billing AddressDaily
3052 Velocity on Billing AddressMonthly
3053 Velocity on Shipping AddressDaily
3055 Velocity on Shipping AddressMonthly
3056 Threshold on card number Daily
3057 Threshold on card number Monthly
3058 Velocity on Card number Quarterly
3059 Velocity on Card numberHalf Yearly
3060 Velocity on Card numberYearly
3063 Customer IP Blacklist
3067 Billing phone number blacklist
3068 Shipping phone number blacklist
3069 UCI blacklist
3070 Velocity on UCIDaily
3071 Velocity on UCIWeekly
3072 Velocity on UCIMonthly
3073 Velocity on UCIYearly
3074 Blacklist due to Fraud Filter
3075 Blacklist due to Retrieval Filter
3076 Blacklist due to Chargeback Filter
3077 Blacklist due to Fraud Email Filter
3078 Blacklist due to Retrieval Email Filter
3079 Blacklist due to Chargeback Email Filter
3080 BIN/Shipping Country Mismatch
3081 BIN/IP Country Mismatch
3083 Threshold on Card Number Hourly
3084 Threshold on Card Number Daily
3085 Threshold on Card Number Weekly
3086 Threshold on Card Number Monthly
3087 Threshold on Card Number Quarterly
3088 Threshold on Card Number Half Yearly
3089 Threshold on Card Number Yearly
9000 Acquiring Database error
9001 Acquiring service down
9997 Undefined host error
9998 Timeout
9999 Preprocessing internal error

Country Codes

Country Code Country Name Country ISO Number
AD Andorra 20
AE United Arab Emirates 784
AF Afghanistan 4
AG Antigua & Barbuda - -
AI Anguilla 660
AL Albania 8
AM Armenia 51
AN Netherlands Antilles - -
AO Angola 24
AQ Antarctica - -
AR Argentina 32
AS American Samoa 16
AT Austria 40
AU Australia 36
AW Aruba 533
AZ Azerbaijan 31
BA Bosnia and Herzegovina 70
BB Barbados 52
BD Bangladesh 50
BE Belgium 56
BF Burkina Faso 854
BG Bulgaria 100
BH Bahrain 48
BI Burundi 108
BJ Benin 204
BM Bermuda 60
BN Brunei Darussalam 96
BO Bolivia - -
BR Brazil 76
BS Bahama - -
BT Bhutan 64
BU Burma (no longer exists) - -
BV Bouvet Island - -
BW Botswana 72
BY Belarus 112
BZ Belize 84
CA Canada 124
CC Cocos (Keeling) Islands - -
CF Central African Republic - -
CG Congo 178
CH Switzerland 756
CI Côte D’ivoire (Ivory Coast) - -
CK Cook Iislands - -
CL Chile 152
CM Cameroon 120
CN China 156
CO Colombia 170
CR Costa Rica 188
CS Czechoslovakia (no longer exists) - -
CU Cuba - -
CV Cape Verde 132
CX Christmas Island - -
CY Cyprus 196
CZ Czech Republic 203
DD German Democratic Republic (no longer exists) - -
DE Germany 276
DJ Djibouti 262
DK Denmark 208
DM Dominica 212
DO Dominican Republic 214
DZ Algeria 12
EC Ecuador 218
EE Estonia 233
EG Egypt 818
EH Western Sahara - -
ER Eritrea - -
ES Spain 724
ET Ethiopia 231
FI Finland 246
FJ Fiji 242
FK Falkland Islands (Malvinas) - -
FM Micronesia - -
FO Faroe Islands - -
FR France 250
FX France, Metropolitan - -
GA Gabon 266
GB UK 826
GD Grenada 308
GE Georgia 268
GF French Guiana - -
GH Ghana 288
GI Gibraltar 292
GL Greenland - -
GM Gambia 270
GN Guinea 324
GP Guadeloupe - -
GQ Equatorial Guinea 226
GR Greece 300
GS South Georgia and the South Sandwich Islands - -
GT Guatemala 320
GU Guam 316
GW Guinea-Bissau 624
GY Guyana 328
HK Hong Kong 344
HM Heard & McDonald Islands - -
HN Honduras 340
HR Croatia 191
HT Haiti 332
HU Hungary 348
ID Indonesia 360
IE Ireland 372
IL Israel 376
IN India 356
IO British Indian Ocean Territory - -
IQ Iraq 368
IR Islamic Republic of Iran - -
IS Iceland 352
IT Italy 380
JM Jamaica 388
JO Jordan 400
JP Japan 392
KE Kenya 404
KG Kyrgyzstan 417
KH Cambodia 116
KI Kiribati 296
KM Comoros 174
KN St. Kitts and Nevis - -
KP Korea, Democratic People’s Republic of 408
KR Korea, Republic of 410
KW Kuwait 414
KY Cayman Islands 136
KZ Kazakhstan 398
LA Lao People’s Democratic Republic 418
LB Lebanon 422
LC Saint Lucia 662
LI Liechtenstein 438
LK Sri Lanka 144
LR Liberia 430
LS Lesotho 426
LT Lithuania 440
LU Luxembourg 442
LV Latvia 428
LY Libyan Arab Jamahiriya 434
MA Morocco 504
MC Monaco 492
MD Moldova, Republic of 498
MG Madagascar 450
MH Marshall Islands - -
ML Mali 466
MM Myanmar - -
MN Mongolia 496
MO Macau - -
MP Northern Mariana Islands - -
MQ Martinique - -
MR Mauritania 478
MS Monserrat - -
MT Malta 470
MU Mauritius 480
MV Maldives 462
MW Malawi 454
MX Mexico 484
MY Malaysia 458
MZ Mozambique 508
NA Namibia 516
NC New Caledonia - -
NE Niger 562
NF Norfolk Island - -
NG Nigeria 566
NI Nicaragua 558
NL Netherlands 528
NO Norway 578
NP Nepal 524
NR Nauru - -
NT Neutral Zone (no longer exists) - -
NU Niue 570
NZ New Zealand 554
OM Oman 512
PA Panama 591
PE Peru 604
PF French Polynesia - -
PG Papua New Guinea 598
PH Philippines 608
PK Pakistan 586
PL Poland 616
PM St. Pierre & Miquelon - -
PN Pitcairn - -
PR Puerto Rico 630
PT Portugal 620
PW Palau - -
PY Paraguay 600
QA Qatar 634
RE Réunion - -
RO Romania 642
RU Russian Federation 643
RW Rwanda 646
SA Saudi Arabia 682
SB Solomon Islands 90
SC Seychelles 690
SD Sudan - -
SE Sweden 752
SG Singapore 702
SH St. Helena - -
SI Slovenia 705
SJ Svalbard & Jan Mayen Islands - -
SK Slovakia 703
SL Sierra Leone 694
SM San Marino 674
SN Senegal 686
SO Somalia - -
SR Suriname 740
ST Sao Tome & Principe - -
SU Union of Soviet Socialist Republics (no longer exists) - -
SV El Salvador 222
SY Syrian Arab Republic 760
SZ Swaziland 748
TC Turks & Caicos Islands - -
TD Chad 148
TF French Southern Territories - -
TG Togo 768
TH Thailand 764
TJ Tajikistan 762
TK Tokelau - -
TM Turkmenistan 795
TN Tunisia 788
TO Tonga 776
TP East Timor - -
TR Turkey 792
TT Trinidad & Tobago - -
TV Tuvalu - -
TW Taiwan, Province of China 158
TZ Tanzania, United Republic of 834
UA Ukraine 804
UG Uganda 800
UM United States Minor Outlying Islands - -
US United States of America - -
UY Uruguay 858
UZ Uzbekistan 860
VA Vatican City State (Holy See) - -
VC St. Vincent & the Grenadines - -
VE Venezuela - -
VG British Virgin Islands - -
VI United States Virgin Islands - -
VN Viet Nam 704
VU Vanuatu 548
WF Wallis & Futuna Islands - -
WS Samoa 882
YD Democratic Yemen (no longer exists) - -
YE Yemen 887
YT Mayotte - -
YU Yugoslavia - -
ZA South Africa 710
ZM Zambia 894
ZR Zaire - -
ZW Zimbabwe 716
ZZ Unknown or unspecified country - -

Currency Codes

Entity Currency Alphabetic code
AFGHANISTAN Afghani AFN
ALAND ISLANDS Euro EUR
ALBANIA Lek ALL
ALGERIA Algerian Dinar DZD
AMERICAN SAMOA US Dollar USD
ANDORRA Euro EUR
ANGOLA Kwanza AOA
ANGUILLA East Caribbean Dollar XCD
ANTARCTICA No universal currency
ANTIGUA AND BARBUDA East Caribbean Dollar XCD
ARGENTINA Argentine Peso ARS
ARMENIA Armenian Dram AMD
ARUBA Aruban Guilder AWG
AUSTRALIA Australian Dollar AUD
AUSTRIA Euro EUR
AZERBAIJAN Azerbaijanian Manat AZN
BAHAMAS Bahamian Dollar BSD
BAHRAIN Bahraini Dinar BHD
BANGLADESH Taka BDT
BARBADOS Barbados Dollar BBD
BELARUS Belarussian Ruble BYR
BELGIUM Euro EUR
BELIZE Belize Dollar BZD
BENIN CFA Franc BCEAO XOF
BERMUDA Bermudian Dollar (customarily known as Bermuda Dollar) BMD
BHUTAN Indian Rupee INR
Ngultrum BTN
BOLIVIA Boliviano BOB
Mvdol BOV
BOSNIA AND HERZEGOVINA Convertible Marks BAM
BOTSWANA Pula BWP
BOUVET ISLAND Norwegian Krone NOK
BRAZIL Brazilian Real BRL
BRITISH INDIAN OCEAN TERRITORY US Dollar USD
BRUNEI DARUSSALAM Brunei Dollar BND
BULGARIA Bulgarian Lev BGN
BURKINA FASO CFA Franc BCEAO XOF
BURUNDI Burundi Franc BIF
CAMBODIA Riel KHR
CAMEROON CFA Franc BEAC XAF
CANADA Canadian Dollar CAD
CAPE VERDE Cape Verde Escudo CVE
CAYMAN ISLANDS Cayman Islands Dollar KYD
CENTRAL AFRICAN REPUBLIC CFA Franc BEAC XAF
CHAD CFA Franc BEAC XAF
CHILE Chilean Peso CLP
Unidades de fomento CLF
CHINA Yuan Renminbi CNY
CHRISTMAS ISLAND Australian Dollar AUD
COCOS (KEELING) ISLANDS Australian Dollar AUD
COLOMBIA Colombian Peso COP
Unidad de Valor Real COU
COMOROS Comoro Franc KMF
CONGO CFA Franc BEAC XAF
CONGO, THE DEMOCRATIC REPUBLIC OF Congolese Franc CDF
COOK ISLANDS New Zealand Dollar NZD
COSTA RICA Costa Rican Colon CRC
CïTE D’IVOIRE CFA Franc BCEAO XOF
CROATIA Croatian Kuna HRK
CUBA Cuban Peso CUP
Peso Convertible CUC
CYPRUS Euro EUR
CZECH REPUBLIC Czech Koruna CZK
DENMARK Danish Krone DKK
DJIBOUTI Djibouti Franc DJF
DOMINICA East Caribbean Dollar XCD
DOMINICAN REPUBLIC Dominican Peso DOP
ECUADOR US Dollar USD
EGYPT Egyptian Pound ST
EL SALVADOR El Salvador Colon SVC
US Dollar USD
EQUATORIAL GUINEA CFA Franc BEAC XAF
ERITREA Nakfa ERN
ESTONIA Kroon EEK
ETHIOPIA Ethiopian Birr ETB
FALKLAND ISLANDS (MALVINAS) Falkland Islands Pound FKP
FAROE ISLANDS Danish Krone DKK
FIJI Fiji Dollar FJD
FINLAND Euro EUR
FRANCE Euro EUR
FRENCH GUIANA Euro EUR
FRENCH POLYNESIA CFP Franc XPF
FRENCH SOUTHERN TERRITORIES Euro EUR
GABON CFA Franc BEAC XAF
GAMBIA Dalasi GMD
GEORGIA Lari GEL
GERMANY Euro EUR
GHANA Cedi GHS
GIBRALTAR Gibraltar Pound GIP
GREECE Euro EUR
GREENLAND Danish Krone DKK
GRENADA East Caribbean Dollar XCD
GUADELOUPE Euro EUR
GUAM US Dollar USD
GUATEMALA Quetzal GTQ
GUERNSEY Pound Sterling GBP
GUINEA Guinea Franc GNF
GUINEA-BISSAU CFA Franc BCEAO XOF
GUYANA Guyana Dollar GYD
HAITI Gourde HTG
US Dollar USD
HEARD ISLAND AND MCDONALD ISLANDS Australian Dollar AUD
HOLY SEE (VATICAN CITY STATE) Euro EUR
HONDURAS Lempira HNL
HONG KONG Hong Kong Dollar HKD
HUNGARY Forint HUF
ICELAND Iceland Krona ISK
INDIA Indian Rupee INR
INDONESIA Rupiah IDR
IRAN, ISLAMIC REPUBLIC OF Iranian Rial IRR
IRAQ Iraqi Dinar IQD
IRELAND Euro EUR
ISLE OF MAN Pound Sterling GBP
ISRAEL New Israeli Sheqel ILS
ITALY Euro EUR
JAMAICA Jamaican Dollar JMD
JAPAN Yen JPY
JERSEY Pound Sterling GBP
JORDAN Jordanian Dinar JOD
KAZAKHSTAN Tenge KZT
KENYA Kenyan Shilling KES
KIRIBATI Australian Dollar AUD
KOREA, DEMOCRATIC PEOPLE’S REPUBLIC OF North Korean Won KPW
KOREA, REPUBLIC OF Won KRW
KUWAIT Kuwaiti Dinar KWD
KYRGYZSTAN Som KGS
LAO PEOPLE’S DEMOCRATIC REPUBLIC Kip LAK
LATVIA Latvian Lats LVL
LEBANON Lebanese Pound LBP
LESOTHO Rand ZAR
Loti LSL
LIBERIA Liberian Dollar LRD
LIBYAN ARAB JAMAHIRIYA Libyan Dinar LYD
LIECHTENSTEIN Swiss Franc CHF
LITHUANIA Lithuanian Litas LTL
LUXEMBOURG Euro EUR
MACAO Pataca MOP
MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF Denar MKD
MADAGASCAR Malagasy Ariary MGA
MALAWI Kwacha MWK
MALAYSIA Malaysian Ringgit MYR
MALDIVES Rufiyaa MVR
MALI CFA Franc BCEAO XOF
MALTA Euro EUR
MARSHALL ISLANDS US Dollar USD
MARTINIQUE Euro EUR
MAURITANIA Ouguiya MRO
MAURITIUS Mauritius Rupee MUR
MAYOTTE Euro EUR
MEXICO Mexican Peso MXN
Mexican Unidad de Inversion (UDI) MXV
MICRONESIA, FEDERATED STATES OF US Dollar USD
MOLDOVA, REPUBLIC OF Moldovan Leu MDL
MONACO Euro EUR
MONGOLIA Tugrik MNT
MONTENEGRO Euro EUR
MONTSERRAT East Caribbean Dollar XCD
MOROCCO Moroccan Dirham MAD
MOZAMBIQUE Metical MZN
MYANMAR Kyat MMK
NAMIBIA Rand ZAR
Namibia Dollar NAD
NAURU Australian Dollar AUD
NEPAL Nepalese Rupee NPR
NETHERLANDS Euro EUR
NETHERLANDS ANTILLES Netherlands Antillian Guilder ANG
NEW CALEDONIA CFP Franc XPF
NEW ZEALAND New Zealand Dollar NZD
NICARAGUA Cordoba Oro NIO
NIGER CFA Franc BCEAO XOF
NIGERIA Naira NGN
NIUE New Zealand Dollar NZD
NORFOLK ISLAND Australian Dollar AUD
NORTHERN MARIANA ISLANDS US Dollar USD
NORWAY Norwegian Krone NOK
OMAN Rial Omani OMR
PAKISTAN Pakistan Rupee PKR
PALAU US Dollar USD
PANAMA Balboa PAB
US Dollar USD
PAPUA NEW GUINEA Kina PGK
PARAGUAY Guarani PYG
PERU Nuevo Sol PEN
PHILIPPINES Philippine Peso PHP
PITCAIRN New Zealand Dollar NZD
POLAND Zloty PLN
PORTUGAL Euro EUR
PUERTO RICO US Dollar USD
QATAR Qatari Rial QAR
RƒUNION Euro EUR
ROMANIA New Leu RON
RUSSIAN FEDERATION Russian Ruble RUB
RWANDA Rwanda Franc RWF
SAINT-BARTHƒLEMY Euro EUR
SAINT HELENA, ASCENSION AND TRISTAN DA CUNHA Saint Helena Pound SHP
SAINT KITTS AND NEVIS East Caribbean Dollar XCD
SAINT LUCIA East Caribbean Dollar XCD
SAINT MARTIN Euro EUR
SAINT PIERRE AND MIQUELON Euro EUR
SAINT VINCENT AND THE GRENADINES East Caribbean Dollar XCD
SAMOA Tala WST
SAN MARINO Euro EUR
SÌO TOME AND PRINCIPE Dobra STD
SAUDI ARABIA Saudi Riyal SAR
SENEGAL CFA Franc BCEAO XOF
SERBIA Serbian Dinar RSD
SEYCHELLES Seychelles Rupee SCR
SIERRA LEONE Leone SLL
SINGAPORE Singapore Dollar SGD
SLOVAKIA Euro EUR
SLOVENIA Euro EUR
SOLOMON ISLANDS Solomon Islands Dollar SBD
SOMALIA Somali Shilling SOS
SOUTH AFRICA Rand ZAR
SPAIN Euro EUR
SRI LANKA Sri Lanka Rupee LKR
SUDAN Sudanese Pound SDG
SURINAME Surinam Dollar SRD
SVALBARD AND JAN MAYEN Norwegian Krone NOK
SWAZILAND Lilangeni SZL
SWEDEN Swedish Krona SEK
SWITZERLAND Swiss Franc CHF
WIR Franc CHW
WIR Euro CHE
SYRIAN ARAB REPUBLIC Syrian Pound SYP
TAIWAN, PROVINCE OF CHINA New Taiwan Dollar TWD
TAJIKISTAN Somoni TJS
TANZANIA, UNITED REPUBLIC OF Tanzanian Shilling TZS
THAILAND Baht THB
TIMOR-LESTE US Dollar USD
TOGO CFA Franc BCEAO XOF
TOKELAU New Zealand Dollar NZD
TONGA Pa’anga TOP
TRINIDAD AND TOBAGO Trinidad and Tobago Dollar TTD
TUNISIA Tunisian Dinar TND
TURKEY Turkish Lira TRY
TURKMENISTAN Manat TMT
TURKS AND CAICOS ISLANDS US Dollar USD
TUVALU Australian Dollar AUD
UGANDA Uganda Shilling UGX
UKRAINE Hryvnia UAH
UNITED ARAB EMIRATES UAE Dirham AED
UNITED KINGDOM Pound Sterling GBP
UNITED STATES US Dollar USD
US Dollar (Same day) USS
US Dollar (Next day) USN
UNITED STATES MINOR OUTLYING ISLANDS US Dollar USD
URUGUAY Peso Uruguayo UYU
Uruguay Peso en Unidades Indexadas UYI
UZBEKISTAN Uzbekistan Sum UZS
VANUATU Vatu VUV
VATICAN CITY STATE (Holy See) Euro EUR
VENEZUELA Bolivar Fuerte VEF
VIET NAM Dong VND
VIRGIN ISLANDS (BRITISH) US Dollar USD
VIRGIN ISLANDS (U.S.) US Dollar USD
WALLIS AND FUTUNA CFP Franc XPF
WESTERN SAHARA Moroccan Dirham MAD
YEMEN Yemeni Rial YER
ZAMBIA Zambian Kwacha ZMK
ZIMBABWE Zimbabwe Dollar ZWL
Entity not applicable Gold XAU
Bond Markets Units European Composite Unit (EURCO) XBA
European Monetary Unit (E.M.U.-6) XBB
European Unit of Account 9(E.U.A.-9) XBC
European Unit of Account 17(E.U.A.-17) XBD
INTERNATIONAL MONETARY FUND (I.M.F) SDR XDR
Palladium XPD
Platinum XPT
Silver XAG
Special settlement currencies
UIC-Franc XFU
Codes specifically reserved for testing purposes XTS
The codes assigned for transactions where no currency is involved are: XXX
E Currency
BITCOIN XBT, USD, EUR

Query API Operation

The query api allows to retrieve the results for a transaction previously submitted for processing.

Query Transaction

Method: POST
Endpoint: query/transaction
Authentication Key: Secret key

Gateway Fields - Request and Response Fields

Below is a description of the gateway fields that are sent and receive through the gateway

Request Attributes

Execute a query transaction operation

          
          curl https://api.dasgateway.com/query/transaction\
-u secret_ex_key_123456789: \
-X POST \
-H "Content-Type: application/json" \
-d '{ "transaction_token": "tran_dccb75bf0c654cbf85c1b8ed92b76dd9", "merchant_txn_ref": "merchant ref 1", }'
          
          /* Update to a valid Key */
$api_key = "secret_ex_key_123456789";

/* Encode key to base64 */
$base64_key = base64_encode($api_key);

/* Create the array containing the Authorization header */
$headers = array("Authorization: Basic ".$base64_key,
"Content-Type: application/json"
);

$url = "https://api.dasgateway.com/query/transaction";

/* Create an array of the request attributes */
$post_vals = array(
"transaction_token" => "tran_dccb75bf0c654cbf85c1b8ed92b76dd9", "merchant_txn_ref" => "merchant ref 1", );
/* Convert the array to a JSON object */
$post_data = json_encode($post_vals);

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl,CURLOPT_RETURNTRANSFER, TRUE);
/* Set the cURL header */
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
/* Set the cURL method to POST */
curl_setopt($curl, CURLOPT_POST, 1);
/* Set the POST payload */
curl_setopt($curl, CURLOPT_POSTFIELDS, $post_data);

/* Execute the cURL request */
$curl_response = curl_exec($curl);

curl_close ($curl);
Attributes Type Mandatory Description
transaction_token String Yes Transaction token associated to the transaction.
merchant_txn_ref String No A reference for the transaction set by the merchant (ex: invoice number).
Remarks: Transaction token value has precedence over merchant_txn_ref

Response Attributes

Sample response

              
                  {
                      "transaction_token": "tran_dccb75bf0c654cbf85c1b8ed92b76dd9",
                      "merchant_txn_ref": "ref",
                      "action": "Purchase",
                      "currency": "USD",
                      "description": "",
                      "auth_code": "172653",
                      "transaction":
                          {
                                  "payment_token": "pay_bb9d1620b4674eef89a8ca6b11c29a5b",
                                  "amount": "1.00",
                                  "brand": "visa",
                                  "card": "454347******9996",
                          }
                      ,
                      "failure_information": "[]",
                      "response":[
                          {
                                  "responsecode": "0",
                                  "responsemessage": "Approved or completed available successfully",
                          }
                      ],

                      "success": "true"
                  }
Attributes Description
transaction_token Transaction token should be kept for reference.
merchant_txn_ref Merchant Transaction Reference
action Purchase for auto capture. Authorization for pre-authorization.
currency The billable currency of the transaction.
description Description associated to the transaction
auth_code Authorization code returned by the Acquirer.
transaction: payment_token Internal usage.
transaction: amount The billable amount of the transaction.
transaction: brand Card brand.
transaction: card Masked card number associated
failure_information Empty object if request was executed successfully. Object containing errors when the request execution failed.
response Contains response information after execution.
success true on successful execution. false on failure

Merchant Manual

Click here to download the DAS Merchant Manual.