Skip to main content

Technical Service Provider

Technical provider models allow you to provide technical services to help your merchants integrate with Binance Pay services. Enabling Binance Pay crypto payment option for your merchants. You will not be involved in the fund flow, the fund will be settled to your merchants’ Binance account directly.

If you are interested in being Binance Pay TSP, please contact: merchant@binance.com.

Technical Service Provider Intro

How it works#

  1. Include an entry point for your merchant to input their Binance ID on your website.
  2. Configure webhook endpoint on merchant platform.
  3. Create an Authorization request to your merchant with their Binance ID
  4. Redirect Merchant to approve the request
  5. Obtain the authorization token
  6. Start integrating Binance Pay with the token and your API keys.

Create Authorization Request#

In order to call the APIs on behalf of your merchant, you will first need to create an authorization. To create the authorization request you can either

  1. Create via API, or
  2. Create it manually on the merchant dashboard.

1. Create Authorization Request via API#

Step 1. Query Scopes#

Before you create the request call the Query Scopes API to view the scope enabled for your Technical Service Provider account. For more information on the API click here.

End Point

POST /binancepay/openapi/service/provider/config/query

Sample Response

{  "status": "SUCCESS",  "code": "000000",  "data": {    "allowFeeShare": false,    "allowScopes": [      "CONVERT",      "REFUND",      "CHECKOUT",      "PAYOUT",      "REPORT",      "INTERNAL_TRANSFER",      "BALANCE"    ]  }}

Once you have obtained the scopes enabled for your account you can start creating the request to your merchant.

Step 2. Create Authorization Request#

With the list of scopes enabled for your account, you can create the authorization request accordingly based on the needs of your merchant.

For more information on the API specification, click here.

End Point

POST /binancepay/openapi/service/provider/create

Sample Request

{    "merchantId": "merchant1",    "scopes": [      "CONVERT",      "CHECKOUT"    ],    "ipWhitelist": [      "192.168.1.1",      "192.168.1.2"    ]}

Sample Response

{  "status": "SUCCESS",  "code": "000000",  "data": {    "authorizationId": "authId1",    "merchantName": "Merchant One",    "authorizationToken": "token1",    "merchantId": "merchant1",    "status": "PENDING",    "redirectUrl": "https://merchant.binance.com/en/xxxxauthId=authId1",    "scopes": [      "CONVERT",      "CHECKOUT"    ],    "ipWhitelist": [      "192.168.1.1",      "192.168.1.2"    ]  }}

From the response, you will obtain a redirectUrl for you to redirect your merchant to Binance merchant dashboard to approve your request.

Step 3. Obtain Authorization Token#

With the webhook endpoint configured, you will receive the authorization token accordingly.

Take note of the following parameter in the payload received:

  • bizStatus : merchant agree or rejected your authorization request
  • authorizationToken: token is unique to each merchant, save it down in your database. This token is used to call the Binance Pay API on behalf of your merchant.

Sample Payload

Merchant Agree

{  "bizType": "TECH_PROVIDER",  "data": "{\"authorizationId\":\"210462863998500864\",\"authorizationToken\":\"4f92a76767a948d8b5ab60abd8ca2e15\",\"merchantId\":1000135331248,\"merchantName\":\"Test\",\"scopes\":[\"CONVERT\"]}",  "bizIdStr": "210462863998500864",  "bizId": 210462863998500864,  "bizStatus": "SUBMIT_AUTH_AGREE"}

Merchant Reject

{  "bizType": "TECH_PROVIDER",  "data": "{\"authorizationId\":\"210459190727720960\",\"authorizationToken\":\"ac97fa06614247f0a0d45d50c2cd5937\",\"merchantId\":1000135331248,\"merchantName\":\"Test\",\"scopes\":[\"BALANCE\"]}",  "bizIdStr": "210459190727720960",  "bizId": 210459190727720960,  "bizStatus": "SUBMIT_AUTH_REJECT"}

2. Manually on Merchant Management Platform#

Login to the Merchant Platform > Partner Features > Technical Vendor

Adding Technical Vendor Manually

Select [Add authorization] > Input your Merchant ID and select the access permission. Click [here] to view the full list of permission.

Adding Technical Vendor Authorisation

Submit your request and an authorization link (valid for 24 hours only) will be generated. Share the link with your merchant or [redirect them] to the merchant platform to authorize the request.

Once the request has been approved, you will receive an email and webhook notification.

View Authorization Token#

With the authorization request approved, you can view the Authorization Token either on the merchant management portal or from the webhook returned.

a. Merchant Management Portal#

Login to Merchant Platform > Under Partner Features > Technical Vendor > select [Details].

View Technical Vendor Details

b. Webhook#

With your webhook configured on the merchant dashboard. You will receive a notification when your merchant approves or rejects your authorization request.

Authorization Approve Payload Example#

Please click here to view more on the API Specification

{  "bizType": "TECH_PROVIDER",  "data": "{\"authorizationId\":\"210462863998500864\",\"authorizationToken\":\"4f92a76767a948d8b5ab60abd8ca2e15\",\"merchantId\":1000135331248,\"merchantName\":\"Test\",\"scopes\":[\"CONVERT\"]}",  "bizIdStr": "210462863998500864",  "bizId": 210462863998500864,  "bizStatus": "SUBMIT_AUTH_AGREE"}

Capture the authorizationToken in your database and use it to integrate and call Binance Pay API on behalf of your merchant.

API Call#

Please refer to here on how to get started on the integration and retrieve your own API Keys credentials.

To call Binance Pay API on behalf of your merchant, please pass the authorization token in the "BinancePay-technicalServiceProviderAuthId" field of the request body.

Create Order API Request Example#

For full API specification, please go to API Request Reference.

{      "BinancePay-technicalServiceProviderAuthId":"334nfjhre0rbfle7",  "env" : {    "terminalType": "WEB"  },  "merchantTradeNo": "order72383730",  "orderAmount": 0.01,  "currency": "USDT",  "goods" : {    "goodsType": "01",    "goodsCategory": "D000",    "referenceGoodsId": "7876763A3B",    "goodsName": "Green Apple",    "goodsDetail": "Green colored sweet apple"  }}

This authorization token passed will allow Binance to settle the fund to your merchant account. If no authorization token is passed, funds will be settled to your merchant account instead.