You can create an invoice using BinancePay with the API. The process is straightforward:
Create an invoice: Send a POST request to the BinancePay Invoice endpoint with the required details such as amount, currency, and recipient info. Invoice details: Include the necessary information such as merchant name, invoice ID, and any custom parameters that are required for your integration.
Here’s a basic setup to get you started. Remember to adjust the parameters based on your specific needs:
amount: The amount for the transaction
currency: The currency for the transaction (e.g., USDT, USDC)
recipient: The user's BinancePay ID
description: A description of the product or service
Here’s how you can integrate the channel field with the provided data to indicate BinancePay:
{ "currency": "USDT", "mainCurrency": "TRX", "targetCurrency": "USD", "targetAmount": "100", "externalId": "External-Id123", "notifyUrl": "https://272366d3.ngrok.io", "firstName": "John", "lastName": "Smith", "countryOfResidence": "IN", "nameType": "alias", "channel": "BinancePay" }
The "channel": "BinancePay" field specifies that the transaction should be processed through the BinancePay platform. This will generate an invoice for you, which can then be processed through the BinancePay platform.