API reference
Early accessSubscriptions
A customer on a plan. In v1 every subscription is pay each period: Terra sends a renewal invoice each period and the customer pays it from their own wallet.
Authentication: Secret key or dashboard session.
Guide: Subscriptions and plans
| Method | Path | Summary |
|---|---|---|
| POST | /v1/subscriptions | Subscribe a customer to a plan. |
POST/v1/subscriptions#
Subscribe a customer to a plan.
- Operation id:
createSubscription - Authentication: Secret key or dashboard session
Idempotency-Key: required- Source: the v1 contract. This operation is not in the OpenAPI document yet.
Request body#
| Name | Type | Required | Notes |
|---|---|---|---|
plan | string | yes | A plan_ id. |
customer_email | string (email) | yes |
Response#
The subscription (sub_...) with its first invoice. status is one of trialing, active, past_due, paused, canceled.
Notes#
- Renewal invoices are generated automatically, with reminders 7, 3 and 1 days before.