Integrate checkout in minutes with a simple REST API. Ready-made WooCommerce and WHMCS plugins are available in your dashboard.
Send your API key in the TSPAY-API-KEY header with every request.
API URL: https://tsgateway.tshost.shop/api
POST https://tsgateway.tshost.shop/api/checkout-v2
curl -X POST https://tsgateway.tshost.shop/api/checkout-v2 \
-H "TSPAY-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": "500",
"currency": "BDT",
"full_name": "Rahim",
"email": "rahim@example.com",
"metadata": {"order_id": "1001"},
"redirect_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel",
"webhook_url": "https://yoursite.com/webhook"
}'
Response:
{"status": true, "message": "Payment Url", "payment_url": "https://tsgateway.tshost.shop/pay.php?id=..."}
Redirect your customer to payment_url.
currency is optional: BDT (default), USD or INR. The customer can pay with any of your gateways; amounts are converted using the site's exchange rates.
After payment the customer returns to your redirect_url with ?invoice_id=.... Verify it on your server:
curl -X POST https://tsgateway.tshost.shop/api/verify-payment \
-H "TSPAY-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"invoice_id": "INVOICE_ID"}'
{
"full_name": "Rahim", "email": "rahim@example.com",
"amount": "500.00", "fee": "0.00", "charged_amount": "500.00",
"invoice_id": "...", "metadata": {"order_id": "1001"},
"payment_method": "bkash", "sender_number": "01XXXXXXXXX",
"transaction_id": "9AB1CD2EF3", "date": "2026-10-13 12:00:00",
"status": "COMPLETED"
}
Only trust status = COMPLETED.
Your bot does not need a website. Create a payment, send the payment_url as a button, and poll for completed payments from a cron job.
Extra fields for checkout-v2: ref (your own user id, returned later) and telegram_chat_id (the customer's chat; we message them in your bot when they pay - set your bot token in Notifications).
curl -X POST https://tsgateway.tshost.shop/api/payments \
-H "TSPAY-API-KEY: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"after_id": 0}'
{"status": true, "last_id": 12, "payments": [ {"event_id": 12, "ref": "123456789", "amount": "500.00", "invoice_id": "...", "status": "COMPLETED"} ]}
Store last_id and send it as after_id next time. Credit each invoice_id only once. You can also pass "ref" or "invoice_id" to filter.
If you pass webhook_url, we send a POST with the same JSON as above and the header TSPAY-API-KEY when a payment completes. Compare that header with your API key before accepting it.
Signed webhooks (recommended). Every webhook also carries X-TSPay-Timestamp and X-TSPay-Signature. The signature is sha256= followed by the HMAC SHA-256 of timestamp + "." + raw request body, using your API key as the secret. Reject the request if the signature does not match or the timestamp is more than 5 minutes old.
verify-payment (status COMPLETED and the right amount) before delivering anything.These gateways are checked on the blockchain automatically. The customer sends the exact amount shown to your wallet and the invoice completes by itself, usually within a few minutes. The payment_method value in the verify response is the key below.
| Gateway | Network | Method key |
|---|---|---|
| USDT (TRC20) | TRC20 | usdt_trc20 |
| USDT (BEP20) | BEP20 | usdt_bep20 |
| USDT (ERC20) | ERC20 | usdt_erc20 |
| TRON (TRX) | TRON | trx |
| BNB (BEP20) | BEP20 | bnb_bep20 |
| Ethereum (ERC20) | ERC20 | eth_erc20 |
| DOGE | Dogecoin | doge |
| BTC | Bitcoin | btc |
| LTC | Litecoin | ltc |
| Solana (SOL) | Solana | sol |
| TON (Toncoin) | TON | ton |
| Arbitrum (ETH) | Arbitrum One | arb_eth |
| Base (ETH) | Base | base_eth |
| Polygon (POL) | Polygon | pol_polygon |
| Avalanche (AVAX) | Avalanche C-Chain | avax_c |
| Robinhood Chain (ETH) | Robinhood Chain | robinhood_eth |
| USDT (Polygon) | Polygon | usdt_polygon |
| USDC (Polygon) | Polygon | usdc_polygon |
| USDT (Arbitrum) | Arbitrum One | usdt_arb |
| USDC (Arbitrum) | Arbitrum One | usdc_arb |
| USDC (Base) | Base | usdc_base |
| USDT (Avalanche) | Avalanche C-Chain | usdt_avax |
| USDC (Avalanche) | Avalanche C-Chain | usdc_avax |
| Chainlink (LINK, ERC20) | Ethereum (ERC20) | link_erc20 |
| Uniswap (UNI, ERC20) | Ethereum (ERC20) | uni_erc20 |
| Shiba Inu (SHIB, ERC20) | Ethereum (ERC20) | shib_erc20 |
| DAI (ERC20) | Ethereum (ERC20) | dai_erc20 |
| Aave (AAVE, ERC20) | Ethereum (ERC20) | aave_erc20 |
| Pepe (PEPE, ERC20) | Ethereum (ERC20) | pepe_erc20 |
| USDC (ERC20) | Ethereum (ERC20) | usdc_erc20 |
| BUSD (BEP20) | BEP20 | busd_bep20 |
| PancakeSwap (CAKE, BEP20) | BEP20 | cake_bep20 |
| Ethereum (ETH, BEP20) | BEP20 | ethb_bep20 |
| Polygon (MATIC, ERC20) | Ethereum (ERC20) | matic_erc20 |
| ApeCoin (APE, ERC20) | Ethereum (ERC20) | ape_erc20 |
| Lido DAO (LDO, ERC20) | Ethereum (ERC20) | ldo_erc20 |
| Maker (MKR, ERC20) | Ethereum (ERC20) | mkr_erc20 |
| Curve DAO (CRV, ERC20) | Ethereum (ERC20) | crv_erc20 |
| Synthetix (SNX, ERC20) | Ethereum (ERC20) | snx_erc20 |
| The Graph (GRT, ERC20) | Ethereum (ERC20) | grt_erc20 |
| Decentraland (MANA, ERC20) | Ethereum (ERC20) | mana_erc20 |
| The Sandbox (SAND, ERC20) | Ethereum (ERC20) | sand_erc20 |
| Chiliz (CHZ, ERC20) | Ethereum (ERC20) | chz_erc20 |
| Ethereum Name Service (ENS, ERC20) | Ethereum (ERC20) | ens_erc20 |
| 1inch (1INCH, ERC20) | Ethereum (ERC20) | inch_erc20 |
| Compound (COMP, ERC20) | Ethereum (ERC20) | comp_erc20 |
| yearn.finance (YFI, ERC20) | Ethereum (ERC20) | yfi_erc20 |
| Basic Attention Token (BAT, ERC20) | Ethereum (ERC20) | bat_erc20 |
| DOGE (BEP20) | BEP20 | doge_bep20 |
| Chainlink (LINK, BEP20) | BEP20 | link_bep20 |
| XRP (BEP20) | BEP20 | xrp_bep20 |
| Cardano (ADA, BEP20) | BEP20 | ada_bep20 |
| Polkadot (DOT, BEP20) | BEP20 | dot_bep20 |
| FTM (Ethereum (ERC20)) | Ethereum (ERC20) | ftm_erc20 |
| SUSHI (Ethereum (ERC20)) | Ethereum (ERC20) | sushi_erc20 |
| ZRX (Ethereum (ERC20)) | Ethereum (ERC20) | zrx_erc20 |
| KNC (Ethereum (ERC20)) | Ethereum (ERC20) | knc_erc20 |
| BAL (Ethereum (ERC20)) | Ethereum (ERC20) | bal_erc20 |
| RNDR (Ethereum (ERC20)) | Ethereum (ERC20) | rndr_erc20 |
| IMX (Ethereum (ERC20)) | Ethereum (ERC20) | imx_erc20 |
| QNT (Ethereum (ERC20)) | Ethereum (ERC20) | qnt_erc20 |
| AXS (Ethereum (ERC20)) | Ethereum (ERC20) | axs_erc20 |
| FLOKI (Ethereum (ERC20)) | Ethereum (ERC20) | floki_erc20 |
| LRC (Ethereum (ERC20)) | Ethereum (ERC20) | lrc_erc20 |
| ENJ (Ethereum (ERC20)) | Ethereum (ERC20) | enj_erc20 |
| SHIB (BEP20) | BEP20 | shib_bep20 |
| UNI (BEP20) | BEP20 | uni_bep20 |
| AAVE (BEP20) | BEP20 | aave_bep20 |
| USDC (BEP20) | BEP20 | usdc_bep20 |
| TWT (BEP20) | BEP20 | twt_bep20 |
| BTCB (BEP20) | BEP20 | btcb_bep20 |
| AVAX (BEP20) | BEP20 | avax_bep20 |
| SOL (BEP20) | BEP20 | sol_bep20 |
| BONK (Solana) | Solana | bonk_sol |
| dogwifhat (WIF, Solana) | Solana | wif_sol |
| Jupiter (JUP, Solana) | Solana | jup_sol |
| PayPal USD (PYUSD, ERC20) | Ethereum (ERC20) | pyusd_erc20 |
| USDS (ERC20) | Ethereum (ERC20) | usds_erc20 |
| Ethena USDe (ERC20) | Ethereum (ERC20) | usde_erc20 |
| First Digital USD (FDUSD, ERC20) | Ethereum (ERC20) | fdusd_erc20 |
| Arbitrum (ARB, Arbitrum One) | Arbitrum One | arb_arbitrum |
| GMX (Arbitrum One) | Arbitrum One | gmx_arbitrum |
| DAI (Arbitrum One) | Arbitrum One | dai_arbitrum |
| BRETT (Base) | Base | brett_base |
| ARPA (BEP20) | BEP20 | arpa_bep20 |
| Beefy (BIFI, ERC20) | Ethereum (ERC20) | bifi_erc20 |
| Poolz Finance (POOLX, BEP20) | BEP20 | poolx_bep20 |
| SPACE ID (ID, BEP20) | BEP20 | id_bep20 |
| Conflux (bCFX, BEP20) | BEP20 | cfx_bep20 |
| Baby Doge (BABYDOGE, BEP20) | BEP20 | babydoge_bep20 |
| Bitgert (BRISE, BEP20) | BEP20 | brise_bep20 |
| Bridge Oracle (BRG, BEP20) | BEP20 | brg_bep20 |
| ChainGPT (CGPT, BEP20) | BEP20 | cgpt_bep20 |
| Mog Coin (MOG, ERC20) | Ethereum (ERC20) | mog_erc20 |
| SPX6900 (SPX, ERC20) | Ethereum (ERC20) | spx_erc20 |
| Bad Idea AI (BAD, ERC20) | Ethereum (ERC20) | bad_erc20 |
| USDT (Solana) | Solana | usdt_sol |
| USDC (Solana) | Solana | usdc_sol |
| USDT (TON) | TON | usdt_ton |