Deposit Status Endpoint

Retrieve the status of a previously created deposit

post
Deposit Status

https://api-stg.directa24.com/apd/webpaystatus
This endpoint allows you to retrieve the status of a deposit
Request
Response
Request
Headers
Content-Type
required
string
application/x-www-form-urlencoded
Body Parameters
x_login
required
string
Your Directa24 WEB STATUS API Key, found on the Merchant Panel by going to Settings -> API Access -> Web Status Credentials -> API Key
x_trans_key
required
string
Your Directa24 WEB STATUS API Passphrase, found on Merchant Panel by going to Settings -> API Access -> Web Status Credentials -> API Passphrase
x_invoice
required
string
The transaction's ID in your end to verify its status
type
optional
string
The format of the response: JSON, XML or STRING. If none is specified the response will be a pipe separated string
Response
200: OK
Success response
Deposit OK
Deposit Not Found
Deposit OK
{
"result": "9",
"x_iduser": "4-8639937875866184408",
"x_invoice": "postmanTest3426757",
"x_amount": "2400.00",
"PT": "1",
"Sign": "1A62410713F99834E44E4F50525DF1C464AF3F4188D0B8EF55CD6F9729810480",
"x_document": "300571838",
"x_bank": "RE",
"x_payment_type": "02",
"x_bank_name": "Red Pagos",
"x_currency": "UYU"
}
Deposit Not Found
{
"result": "6",
"x_iduser": "0",
"x_invoice": "test4568",
"x_amount": "0",
"PT": "0",
"Sign": "852EDC3279AC1BE4A559FDED98CB9BECB79F1A25B87AE2B6BE1A8FB303D93AB8",
"x_document": "-1",
"x_bank": " ",
"x_payment_type": "0",
"x_bank_name": " ",
"x_currency": " "
}

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

Example Response

Success Response
Deposit Not Found Response
Success Response
{
"result": "9",
"x_iduser": "598287267",
"x_invoice": "MP_96ddb6ab85a347469e326887e6708182",
"x_amount": "3.00",
"PT": "0",
"Sign": "7EA302A09DBE4B22DB47E7FDDA5E3EEF9F098C6792882392B6E4C5A732CA79BE",
"x_document": "199702505",
"x_bank": "VI",
"x_payment_type": "03",
"x_bank_name": "Visa",
"x_currency": "USD",
"x_approval_detail": "Merchant Test",
"card_number": "410377******2126"
}
Deposit Not Found Response
{
"result": "6",
"x_iduser": "0",
"x_invoice": "MP_96ddb6ab8ff5a347469e326887e6708182",
"x_amount": "0",
"PT": "0",
"Sign": "38EB21EB314BA4CAEC51ACF30BBE129A03E5A6990BB3EF42F49FBA5AFDA10EC3",
"x_document": "-1",
"x_bank": " ",
"x_payment_type": "0",
"x_bank_name": " ",
"x_currency": " "
}

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#
PHP
<?php
$message = $x_login . $result . $x_amount . $x_invoice ;
$Sign = strtoupper(hash_hmac('sha256', pack('A*', $message), pack('A*', $secretKey)));
?>
JAVA
String message = x_login + result + x_amount + x_invoice;
Mac hasher = Mac.getInstance("HmacSHA256");
hasher.init(new SecretKeySpec(secretKey.getBytes(), "HmacSHA256"));
String Sign = Base64.encodeBase64String(hasher.doFinal(message.getBytes())).toUpperCase();
C#
string message = x_login + result + x_amount + x_invoice;
byte[] keyByte = new ASCIIEncoding().GetBytes(secretKey);
byte[] messageBytes = new ASCIIEncoding().GetBytes(message);
byte[] hashmessage = new HMACSHA256(keyByte).ComputeHash(messageBytes);
string Sign = BitConverter.ToString(hashmessage).Replace("-", "").ToUpper();

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. 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. COMPLETED and CANCELLED* are final status.

  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. If the user doesn't pays, the transaction will expire and be marked as CANCELLED.

  5. No transaction will change from COMPLETED to CANCELLED.

Status codes

Check all the possible status in the following page: