API Bkpays Doc
english
  • english
  • 中文
  1. Development Guide
API Bkpays Doc
english
  • english
  • 中文
  • Development Guide
    • Development Integration Guidelines
    • API Request Structure Definition
    • APIs Signature
    • Postman And SDK
    • APIs WebHook
    • Order Status
    • APIs Error Code List
    • PCI Compliance
    • Payment Process Explanation
  • Transaction APIs
    • North America
      • USA
        • Payment
        • Payout
      • Mexico
        • Payment
        • Payout
    • South America
      • Brazil
        • Payment
        • Payout
      • Colombia
        • Payment
        • Payout
      • Ecuador
        • Payment
        • Payout
      • Argentina
        • Payment
        • Payout
      • Peru
        • Payment
        • Payout
      • Chile
        • Payment
        • Payout
      • Venezuela
        • Payment
        • Payout
    • Asia
      • Indonesia
        • Payment
        • Payout
      • Philippines
        • Payment
        • Payout
      • Thailand
        • Payment
        • Payout
      • Malaysia
        • 收款
        • 出款
      • Bengal
        • Payment
        • Payout
      • India
        • Payment
        • Payout
      • Pakistan
        • Payment
        • Payout
    • Europe
      • Russia
        • Payment
        • Payout
    • Mid East
      • United Arab Emirates
        • Payment
        • Payout
      • Turkey
        • Payment
        • Payout
    • Africa
      • Kenya
        • Payment
        • Payout
      • Nigeria
        • Payment
        • Payout
      • South Africa
        • Payment
        • Payout
      • Tanzania
        • Payment
        • Payout
    • Global universal payment
      • Payment
      • Payout
  • Common APIs
    • Payout Voucher Query
      POST
    • Account Balance Query
      POST
    • Order Status Query
      POST
  • Payment of Video Case
    • Video Case
    • Payment method Logo
  • Dashboard Guide
    • Bind Google Authenticator 2FA
  • Schemas
    • Payment Common Request Body
    • Payment Common Response Body
    • Payout Common Request Body
    • Payout Common Response Body
  1. Development Guide

APIs WebHook

1. API Webhook (Callback) Introduction#

📌
To enable the webhook feature, merchants must specify the webhook URL in the 【callbackUrl】 parameter during API order placement. If no URL is provided, no notifications will be sent. The system will callback to notify merchants via POST JSON data.
Webhooks trigger HTTP callbacks when collection or payout orders reach final status.

2. Webhook Callback Parameters(HTTPS POST)#

Http Header
ParameterNameTypeRequiredExample
signSignature StringStringYae3daa4e6739a3955d67981f
Http payload
ParameterNameTypeRequiredExample
mchOrderIdMerchant Order NumberStringYDeffe998283
orderIdPlatform Order NumberStringY202304141646943827467169734
bankIdBank Order NumberStringNDF55BA0F441A
orderStatusOrder Status;
SUCCESS;
FAILED;
REVERSED;
PAYING;
Details refer toOrder Status
StringYSUCCESS
amountOrder Amount (in currency unit); 2 decimal places retainedStringY1.00
realAmountActual Amount (in currency unit); 2 decimal places retainedString1.00
orderTypeOrder Type;
PAYMENT
PAYOUT
StringYPAYMENT
failMessageFailure ReasonStringN
createTimeCreation Time (UTC);
Format: yyyyMMddHHmmss;
StringY20230307000000
transIdsExtended Order NumberStringNEDF55BA0F441A
payMethodPayment MethodStringNPIX
mchFeeMerchant FeeStringN2.00
currencyCurrencyStringN
USD
The response must be "success" or HTTP status 200 to indicate successful receipt of the request. Otherwise, if the response is not "success" or 200, the system will retry the callback up to 7 times with increasing intervals (5 minutes * callback attempt count).
Webhook Callback Example

3. Webhook Header Signature Rules#

📌
Signature string signBody = http payload + key
http payload is the callback JSON data (use the raw returned data for signing without encapsulation)
key is the merchant secret key
The signature generation algorithm is consistent with order placement 【sha512】
Signature Example
// Reference callback example
payload ={"realAmount":"166840.0","orderType":"PAYOUT","bankId":"9jZVPfXobPGXXnt","amount":"166840.0","createTime":"20250812091550","orderId":"202508121955196515039150080","payMethod":"NET_BANKING","orderStatus":"SUCCESS","mchOrderId":"W20250812091450181OT","failMessage":"fix order to SUCCESS"} 

// signBody = http paload + key
signBody = {"realAmount":"166840.0","orderType":"PAYOUT","bankId":"9jZVPfXobPGXXnt","amount":"166840.0","createTime":"20250812091550","orderId":"202508121955196515039150080","payMethod":"NET_BANKING","orderStatus":"SUCCESS","mchOrderId":"W20250812091450181OT","failMessage":"fix order to SUCCESS"}Dkfldkfl==

// Verify signature correctness
Digester d = DigestUtil.digester(DigestAlgorithm.SHA512);  
String sign = d.digestHex(signBody);
Boolean verifyResult=StrUtil.equals(sign,request.getHeader('sign'))

4. Webhook Callback Testing & Verification#

📌
After logging into the Dashboard, merchants can test webhook functionality by placing orders via API and querying pending orders. Click the "mock success" and "mock fail" buttons to simulate successful and failed order notifications respectively to the webhook URL, facilitating signature and message verification. Actual transactions are not recorded during testing.

5. WebhookWebhook Callback IP Addresses#

ZoneWebhook IPs
North America18.228.164.232、18.228.73.43、54.233.252.236、54.94.8.45
South America18.228.164.232、18.228.73.43、54.233.252.236、54.94.8.45
Asia13.200.70.4、15.207.47.92、3.108.48.106、43.205.72.188
Mid East13.200.70.4、15.207.47.92、3.108.48.106、43.205.72.188
Europe13.200.70.4、15.207.47.92、3.108.48.106、43.205.72.188
Africa13.200.70.4、15.207.47.92、3.108.48.106、43.205.72.188
Modified at 2025-12-05 12:56:10
Previous
Postman And SDK
Next
Order Status
Built with