Skip to main content
Documentation v2.0
Tokens, transfers, and coupons/docs/billing/token-coupon

Billing

Stable

Tokens, transfers, and coupons

Manage token purchases, OTP-verified transfers, coupon redemptions, and history.

On this page4 sections

Tokens

Tokens are the service unit for features that require them. Every balance change must have a transaction and an audit record.

Token transfers

  1. Enter the recipient and the amount.
  2. Send the OTP.
  3. Verify the OTP and the balance.
  4. Run the transfer atomically.
  5. Save the history for both the sender and the recipient.

Coupons

  • Validate the code, validity period, quota, and user eligibility.
  • Prevent duplicate redemptions.
  • Record which operator created or changed each coupon.

History

Token and redemption history must be filterable and must not be deleted without an audit policy.

Documentation feedback

Was this article helpful?

Documentation search

What do you want to learn?

Type at least two characters to search the documentation.
Code copied.