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/tgPayment

Parameters

Request parameters

ParameterSignMandatoryTypeLengthRemarks
appIdYYstring64AppId is uniqle for merchant
merchantOrderNoYYstring64Customer transaction ID
orderAmountYYstring64Order amount (amount unit: cent)
payCurrencyYYstring64Currency of payment (EUR / USD)
userIdYYstring128UserId is uniqle for user (email / phone number)
paymentExchangeYNstring512Exchange Code and Wallet Code
Preconditions: Payment method has been configured with exchange method/ wallet method

1. Specify the exchange/ wallet, multiple transfers are acceptable
2. Users can only use the specified exchange/wallet to pay under the exchange payment/wallet payment method by sending this parameter
paymentTokensYNstring1281. Specify payment token, multiple tokens can be transferred
2. After transfer, users can only use the listed tokens for payment
3. Must be included in the merchant configuration token table
4. Will work on both coin payment and exchange
redirectURLNNstring512The redirection address after the successful purchase
callbackURLNNstring512The address receiving order webhook
customParamNNstring512Merchant custom parameters
expiredTimeNNstring32Time of expire (second)
payTypeNNstring32Type of payment
paymentNetworksNNstring32Specify payment network(separated by comma)
orderModelNNstring32Order mode (ORDER/RECHARGE) capital letter required
tgModelNNstring32*ONLY SUPPORT SANDBOX ENVIRONMENT
Telegram front-end display mode: BROWSER/MINIAPP/BOT

Telegram Front-end Display Mode

*ONLY SUPPORT SANDBOX ENVIRONMENT

ModeNameDifference of WebURLDifference of RedirectURL
BROWSERBrowser ModewebUrl payment http addressredirectURL:
Redirect to Merchant address after payment completed
MINIAPPPop-up modewebUrl payment http addressredirectURL:
Directly close the pop-up
BOTJump to payment bot modewebUrl payment bot addressredirectURL:
Redirect to Merchant bot address after payment completed

Supported Token

CryptoNetwork
USDTTRX,BSC,ETH,SOL
USDCTRX,BSC,ETH,SOL
ETHETH,BSC
BTCBTC

Exchange Code

ExchangeCode
Kraken16f021b0-f220-4bbb-aa3b-82d423301957
Paxos2fdd678d-8ece-49f5-992c-a1d7c4367833
Bybit3b8d8911-b2c0-4c1a-9127-675653c21960
Coinbase47624467-e52e-4938-a41a-7926b6c27acf
Robinhood6e192ebb-a073-4055-bbd7-d644539c9a20
Binance9226e5c2-ebc3-4fdd-94f6-ed52cdce1420

Wallet Code

WalletCode
Metamask34aeb688-decb-485f-9d80-b66466783394
Trust Wallet7f4307ea-58c6-4678-9eb2-fec205de5401
Coinbase Wallet6132432e-d59c-4555-9844-cea0ce600ba3
Uniswap Wallet58c89cae-b2ff-4176-85a3-1d1f7795cbe0
Blockchain Walletd22f63a1-50c0-4439-961c-870fc430c979
Bitcoin.com Walletf4b147b5-d166-4e6e-b4c1-e59d401cde11
Crypto.com Wallet Primee16f1dc8-7577-4170-a67f-5ebb266e410e
imToken7f523342-0bc6-4465-a035-bb4d2ed693ed
Rainbow8a60d227-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

ParameterTypeDetails
successbooleanSuccess
errorbooleanError
codelongResponse code
msgstringResponse message
traceIdstringTrace id
modelobjectResponse details

Response Example

{
    "code": "0",
    "model": {
        "orderNo": "300217243809185440066",
        "webUrl": "https://sbx-crypto-payment.alchemypay.org?orderNum=300217243809185440066"
    },
    "msg": "success",
    "traceId": "66c7f6f6f7e8c1827f4fe27905f96546"
}