How it works
- Create a payment with your Brand API Key — you get a
checkout_url. - Send your customer to that URL. They pay and submit their TrxID.
- The AutoPayz SMS app on your phone forwards the payment SMS to our server.
- We match amount + TrxID, mark the payment completed and call your webhook.
Create a payment
POST https://autopayz.online/api/payment with header X-API-Key: YOUR_BRAND_KEY
curl -X POST https://autopayz.online/api/payment \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_BRAND_KEY" \
-d '{
"amount": 500,
"method": "bkash",
"invoice": "INV-1001",
"webhook": "https://yoursite.com/hook",
"redirect": "https://yoursite.com/success"
}'Response
{
"success": true,
"invoice": "INV-1001",
"checkout_url": "https://autopayz.online/pay/INV-1001",
"status": "pending"
}Webhook payload
When a payment is verified we POST to your webhook URL:
{
"invoice": "INV-1001",
"status": "completed",
"amount": 500,
"method": "bkash",
"trxId": "BKA7X9Q2LM"
}Request parameters
| Parameter | Required | Description |
|---|---|---|
| amount | Yes | Payment amount |
| method | Yes | bkash / nagad / rocket / upay / binance |
| invoice | Yes | Unique invoice reference |
| webhook | No | Payment notification URL |
| redirect | No | Customer return URL |
Error codes
401Invalid API key422Invalid payment details409Duplicate invoice or transaction ID429Too many requestsTelegram Bot
Create a payment from your bot, send checkout_url to the customer, and wait for a verified webhook before delivering an order.
# Example only — API not live yet
checkout_url = data["checkout_url"]
await update.message.reply_text(
f"Complete your payment: {checkout_url}"
)
# Deliver only after a server-verified payment webhook.Demo documentation — the API is not live yet.