Start a trial
Illustrative exampleNumbers here are illustrative: round figures to reason with, not measurements.
Payment details go straight into the provider’s own form; billing keeps the reference. The subscription starts as trialing, and nothing is charged until the trial ends.
- The provider’s form saves the payment method and returns a reference; in India it also registers the card or UPI AutoPay e-mandate, approved with extra authentication.
- The app asks the billing API to start Standard, monthly, with that reference and a trial.
- Billing saves the subscription as trialing, ending in 7 days.
- The API answers 201, and a welcome email gives the trial’s end date.
Diagram as text
Components: Customer’s app (Client); Payment provider (External API); Billing API (API gateway); Billing service (Service); Billing DB (SQL DB); Email service (Notifications). Connections: Customer’s app → Payment provider (payment method); Customer’s app → Billing API (start: plan, reference, trial); Billing API → Billing service; Billing service → Billing DB (trialing, period dates); Billing DB → Email service (welcome, trial end date), asynchronous.
Read:Learn: High-level architecture
Check yourself
Which of your components ever see the card number?
Show answerHide answer
None. The number goes straight to the provider’s form; billing keeps the reference, the brand and the last four digits.