🚀 Start collecting payments in minutes. Sign up now →
Section 1.0

System Overview & Integration Rules

The BayaDex Secure Gateway provides robust and lightweight payment processing for merchants, featuring localized settlement methods in the Philippines, including GCash, Maya, and GoTyme. All transactions are denominated in Philippine Pesos (PHP, ₱) and must include exactly two decimal points (e.g., 100.00).

1.1 Transaction Fees

Upon successful deposit verification via BayaDex callback endpoints, a default processing fee is applied:

Mathematical Formula Net Amount = Gross Amount × (1 - 0.040)
4.0% Deposit Fee

Deducted from gross deposit, credited directly to wallet.

1.2 Endpoint Directories

Base Gateway URL: https://bayadex.com/api

Interface Endpoint Path Description
Create Payment /checkout.php Initiates consumer payment redirects and transactions.
Asynchronous Callback /callback.php Upstream network gateway receiver processing deposits.
Create Payout /payout.php Handles withdrawal settlement orders.
Single Status Query /query_status.php Retrieves concrete data for specific orders.
Section 2.0

Security & Signature Generation

To prevent malicious request interception, every API interaction with the BayaDex engine must include an MD5 sign string generated using the following procedure:

2.1 Signature Generation Steps

1

Ascending ASCII Sort

Organize all request parameters alphabetically by their keys.

2

Query Formatting

Standardize keys and values into a query string: k1=v1&k2=v2 (Omit empty fields).

3

Secret Suffixation

Append your private secret key to the end: &key=your_secret_key.

4

32-character MD5 Output

Convert the combined string into a 32-character lowercase hex signature.

2.2 PHP Reference Code

signature.php
// Prepare params array
$smm_params = [
  'merchant_id' => 7005,
  'order_id'    => 'TXN2026',
  'amount'      => '500.00',
  'status'      => '5'
];

// Alphabetical ascending key sort
ksort($smm_params);

$signStr = "";
foreach ($smm_params as $k => $v) {
  if ($v !== "") {
    $signStr .= $k . '=' . $v . '&';
  }
}

// Append key and generate MD5 hash
$sign = md5(rtrim($signStr, '&') . '&key=' . $merchant_secret);
Section 3.0

Create Payment Interface

Initiate consumer checkout paths and deposit redirects.

POST
Endpoint URL https://bayadex.com/api/checkout.php

Request Parameters

Parameter Type Required Description
merchant_id String Yes Store ID assigned on BayaDex platform.
amount Number Yes Payment value, standardized to 2 decimal places (e.g. 150.00).
order_id String Yes Unique merchant transaction invoice tracking reference.
payment_method String Yes GCASH, MAYA, or GOTYME.
redirect_url String Yes Outbound destination URL for payout/deposit completion webhooks.
sign String Yes The 32-character MD5 query verification signature.

JSON Response Payload

{
  "status": "SUCCESS",
  "message": "Payment initialised successfully",
  "order_id": "TXN2026",
  "amount": "150.00",
  "payment_url": "https://bayadex.com/checkout.php?invoice=TXN2026"
}

Notice on Redirects: Merchants must securely capture the payment_url value from the JSON response and redirect the client's browser session immediately to complete verification.

Section 4.0

Withdrawal Payout Interface

Initiate settlements and outward transfers from your merchant wallet balance.

POST
Endpoint URL https://bayadex.com/api/payout.php

Request Parameters

Parameter Type Required Description
merchant_id String Yes Store identifier.
amount Number Yes Requested withdrawal payout value (e.g. 500.00).
order_id String Yes Withdrawal record tracking reference.
bank_code String Yes Channel destination (GCASH, MAYA, or GOTYME).
account_name String Yes The destination card holder name or recipient Gcash name.
account_no String Yes Receiving mobile wallet phone number or card number.
sign String Yes The calculated cryptographic MD5 signature.
Section 5.0

Asynchronous Notification Webhook (Callback)

BayaDex emits a secure, automated callback notification request to the merchant systems as soon as upstream transactions update to the success state.

Important Notice: Your merchant webhook endpoint must accurately verify incoming signatures and output raw plaintext "SUCCESS" to prevent automatic re-queue logic (up to 5 retry attempts).

5.1 Outbound Payload Structure

BayaDex triggers the merchant notification endpoint via standard POST parameters:

Parameter Name Type Information and Values
merchant_id String Store client ID string.
order_id String Original tracking invoice reference.
amount String Gross transaction value with standard decimals (e.g., 100.00).
status String Standard transaction outcome. Fixed to success value: 5.
sign String Cryptographic validation signature generated using your merchant BayaDex secret key.