Bot Create Order
This interface is in order to build up an order in telegram bot.Please contact us for configuration before you test on it.
Path
POST open/api/tg/payment
Parameters
Request parameters
Parameter | Sign | Mandatory | Type | Length | Remarks |
|---|---|---|---|---|---|
appId | Y | Y | string | 64 | AppId is uniqle for merchant |
sign | N | Y | string | 256 | signature |
merchantOrderNo | Y | Y | string | 64 | Customer transaction ID |
orderAmount | Y | Y | string | 64 | Order amount (amount unit: cent) |
payCurrency | Y | Y | string | 64 | Currency of payment (EUR / USD) |
userId | Y | Y | string | 128 | UserId is uniqle for user (email / phone number) |
paymentExchange | Y | N | string | 512 | Exchange Code and Wallet Code
|
paymentTokens | Y | N | string | 128 |
|
redirectURL | N | N | string | 512 | The redirection address after the successful purchase |
callbackURL | N | N | string | 512 | The address receiving order webhook |
customParam | N | N | string | 512 | Merchant custom parameters |
expiredTime | N | N | string | 32 | Time of expire (second) |
payType | N | N | string | 32 | Type of payment |
paymentNetworks | N | N | string | 32 | Specify payment network(separated by comma) |
orderModel | N | N | string | 32 | Order mode (ORDER/RECHARGE) capital letter required |
tgModel | N | N | string | 32 | Telegram front-end display mode: BROWSER/MINIAPP/BOT |
Telegram Front-end Display Mode
Mode | Name | Difference of WebURL | Difference of RedirectURL |
|---|---|---|---|
BROWSER | Browser Mode | webUrl payment http address | redirectURL: |
MINIAPP | Pop-up mode | webUrl payment http address | redirectURL: |
BOT | Jump to payment bot mode | webUrl payment bot address | redirectURL: |
Supported Token
| Crypto | Network |
|---|---|
| USDT | TRX,BSC,ETH,SOL |
| USDC | TRX,BSC,ETH,SOL |
| ETH | ETH,BSC |
| BTC | BTC |
| PCI | ETH,PCI |
| TON | TON |
Exchange Code
| Exchange | Code |
|---|---|
| Kraken | 16f021b0-f220-4bbb-aa3b-82d423301957 |
| Paxos | 2fdd678d-8ece-49f5-992c-a1d7c4367833 |
| Bybit | 3b8d8911-b2c0-4c1a-9127-675653c21960 |
| Coinbase | 47624467-e52e-4938-a41a-7926b6c27acf |
| Robinhood | 6e192ebb-a073-4055-bbd7-d644539c9a20 |
| Binance | 9226e5c2-ebc3-4fdd-94f6-ed52cdce1420 |
Wallet Code
| Wallet | Code |
|---|---|
| Metamask | 34aeb688-decb-485f-9d80-b66466783394 |
| Trust Wallet | 7f4307ea-58c6-4678-9eb2-fec205de5401 |
| Coinbase Wallet | 6132432e-d59c-4555-9844-cea0ce600ba3 |
| Uniswap Wallet | 58c89cae-b2ff-4176-85a3-1d1f7795cbe0 |
| Blockchain Wallet | d22f63a1-50c0-4439-961c-870fc430c979 |
| Bitcoin.com Wallet | f4b147b5-d166-4e6e-b4c1-e59d401cde11 |
| Crypto.com Wallet Prime | e16f1dc8-7577-4170-a67f-5ebb266e410e |
| imToken | 7f523342-0bc6-4465-a035-bb4d2ed693ed |
| Rainbow | 8a60d227-2825-4158-b14b-3c8443a2b681 |
Request Example
{
"appId": "6fdbaac29eb94bc6b12345ad705e9293",
"callbackURL": "https://crypto-payment-sbx.alchemy.cc/crypto/bot/cpCallback",
"customParam": "{\"botName\":\"ABCDCryptoPaymentTestBot\",\"orderDetail\":\"ABDC Test BAG 🎒\",\"chatId\":\"6831529261\"}",
"expiredTime": "999999",
"merchantOrderNo": "17243134568514",
"orderAmount": "10",
"orderModel": "ORDER",
"payCurrency": "USD",
"sign": "TEST000001",
"tgModel": "MINIAPP",
"userId": "[email protected]"
}Description of Response Parameters
| Parameter | Type | Details |
|---|---|---|
| success | boolean | Success |
| error | boolean | Error |
| code | long | Response code |
| msg | string | Response message |
| traceId | string | Trace id |
| model | object | Response details |
Response Example
{
"code": "0",
"model": {
"orderNo": "300217243809185440066",
"webUrl": "https://sbx-crypto-payment.alchemypay.org?orderNum=300217243809185440066"
},
"msg": "success",
"traceId": "66c7f6f6f7e8c1827f4fe27905f96546"
}Updated about 1 month ago