Deposit Status Endpoint
Retrieve the status of a previously created deposit
post
https://api-stg.directa24.com
/apd/webpaystatus
Deposit Status
All the requests must be in x-www-form-urlencoded format and contain the following header:
Content-Type: application/x-www-form-urlencoded

Example Request

cURL
PHP
JAVA
C#
1
curl -X POST \
2
https://api-stg.directa24.com/apd/webpaystatus \
3
-H 'Content-Type: application/x-www-form-urlencoded' \
4
-d 'x_login=API_KEY&x_trans_key=API_PASSPHRASE&x_invoice=74170514&type=json'
5
6
Copied!
1
<?php
2
$curl = curl_init();
3
curl_setopt_array($curl, array(
4
CURLOPT_URL => "https://api-stg.directa24.com/apd/webpaystatus",
5
CURLOPT_RETURNTRANSFER => true,
6
CURLOPT_ENCODING => "",
7
CURLOPT_MAXREDIRS => 10,
8
CURLOPT_TIMEOUT => 30,
9
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
10
CURLOPT_CUSTOMREQUEST => "POST",
11
CURLOPT_POSTFIELDS => "x_login=X_LOGIN&x_trans_key=X_TRANS_KEY&x_invoice=74170514&type=json",
12
CURLOPT_HTTPHEADER => array(
13
"Content-Type: application/x-www-form-urlencoded"
14
),
15
));
16
$response = curl_exec($curl);
17
$err = curl_error($curl);
18
curl_close($curl);
19
20
Copied!
1
OkHttpClient client = new OkHttpClient();
2
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
3
RequestBody body = RequestBody.create(mediaType, "x_login=X_LOGIN&x_trans_key=X_TRANS_KEY&x_invoice=74170514&type=json");
4
Request request = new Request.Builder()
5
.url("https://api-stg.directa24.com/apd/webpaystatus")
6
.post(body)
7
.addHeader("Content-Type", "application/x-www-form-urlencoded")
8
.build();
9
Response response = client.newCall(request).execute();
10
11
Copied!
1
var client = new RestClient("https://api-stg.directa24.com/apd/webpaystatus");
2
var request = new RestRequest(Method.POST);
3
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
4
request.AddParameter("application/x-www-form-urlencoded", "x_login=X_LOGIN&x_trans_key=X_TRANS_KEY&x_invoice=74170514&type=json", ParameterType.RequestBody);
5
IRestResponse response = client.Execute(request);
6
7
Copied!

Example Response

Success Response
Deposit Not Found Response
1
{
2
"result": "9",
3
"x_iduser": "598287267",
4
"x_invoice": "MP_96ddb6ab85a347469e326887e6708182",
5
"x_amount": "3.00",
6
"PT": "0",
7
"Sign": "7EA302A09DBE4B22DB47E7FDDA5E3EEF9F098C6792882392B6E4C5A732CA79BE",
8
"x_document": "199702505",
9
"x_bank": "VI",
10
"x_payment_type": "03",
11
"x_bank_name": "Visa",
12
"x_currency": "USD",
13
"x_approval_detail": "Merchant Test",
14
"card_number": "410377******2126"
15
}
Copied!
1
{
2
"result": "6",
3
"x_iduser": "0",
4
"x_invoice": "MP_96ddb6ab8ff5a347469e326887e6708182",
5
"x_amount": "0",
6
"PT": "0",
7
"Sign": "38EB21EB314BA4CAEC51ACF30BBE129A03E5A6990BB3EF42F49FBA5AFDA10EC3",
8
"x_document": "-1",
9
"x_bank": " ",
10
"x_payment_type": "0",
11
"x_bank_name": " ",
12
"x_currency": " "
13
}
Copied!

Request fields description

Field
Format
Description
x_login
string (max length: 32)
Your Directa24 WEB STATUS API Key, found on Settings -> API Access.
x_trans_key
string (max length: 32)
Your Directa24 WEB STATUS API Passphrase, found on Settings -> API Access.
x_invoice
string (max length: 125)
The transaction's ID in your end to verify its status
type
string (max length: 20)
The format of the response: JSON, XML or STRING. If none is specified the response will be a pipe separated string.

Response fields description

Field
Description
result
Transaction status. See possible status codes
x_iduser
Unique user ID in your side
x_invoice
Unique identification for the transaction in your end
x_amount
Payment's amount
PT
Indicates whether the transaction was created with Test purposes or not, with the values: 0 for Production, 1 for Test
Sign
Control signature
x_document
Unique transaction's ID at Directa24
x_bank
Payment Method code. See Payment Method codes
x_payment_type
Payment type. See payment types
x_bank_name
Payment Method name
x_currency
Transaction's currency in ISO 4217
x_approval_detail
Deposit's description
card_number
Credit Card info

Control signature of the Webpaystatus Response

PHP
JAVA
C#
1
<?php
2
$message = $x_login . $result . $x_amount . $x_invoice ;
3
$Sign = strtoupper(hash_hmac('sha256', pack('A*', $message), pack('A*', $secretKey)));
4
?>
5
6
Copied!
1
String message = x_login + result + x_amount + x_invoice;
2
Mac hasher = Mac.getInstance("HmacSHA256");
3
hasher.init(new SecretKeySpec(secretKey.getBytes(), "HmacSHA256"));
4
5
String Sign = Base64.encodeBase64String(hasher.doFinal(message.getBytes())).toUpperCase();
6
7
Copied!
1
string message = x_login + result + x_amount + x_invoice;
2
byte[] keyByte = new ASCIIEncoding().GetBytes(secretKey);
3
byte[] messageBytes = new ASCIIEncoding().GetBytes(message);
4
byte[] hashmessage = new HMACSHA256(keyByte).ComputeHash(messageBytes);
5
6
string Sign = BitConverter.ToString(hashmessage).Replace("-", "").ToUpper();
7
8
Copied!
The response control signature includes the following fields:
  • x_login - your DEPOSITS API Key which can be found in the Merchant Panel by going to Settings -> API Access -> Deposit Credentials -> API Key
  • result
  • x_amount
  • x_invoice
  • secretKey - your DEPOSITS Signature Key which can be found in the Merchant Panel by going to Settings -> API Access -> Deposit Credentials -> API Signature

Status Flow

Click here to see each Deposit Status meaning.

Hosted Checkout Status Flow

Deposit Status Flow for the Streamline and Hybrid APIs
  1. 1.
    The DECLINED status is not a status by itself. It means the transaction couldn't be created because of an error with the data, the customer or the merchant configuration. No transaction will change its status from DECLINED.
  2. 2.
    COMPLETED and CANCELLED* are final status.
  3. 3.
    *There are cases in which the users pays after the deposit expired, or payed an incorrect amount and the deposit gets expired. When that happens manual intervention is required to approve the deposit hence a deposit could change its status from CANCELLED to COMPLETED.
  4. 4.
    If the user doesn't pays, the transaction will expire and be marked as CANCELLED.
  5. 5.
    No transaction will change from COMPLETED to CANCELLED.

Status codes

Check all the possible status in the following page:
Last modified 3mo ago