Skip to content
Terra WalletDevelopers

Early access. The Terra API and SDKs may change before launch, and the SDK packages are not published yet.

View as Markdown

API reference

Early access

Subscriptions

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

MethodPathSummary
POST/v1/subscriptionsSubscribe 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#

NameTypeRequiredNotes
planstringyesA plan_ id.
customer_emailstring (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.