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 Signature

1. Obtaining Merchant Number and Secret Key#

Search on the Dashboard

2. API Signature#

2.1 Signature Algorithm#

TypeDescription
AlgorithmSHA512

2.3 HTTP Header Standard Signature Parameters Required for All Order Requests#

General Header Parameter Description (The following parameters are placed in the http header)
ParameterNameTypeRequiredExample
serviceNameFix valueStringMapi.pay
mchIdMerchant Number; Search on the DashboardStringM2020423200001
signTypeSignature TypeStringMSHA512
timestampTimestamp (seconds)StringM1713110548
signSignature StringStringM

2.4 Sign Signature Rules#

Use the SHA512 signature algorithm to sign the Signature string.
Signature string rule: mchId + serviceName + method + timestamp + signType + data + key
mchId, serviceName, method, timestamp, signType are the HTTP Header parameters.
data is the payload data from the API order request, i.e., the JSON order parameters.
key is the merchant secret key assigned after successful KYB.

2.5 Signature Example#

Request Body
Response Body
Actual Signature
POST /gateway/base/biz HTTP/1.1
method: pay
signType: SHA512
serviceName: api.pay
mchId: 1416010331032883233
timestamp: 1631671670
sign: 9d7bb11c4faf54523b24bd65fa9e104e0b926e7e7932b5c99ba4b1d017f5aed8b5190bedb6b149f745ff768a2faaee78485207943004d2575380d3e3cc00c718
Content-Type: application/json

{
"amount": "5.00",
"callbackUrl": "http://127.0.0.1:8082/callback",
"redirectUrl":"http://www.baidu.com",
"currency": "BRL",
"dynamic": "1",
"email": "muazpe@gmail.com",
"firstname": "Murilo Azeredo Pereira",
"lastname": "your lasttname",
"mchOrderId": "1232434323233463411fv34",
"phone": "+5511967164793",
"docNumber": "14868845802",
"docType": "CPF",
"productinfo": "your pro simple desc"
}

3 API Response Format#

API HTTP Response Standard Format#

The response data is in JSON format. httpCode 200 indicates a successful request, httpCode 400 indicates a request information error.
ParameterNameTypeRequiredExample
resultCodeResult CodeStringMSuccess: 000000
errorCodeError CodeStringMSuccess: 000000
errorMsgError MessageStringO
dataResponse DataObjectOReturns JSON data
timestampTimestamp (seconds)StringO
HTTP Response Parameter Description (All API responses follow the above format)

2.2 API HTTP Request Notes#

Calling Method: HTTPS POST (GET method is not supported). The API is based on HTTPS.
Request and response use JSON data format. Merchant key + SHA512 signature + IP whitelist are used to ensure request data security and network security.
Due to scenarios like active callbacks and automatic callbacks initiated by the system, a single transaction might be called back to the merchant multiple times. Please implement duplicate prevention mechanisms to avoid transaction anomalies.
The production environment requires binding the IP address of the client's server making the order requests; IP binding is not required for redirects.
"+": In the examples, the plus sign indicates string concatenation, not arithmetic addition.
Modified at 2025-12-05 12:56:10
Previous
API Request Structure Definition
Next
Postman And SDK
Built with