API
バウチャー
Issue, verify, and atomically redeem approved vouchers independently of Wallet.
認証: Authorization: Bearer sbot_…
POST
Bot Token/api/v1/bots/vouchers/issueissueIssue a voucher
Issue one voucher from an active template to a user in an accessible private chat.
- Headers:
Authorization: Bearer sbot_...and uniqueIdempotency-Key; requiresvouchers:issue - Required:
template_id,external_issue_id, andchat_id; optionalnotify_user - Retries with the same external issue ID or idempotency key return the original result
POST
Bot Token/api/v1/bots/vouchers/verifyverifyVerify a voucher
Verify a QR token or six-character code within the current bot scope.
- Requires
vouchers:verify; body:credential: { type: "qr_token" | "redeem_code", value } - Voucher codes ignore case, spaces, and hyphens; no user private data is returned
POST
Bot Token/api/v1/bots/vouchers/redeemredeemRedeem a voucher
Atomically redeem a voucher with a conditional update to prevent double spending.
- A unique
Idempotency-Keyheader is required; requiresvouchers:redeem - Required:
credentialandexternal_order_id; optionalstore_id,operator_id, andoccurred_at - Retries return the original result; reusing a key for a different request returns 409
