Skip to main content
A subscription belongs to a customer (cus_), identified by email on your account. What matters for recurring billing is their default payment method: it, and it alone, receives the payment request at every due date and every retry.

Creating or finding a customer

You usually do not have to: POST /v1/subscriptions and the hosted page find or create the customer by email. To manage them explicitly:

Payment methods

201
Rules:
  • The same number added twice is not duplicated: the existing method is returned, and becomes the default if setAsDefault is true.
  • setAsDefault defaults to false on this route. When a subscription is created, the provided method always becomes the default.
  • Deleting the default method leaves the customer without a default: the next renewal fails immediately (past_due). Add the new one before removing the old one.
Changing a customer’s number is this route — not retry-payment. A paymentMethodData passed to retry-payment is used for that attempt only and is not saved.

Customer balance

A credit balance is applied automatically to the customer’s next cycle invoice. currency is a 3-letter ISO 4217 code; send it in uppercase (XAF), the canonical form — the API normalizes both, but the balance and the invoice must match.
This is how you “credit” a mid-period quantity decrease, since the API does not do it on its own: compute the proration and credit it here. It will be deducted from the next cycle.