FAQs

Q1: What framework and database does it use?

Fastify + TypeScript on AWS Lambda, with MongoDB (subscriptiondb_<STAGE>) and Redis caching.

Q2: What are the subscription statuses?

ACTIVE, PAUSED, CANCELLED, COMPLETED. Instances (orders) use SCHEDULED, PROCESSING, COMPLETED, FAILED, SKIPPED, CANCELLED.

Q3: How does recurring billing actually run?

Each due delivery is an instance; the instance process endpoint runs the renewal orchestrator which builds a cart and checks out via Cart Service. There is no in-service cron — it’s triggered externally.

Q4: How long can I pause?

1–30 days per pause, with a rolling 60-day annual limit. Cancelled/completed subscriptions cannot be paused.

Q5: Why don’t my events show up in dev?

EventBridge publishing is disabled when the stage is dev, test, or local. It only emits in higher environments.

Q6: Which endpoints need no auth?

firstDeliveryDate, gift lookup by redemption code, prepaid-plans, plus /health and /cors-test. (swap-recommendations is not implemented — the route is commented out in code.)

Q7: Do I really need admin?

Yes — every protected route requires both the relevant privilege AND admin.

Q8: Why is instanceId required almost everywhere?

The service is multi-tenant; the instance-context hook resolves the tenant instance and tenant-specific config/attributes.

Q9: What are gift/prepaid/swap for?

Gift = purchase a subscription for someone (redemption codes, fraud limits); prepaid = fixed-term prepaid plans (renew/convert/refund); swap = change a product between deliveries.

Q10: Are lifecycle extension hooks active?

No — the lifecycle extension pre/post hooks are commented out and are not currently enabled.


Revision History
2026-08-05 | JP – Created the page and added the content.