Skip to main content

Checkout a product or subscription

Checkout a product to buy it one time or start a subscription plan on a billing account manually. It bypasses billing engine.

Path Parameters
    org_id string required
    billing_id string required

    ID of the billing account to update the subscription for

Request Body required
    subscription_body object
    plan string
    trail_days int32
    product_body object
    product string
Responses

A successful response.


Schema
    subscription object
    id string
    customer_id string
    provider_id string
    plan_id string
    state string
    trial_days int32
    metadata object
    created_at date-time
    updated_at date-time
    canceled_at date-time
    ended_at date-time
    product object
    id string
    name string
    title string
    description string
    plan_ids string[]
    state string
    prices object[]
  • Array [
  • id string
    product_id string
    provider_id string
    name string
    interval known intervals are "day", "week", "month", and "year"
    usage_type usage_type known types are "licensed" and "metered"
    billing_scheme billing_scheme known schemes are "tiered" and "flat"
    state string
    currency currency like "usd", "eur", "gbp"
    amount int64
    metered_aggregate metered_aggregate known aggregations are "sum", "last_during_period" and "max"
    tier_mode tier_mode known modes are "graduated" and "volume"
    metadata object
    created_at date-time
    updated_at date-time
  • ]
  • credit_amount int64
    behavior string
    features object[]
  • Array [
  • id string
    name string
    product_ids string[]
    metadata object
    created_at date-time
    updated_at date-time
  • ]
  • metadata object
    created_at date-time
    updated_at date-time
Loading...