One-time purchase lifecycle
What happens to a consumable or a non-consumable, step by step. Subscriptions have their own page: Subscription lifecycle.
The steps
| Step | How it gets there | What GET /v1/purchases/<token> says |
|---|---|---|
| Purchase page open | POST /v1/purchases. It lasts 24 hours. If it's left, or the person chooses Cancel, nothing is bought | There's no token yet |
| Bought, waiting for you | The person chose Buy, and the price left their credit | state purchased, acknowledgement pending, with acknowledge_by |
| Acknowledged | POST /v1/purchases/<token>/acknowledge, after you delivered | acknowledgement acknowledged, acknowledge_by null |
| Consumed (consumables) | POST /v1/purchases/<token>/consume. It acknowledges too. The product can be bought again | consumption consumed |
| Refunded, kept | A refund without revoke | Still purchased; refunded shows the credits |
| Taken back | A refund with revoke, an approved refund request, or no acknowledgement in time | state cancelled: take away what you gave |
Owning a product
- A person owns one copy of a product at a time. Starting another purchase answers 409
already_owned, until a consumable is consumed or the purchase is taken back. - A non-consumable stays owned. If you remove it from sale or delete it, whoever bought it keeps it.
If you don't acknowledge
A purchase not acknowledged within 3 days is refunded in full and taken back, with voided_reason unacknowledged_purchase. You get VOIDED_PURCHASE and ONE_TIME_PRODUCT_CANCELED. A test purchase has 3 minutes, not 3 days.