-
201
Gift purchased and transferred (`awaiting_payment` false)
TelegramGiftPurchaseSuccess
-
{
"ok": true,
"awaiting_payment": false,
"order": {
"id": 1,
"order_number": "string",
"product_type": "stars",
"status": "completed",
"status_label": "string",
"quantity": 1,
"months": 1,
"gift_slug": "string",
"gift_image_url": "string",
"show_sender": true,
"supplier_tx_id": "string",
"user_tag": "string",
"service_name_snapshot": "string",
"price_charged_credits": 1,
"quoted_price_credits": 1,
"price_usd_display": "$4.99",
"wallet_debited": true,
"awaiting_payment": true,
"remaining_credits": 1,
"remaining_usd_display": "$1.25",
"can_complete": true,
"placed_via_api": true,
"created_at": "string"
}
}
-
202
Order created and awaiting wallet top-up. No debit yet (`wallet_debited: false`).
Use `payment.*` URLs, then `POST .../complete` after the balance covers `remaining_credits`.
TelegramGiftAwaitingPaymentResponse
-
{
"ok": true,
"awaiting_payment": true,
"order": {
"id": 1,
"order_number": "string",
"product_type": "stars",
"status": "completed",
"status_label": "string",
"quantity": 1,
"months": 1,
"gift_slug": "string",
"gift_image_url": "string",
"show_sender": true,
"supplier_tx_id": "string",
"user_tag": "string",
"service_name_snapshot": "string",
"price_charged_credits": 1,
"quoted_price_credits": 1,
"price_usd_display": "$4.99",
"wallet_debited": true,
"awaiting_payment": true,
"remaining_credits": 1,
"remaining_usd_display": "$1.25",
"can_complete": true,
"placed_via_api": true,
"created_at": "string"
},
"payment": {
"status": "pending",
"status_label": "string",
"remaining_credits": 1,
"remaining_usd": 1,
"remaining_usd_display": "$5.00",
"balance_credits": 1,
"balance_usd_display": "string",
"can_complete": true,
"payment_status_url": "https://example.com/api/v1/telegram/orders/12/payment",
"create_topup_url": "https://example.com/api/v1/telegram/orders/12/payment",
"complete_url": "https://example.com/api/v1/telegram/orders/12/complete"
}
}
-
401
Response
Unauthorized
-
{
"message": "Invalid API token."
}
-
422
Validation, invalid tag, invalid gift, quote failed, or not for sale
TelegramPurchaseFailure
-
{
"ok": false,
"error": "insufficient_balance",
"message": "string",
"wallet": true,
"order": {
"id": 1,
"order_number": "string",
"product_type": "stars",
"status": "completed",
"status_label": "string",
"quantity": 1,
"months": 1,
"gift_slug": "string",
"gift_image_url": "string",
"show_sender": true,
"supplier_tx_id": "string",
"user_tag": "string",
"service_name_snapshot": "string",
"price_charged_credits": 1,
"quoted_price_credits": 1,
"price_usd_display": "$4.99",
"wallet_debited": true,
"awaiting_payment": true,
"remaining_credits": 1,
"remaining_usd_display": "$1.25",
"can_complete": true,
"placed_via_api": true,
"created_at": "string"
},
"errors": {}
}
-
503
Gifts checkout disabled or supplier payment/transfer failed (wallet refunded on supplier failure after debit)
TelegramPurchaseFailure
-
{
"ok": false,
"error": "insufficient_balance",
"message": "string",
"wallet": true,
"order": {
"id": 1,
"order_number": "string",
"product_type": "stars",
"status": "completed",
"status_label": "string",
"quantity": 1,
"months": 1,
"gift_slug": "string",
"gift_image_url": "string",
"show_sender": true,
"supplier_tx_id": "string",
"user_tag": "string",
"service_name_snapshot": "string",
"price_charged_credits": 1,
"quoted_price_credits": 1,
"price_usd_display": "$4.99",
"wallet_debited": true,
"awaiting_payment": true,
"remaining_credits": 1,
"remaining_usd_display": "$1.25",
"can_complete": true,
"placed_via_api": true,
"created_at": "string"
},
"errors": {}
}