Direct Debit/Pre Authorization Create Contract
This API used for merchant/partner to create direct debit/ pre authorization contract for user authorization.
*This API is only available for whitelisted merchants. If you need any help, you can contact us: merchant@binance.com
#
EndPoint#
Request ParametersAttributes | Type | Required | Limitation | Description |
---|---|---|---|---|
subMerchantId | string | N | maximum length 19 | The sub merchant account id, issued when sub merchant been created at Binance. |
merchantContractCode | string | Y | letter or digit, no other symbol allowed, maximum length 32 | The unique ID assigned by the merchant to identify a direct debit contract request. |
serviceName | string | Y | maximum length 32 | service name |
scenarioCode | string | Y | eg. General_Travel, for more please refer to | |
singleUpperLimit | decimal | Y | Max Unit Range: 8 decimal places | upper limit related to scenarioCode, for more please refer to |
currency | string | Y | only "BUSD","USDT" can be accepted, fiat NOT supported. | currency |
periodic | boolean | Y | true/false | this contract support periodic debit or not |
cycleDebitFixed | boolean | N | true/false | mandatory if periodic = true. true = fixed amount, false = variable amount |
cycleType | string | N | MONTH or DAY | mandatory if periodic = true. Values: MONTH or DAY |
cycleValue | integer | N | - | mandatory if periodic = true. Values: if cycleType=MONTH: 1~24, cycleType=DAY: interval days >7 Combining with another parameter cycleType to determine the deduction period, for example, cycleType is DAY, cycleValue=30, then the deduction period is 30 days; cycleType is MONTH, cycleValue=3, then the deduction period is 3 natural months. |
firstDeductTime | long | N | - | mandatory if periodic = true. first deduct time, must be a future time in milli seconds. if cycleType=MONTH, the firstDeductTime is not allowed to pass the date after the 28th UTC (can pass the 28th) |
merchantAccountNo | string | N | maximum length 64 | the userID/user account in merchant side e.g. xxx@gmail.com |
requestExpireTime | long | N | - | If not specified, requestExpireTime will be 1 hour. maximum is 1 hour in milliseconds. |
contractEndTime | long | N | - | If not specified, contractEndTime will be the time after 1095 days (about 3 years). maximum is 1095 days in milliseconds. |
#
scenario-codeScenario Code | Default Upper limit |
---|---|
GENERAL_ECOMMERCE_PLATFORM | 50 USD equivalent |
GENERAL_TRAVEL | 50 USD equivalent |
CAR_RENTAL | 50 USD equivalent |
CAR_PARKING | 50 USD equivalent |
LEASE | 50 USD equivalent |
CATERING | 50 USD equivalent |
DIGITAL_MEDIA | 50 USD equivalent |
MEMBERSHIP | 50 USD equivalent |
UTILITY | 50 USD equivalent |
REPAYMENT | 50 USD equivalent |
INVESTMENT | 50 USD equivalent |
TICKET | 50 USD equivalent |
MOBILE_COMMUNICATION | 50 USD equivalent |
VIRTUAL_GOODS | 50 USD equivalent |
OTHERS | 50 USD equivalent |
#
Sample Request Body#
Response ParametersAttributes | 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#
DataObjectAttributes | Type | Required | Limitation | Description |
---|---|---|---|---|
merchantId | Long | Y | number | merchant Id in binance |
preContractId | string | Y | maximum length 19 | unique id generated by binance |
contractEndTime | long | Y | - | contract will be expired at this time |
requestExpireTime | long | Y | - | user can not sign contract after this time |
qrContent | string | Y | maximum length 256 | qr content info |
qrcodeLink | string | Y | maximum length 256 | qr code img link |
deeplink | string | Y | maximum length 256 | deeplink to open binance app to sign contract |
#
Sample Response#
applied success#
Result CodeName | 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 | |
PAYMENT_INVALID_PARAM | 400702 | Invalid request parameter | |
MERCHANT_ACCESS_FORBIDDEN | 400606 | Account has no accessibility to this function | |
INVALID_REQUEST_CURRENCY_NOT_SUPPORTED | 400105 | Invalid request, currency is not supported | |
PAYMENT_DIRECT_DEBIT_EXCEED_LIMIT | 406200 | The singleUpperLimit exceed direct debit limit | |
PAYMENT_DIRECT_DEBIT_CONTRACT_CODE_INVALID | 406201 | merchantContractCode is invalid or duplicated | |
PAYMENT_DIRECT_DEBIT_AMOUNT_PRECISION_INVALID | 406202 | The singleUpperLimit precision is not valid |