Skip to main content
Back to the Table of Contents

Orders and subscriptions

Every purchase leaves a trace in orders. An order is never typed in by hand: it is born from a cart that was checked out and paid, and carries its reference, its customer, its lines, its amount and its status. Nor can it be deleted — it is an accounting record.

The life of an order

The customer fills their cart, enters their address, pays by card. The payment is confirmed by Stripe, and only then does the order turn "completed": the credits of the purchased products are added to the customer’s balance, and the confirmation email goes out. An order that stays pending is an order whose payment never went through — the Stripe dashboard is where the reason is found.

A subscription order differs from a standard one by its type. Every paid renewal generates a new one, attached to the subscription and to its Stripe invoice: a subscriber’s billing history is therefore read from that list.

Subscriptions

The subscriptions list one record per subscribed customer, with their product, their interval, the price they signed up at, the current period and, where applicable, the end date of their commitment. The statuses read as follows:

  • Incomplete — the subscription was started but the first payment has not gone through yet.
  • Active — all is well, the credits are granted again at every renewal.
  • Past due — a charge failed. Stripe retries, the subscriber gets an email inviting them to update their card, and no credit is granted until the payment succeeds.
  • Scheduled cancellation — the subscriber has cancelled but stays active until the end of the period already paid for (or of their commitment).
  • Cancelled — the subscription is over, either cancelled or ended for lack of payment. Credits already granted are kept.

Each of these events sends an email to the subscriber and one to you — as well as to the coach attached to the product, if there is one. The details are in "The emails sent to your users".

Cancelling for a customer

The subscriber cancels from their own account, unless they are still under commitment. A cancellation issued from the Stripe dashboard is mirrored here automatically: the two systems stay in sync both ways, which is another reason the webhook secret must be correctly filled in.