Skip to main content

Create SubMerchant

Create Sub-merchant API to create submerchant ID for order management purpose. This is available for Partner only.

EndPoint#

POST /binancepay/openapi/submerchant/add

Request Parameters#

AttributesTypeRequiredLimitationDescription
merchantNamestringYmaximum length 128The sub merchant name maximum length 128, unique under one mainMerchantId.
merchantTypeintY1=Personal(Individual)、2=solo proprietor、 3=Partnership、4=Private company、5=Others company-
merchantMccstringYSpecified codefour-digit number that classifies the business. Get from here
payIndustryDescriptionstringNmaximum length 500Mandatory if merchantMcc is 9999. Please specify the industry of this sub merchant here.
brandLogostringNmaximum length 256sub merchant logo url
countrystringYiso alpha 2 country code(https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), use "GO" if globalCountry/Region of Business Operation,Can be multiple, split by "," eg:"SG,US"
addressstringNmaximum length 1024store address
companyNamestringNmaximum length 64The legal name that is used in the registration, Required if merchantType is not Individual
registrationNumberstringNmaximum length 64Registration number/Company tax ID, Required if merchantType is not Individual
registrationCountrystringNiso alpha 2 country code(https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)Country of Registration, Required if merchantType is not Individual
registrationAddressstringNmaximum length 1024Country of Registration, Required if merchantType is not Individual
incorporationDatelongNUnixTimestamp in millisecondsThe date when the business registration is in effective, Required if merchantType is not Individual
storeTypeintN0 or 10=Online 1=Physical
siteTypeintN1,2,3,41=Web 2=App 3=Binance applets 4=Others , Required if merchantType is not Individual
siteUrlstringNmaximum length 256The URL of the website, Required if siteType is Web
siteNamestringNmaximum length 32The name of the website, Required if siteType is Web or App or Binance applets
certificateTypeintN1 or 21=ID 2=Passport, Required if merchantType is Individual
certificateCountrystringNiso alpha 2 country code(https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)Required if merchantType is Individual
certificateNumberstringNmaximum length 64Required if merchantType is Individual
certificateValidDatelongNUnixTimestamp in millisecondsCertificate Valid Date, Required if merchantType is Individual
contractTimeIsvlongNUnixTimestamp in millisecondsContract date with ISV

Sample Request Body#

when merchant type is individual

{  "merchantName":"Individual",  "merchantType":1,  "merchantMcc":"5511",  "brandLogo":null,  "country":"CN,US",  "address":null,  "companyName":null,  "registrationNumber":null,  "registrationCountry":null,  "registrationAddress":null,  "incorporationDate":null,  "storeType":null,  "siteType":null,  "siteUrl":null,  "siteName":null,  "certificateType":1,  "certificateCountry":"US",  "certificateNumber":"123456X",  "certificateValidDate":1752422400000,  "contractTimeIsv":1594656000000}

when merchant type is not individual

{  "merchantName":"Sole Proprietor",  "merchantType":2,  "merchantMcc":"5511",  "brandLogo":"logoUrlDemo",  "country":"CN,US",  "address":"store address demo",  "companyName":"Sole Proprietor",  "registrationNumber":"registration number demo",  "registrationCountry":"US",  "registrationAddress":"registration address demo",  "incorporationDate":1588262400000,  "storeType":1,  "siteType":2,  "siteUrl":"site url demo",  "siteName":"site name demo",  "certificateType":null,  "certificateCountry":null,  "certificateNumber":null,  "certificateValidDate":null,  "contractTimeIsv":1594656000000}

Response Parameters#

AttributesTypeRequiredLimitationDescription
statusstringY"SUCCESS" or "FAIL"status of the API request
codestringY-result code
dataAddSubMerchantResponseN-response body, refer to
errorMessagestringNmaximum length 256-

Child Attribute#

AddSubMerchantResponse#

AttributesTypeRequiredLimitationDescription
subMerchantIdlongY-unique sub-merchant id generated by payment

Sample Response#

{  "status": "SUCCESS",  "code": "000000",  "data": {    "subMerchantId": 2107268400000001  }}
{"status": "FAIL","code": "400101","errorMessage": "Parameter 'merchantMcc' not valid, was empty/null, or too long/short, or wrong format."}

Result Code#

NameCodeReasonSolution
UNKNOWN_ERROR400000An unknown error occurred while processing the request.Try again later
INVALID_REQUEST400001Parameter format is wrong or parameter transferring doesn't follow the rules.Please check whether the parameters are correct.
INVALID_SIGNATURE400002Incorrect signature resultCheck whether the signature parameter and method comply with signature algorithm requirements.
INVALID_TIMESTAMP400003Timestamp for this request is outside of the time window.Sync server clock
INVALID_API_KEY_OR_IP400004API identity key not found or invalid.Check API identity key
BAD_API_KEY_FMT400005API identity key format invalid.Check API identity key.
BAD_HTTP_METHOD400006Request method not supported.Check Request method.
MEDIA_TYPE_NOT_SUPPORTED400007Media type not supported.Check Request Media type.
INVALID_REQUEST_BODY400008Request body is not a valid json object.Check Request body
MANDATORY_PARAM_EMPTY_OR_MALFORMED400100A parameter was missing/empty/null, or malformed.
INVALID_PARAM_WRONG_LENGTH400101A parameter was not valid, was empty/null, or too long/short, or wrong format.
INVALID_PARAM_ILLEGAL_CHAR400103A parameter was not valid, contains illegal characters
INVALID_REQUEST_TOO_LARGE400104Invalid request, content length too large
INVALID_ACCOUNT_STATUS400203Not support for this account, please check account status.
SUB_MERCHANT_EXISTS400205Sub-merchant already exists.Please check merchant name
PAYMENT_MERCHANT_NOT_FOUND400208Merchant not found.Please check your merchantId
PAYMENT_ACTION_TOO_FREQUENT400501action Too Frequent, get the lock failTry again later

MCC#

img