Customization
While providing a set of standardized process, Binance Pay Onchain also offers some capabilities for customizing interaction details, through which the partner (client) can customize the on/off ramp process according to their needs. For example, lock transaction pairs/payment methods to prevent users from making changes after entering Binance Pay Onchain page, skip the cashier page to make the process simpler, automatically redirect to the partner's (client's) platform when the on/off ramp is completed without the user manually clicking the "Back to X" button, etc.
Please note that the customization capabilities are not enabled by default, as they are only customized for the special needs of few of our partners, and they are not applied for most partners, usually you don't need to enable these customization capabilities, the standard process is sufficient to meet your needs. If you really need these capabilities, please contact Binance Pay Onchain team to enable them for you (the customization parameter of the pre-order API will be ignored if these capabilities are not enabled and the customization will not work). If the existing capabilities do not meet your needs, feel free to give any suggestions. Binance Pay Onchain will add more and more customization capabilities in the future.
Customization types
If Binance Pay Onchain has enabled the customization capabilities for you, you can pass the
customization settings for the current order in the customization parameter of the pre-order API.
Currently, Binance Pay Onchain supports the following customization capabilities:
| Key | Value Type | Description | Remarks |
|---|---|---|---|
| LOCK_ORDER_ATTRIBUTES | int array | An array of integers, filled with all the parameters you want to lock. When the user enters the cashier page of Binance Pay Onchain, the corresponding information will be locked and cannot be edited. Please refer to “Subtypes for LOCK_ORDER_ATTRIBUTES”. | |
| SKIP_CASHIER | boolean | skip cashier page (and show order confirmation page directly) or not | Cannot work together with SEND_PRIMARY. |
| AUTO_REDIRECTION | boolean | Automatically redirect or not. When the user completes the buy crypto and withdrawal process, there will be a "Back to X" button on the page, clicking it will redirect the user back to the partner's platform. If you enable the AUTO_REDIRECTION capability, a countdown will be displayed on the button, and the page will automatically redirect without clicking after the countdown ends. | If redirectUrl and redirectDeepLink are not provided in pre-order API, it will not work. |
| HIDE_SEND | boolean | Hide send crypto option or not. When user is on the cashier page of the on-ramp (buy) flow, if the user has enough crypto in his Binance wallet, Binance Pay Onchain will prompt him whether to send crypto (i.e. transfer) directly. If the user choose this option, Binance Pay Onchain will skip the purchase process and directly withdraw crypto to the user’s crypto wallet. If you want to disable this prompt and only enable buy, you can use the HIDE_SEND customization. | On-ramp only. Cannot work together with SEND_PRIMARY. |
| SEND_PRIMARY | boolean | promote send as the first priority (and downgrade buy) or not | On-ramp only.Cannot work together with HIDE_SEND.Should work together with amountType: 2 .Please refer to "Send primary mode". |
| SEND_PRIMARY_FLEXIBLE | boolean | promote send as the first priority (and downgrade buy) or not, and allows users to freely input the amount on Binance Pay Onchain page | On-ramp only.Cannot work together with HIDE_SEND.Must work together with SEND_PRIMARY.The amount specified in pre-order API will be used as the default value but users can modify it.Please refer to "Send primary mode". |
| MERCHANT_DISPLAY_NAME | string | customize the partner name displayed on the order pages | On-ramp only. |
| NET_RECEIVE | boolean | Normally, since the withdrawal fee will be deducted when withdrawing, the actual amount of crypto received by the user will be less than the amount of crypto purchased. If you want the actual amount of crypto received by the user to be equal to the amount of crypto specified in the pre-order API, please use NET_RECEIVE. Binance Pay Onchain will purchase more crypto automatically to cover the withdrawal fee deduction at the time of withdrawal. | On-ramp only.Should work together with LOCK_ORDER_ATTRIBUTES: CRYPTO_AMOUNT. Should work together with SEND_PRIMARY. |
| P2P_EXPRESS | boolean | When a user lands on Binance Pay Onchain, this value can redirect them to the P2P order confirmation page. | On-ramp only.Cannot work together with SEND_PRIMARY. |
Subtypes for LOCK_ORDER_ATTRIBUTES
| Subtype | Value | Remarks |
|---|---|---|
| ALL | 1 | lock all parameters |
| TRADING_PAIR | 2 | lock transaction pair |
| NETWORK | 3 | lock crypto network |
| PAYMENT_METHOD | 4 | lock payment method |
| FIAT_AMOUNT | 5 | lock the fiat amount as specified in the pre-order API. Should work together with amountType: 1 . Should work together with HIDE_SEND . |
| CRYPTO_AMOUNT | 6 | lock the crypto amount as specified in the pre-order API. Should work together with amountType: 2 . |
| FIAT_CURRENCY | 7 | lock fiat currency |
| CRYPTO_CURRENCY | 8 | lock crypto currency |
Example
Request Parameters:
Code
*Please note that the above code is only an example. You don't have to pass in all the customization attributes, you only need to pass in the attributes you need. If the permission for a customization attribute is not enabled, the passed parameter will be ignored and the customization will not work.