SendToken
Creates an outgoing payment.
POST Wallet/SendToken
Input
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
| MerchantId | string | yes | your merchant ID | – |
| OrderId | string | no | any string generated by you used to track the order in your system | null |
| OrderAmount | number | no | the order amount in OrderCurrency | null |
| OrderCurrency | string | no | fiat order currency | 'USD' |
| TokenAmount | number | no | the amount in asset | null |
| AssetCode | string | yes | asset code | – |
| BlockchainCode | string | yes | blockchain code | – |
| RecipientAddress | string | yes | recipient wallet address | – |
| UserName | string | no | the user's name to use for the email payment notification | null |
| UserEmail | string | no | the user's email address for the email payment notification | null |
| Memo | string | no | a short description of the invoice to be displayed to the user | null |
| TimeExpire | string | no | time when to cancel invoice automatically if not paid | 30 days from now |
| SendEmail | boolean | no | whether or not to send the payment notification to the user by email | false |
| PostbackUrl | string | no | overrides the postback URL specified in settings in Merchant Panel (useful for custom plugins) | null |
You can either specify the OrderAmount and OrderCurrency or the TokenAmount. If the OrderAmount and OrderCurrency are specified, the TokenAmount will be computed automatically. If the TokenAmount is specified, the payment will be made for the exact TokenAmount.
Output
| Parameter | Type | Description |
|---|---|---|
| Id | string | invoice ID |
| TokenAmount | string | the amount of asset sent |
| AssetCode | string | asset code |
| BlockchainCode | string | blockchain code |
| RecipientAddress | string | recipient wallet address |
Example Input
{
"MerchantId": "8XOZ64KC9X",
"OrderId": "123465",
"OrderAmount": 19.95,
"OrderCurrency": "USD",
"TokenAmount": null,
"AssetCode": "USDC",
"BlockchainCode": "ETH",
"RecipientAddress": "0x1cfC8072e7348314167CeaA4Bce90c5C2F8dBea1",
"UserName": "John Smith",
"UserEmail": "name@email.com",
"Memo": "This payment is for order 123465",
"SendEmail": false,
"PostbackUrl": null
}
Example Output
{
"Id": "I5smweJW1QettDUA",
"TokenAmount": 19.95,
"AssetCode": "USDC",
"BlockchainCode": "ETH",
"RecipientAddress": "0x1cfC8072e7348314167CeaA4Bce90c5C2F8dBea1"
}