Skip to content

BayadGate API Documentation

API reference for payment creation, payout settlement, status queries, signature generation, and asynchronous callbacks.

API v1Operationalhttps://BayadGate.com/api

1.2 Endpoint Directories

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

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

2.0 Security & Signature Generation

To prevent malicious request interception, every API interaction with the BayadGate 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);

3.0 Create Payment Interface

Initiate consumer checkout paths and deposit redirects.

Request Parameters

ParameterTypeRequiredDescription
merchant_idStringYesStore ID assigned on BayadGate platform.
amountNumberYesPayment value, standardized to 2 decimal places (e.g. 150.00).
order_idStringYesUnique merchant transaction invoice tracking reference.
payment_methodStringYesGCASH, MAYA, or GOTYME.
redirect_urlStringYesOutbound destination URL for payout/deposit completion webhooks.
signStringYesThe 32-character MD5 query verification signature.

JSON Response Payload

JSON
{
  "status": "SUCCESS",
  "message": "Payment initialised successfully",
  "order_id": "TXN2026",
  "amount": "150.00",
  "payment_url": "https://BayadGate.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.

4.0 Withdrawal Payout Interface

Initiate settlements and outward transfers from your merchant wallet balance.

Request Parameters

ParameterTypeRequiredDescription
merchant_idStringYesStore identifier.
amountNumberYesRequested withdrawal payout value (e.g. 500.00).
order_idStringYesWithdrawal record tracking reference.
bank_codeStringYesChannel destination (GCASH, MAYA, or GOTYME).
account_nameStringYesThe destination card holder name or recipient Gcash name.
account_noStringYesReceiving mobile wallet phone number or card number.
signStringYesThe calculated cryptographic MD5 signature.

5.0 Asynchronous Notification Webhook (Callback)

BayadGate 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

BayadGate triggers the merchant notification endpoint via standard POST parameters:

Parameter NameTypeInformation and Values
merchant_idStringStore client ID string.
order_idStringOriginal tracking invoice reference.
amountStringGross transaction value with standard decimals (e.g., 100.00).
statusStringStandard transaction outcome. Fixed to success value: 5.
signStringCryptographic validation signature generated using your merchant BayadGate secret key.

Callback endpoint

Gateway callback path: https://BayadGate.com/api/callback.php

Copied to clipboard.