Direct Debit Payment Notification
This API is used for Merchant/Partner to notify the upcoming direct debit payment. Please do note that there will be a 24H frozen period to apply the payment. This API is not needed for non-periodic payment. For periodic payment, please call the API 2-5 days prior to inform user of the deduction.
*This API is only available for whitelisted merchants. If you need any help, you can contact us: [email protected]
EndPoint
POST /binancepay/openapi/pay/notify
Request Parameters
| Attributes | Type | Required | Limitation | Description | 
|---|---|---|---|---|
| subMerchantId | string | N | maximum length 19 | The sub merchant account id, issued when sub merchant been created at Binance, The parameter subMerchantId is required when configuring show subMerchant info. | 
| merchantRequestId | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The order id, Unique identifier for the request, idempotent result will be returned for same requestId | 
| tradeMode | string | Y | "DIRECT_DEBIT" | |
| bizId | Long | Y | number | business orderId like contractId | 
| estimatedAmount | decimal | Y | Max Unit Range: 8 decimal places | Amount to be deducted, please ensure the amount do not exceed the singleUpperLimit of the contract. | 
| currency | string | Y | only "USDT" can be accepted, fiat NOT supported. | order currency | 
Sample Request Body
{
    "subMerchantId": 123,
    "merchantRequestId": "abcd",
    "tradeMode": "DIRECT_DEBIT",
    "bizId":123,
    "estimatedAmount": 6,
    "currency":"USDT"
}
Response Parameters
| Attributes | Type | Required | Limitation | Description | 
|---|---|---|---|---|
| status | string | Y | "SUCCESS" or "FAIL" | status of the API request | 
| code | string | Y | - | request result code, refer to | 
| data | DataObject | N | - | response body, refer to | 
| errorMessage | string | N | maximum length 256 | 
Child Attribute
DataObject
| Attributes | Type | Required | Limitation | Description | 
|---|---|---|---|---|
| orderId | string | Y | maximum length 19 | unique id generated by binance | 
| merchantRequestId | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The order id, Unique identifier for the request | 
| transactionTime | long | Y | - | transaction time in milli seconds | 
Sample Response
applied success
{
    "status": "SUCCESS",
    "code": "000000",
    "data": {
        "merchantRequestId": "a0e29ab291fe6eeec5f13031b38ae284",
        "orderId": "203740009645850624",
        "transactionTime": 1672710635911
    }
}
Result Code
| Name | Code | Reason | Solution | 
|---|---|---|---|
| UNKNOWN_ERROR | 400000 | An unknown error occurred while processing the request. | Try again later | 
| INVALID_REQUEST | 400001 | Parameter format is wrong or parameter transferring doesn't follow the rules. | Please check whether the parameters are correct. | 
| INVALID_SIGNATURE | 400002 | Incorrect signature result | Check whether the signature parameter and method comply with signature algorithm requirements. | 
| INVALID_TIMESTAMP | 400003 | Timestamp for this request is outside of the time window. | Sync server clock | 
| INVALID_API_KEY_OR_IP | 400004 | API identity key not found or invalid. | Check API identity key | 
| BAD_API_KEY_FMT | 400005 | API identity key format invalid. | Check API identity key. | 
| BAD_HTTP_METHOD | 400006 | Request method not supported. | Check Request method. | 
| MEDIA_TYPE_NOT_SUPPORTED | 400007 | Media type not supported. | Check Request Media type. | 
| INVALID_REQUEST_BODY | 400008 | Request body is not a valid json object. | Check Request body | 
| MANDATORY_PARAM_EMPTY_OR_MALFORMED | 400100 | A parameter was missing/empty/null, or malformed. | |
| INVALID_PARAM_WRONG_LENGTH | 400101 | A parameter was not valid, was empty/null, or too long/short, or wrong format. | |
| INVALID_PARAM_WRONG_VALUE | 400102 | A parameter was not valid, the value is out of range. | |
| INVALID_PARAM_ILLEGAL_CHAR | 400103 | A parameter was not valid, contains illegal characters | |
| MERCHANT_TRANSFER_MERCHANT_TYPE_INVALID | 406107 | Merchant type not valid not support individual merchant | |
| MERCHANT_TRANSFER_MERCHANT_TOO_FREQUENT | 406108 | Fail rate is high, please try again later |