Skip to main content
POST
Attach an already-verified Stripe payment method and start a subscription, no browser required

Authorizations

x-app-id
string
header
required

App identifier (App.id, sent as the x-app-id header)

Body

application/json
customer
string
required
plan_price_id
string
required
stripe_payment_method_id
string
stripe_test_card_token
string

A Stripe test card token (e.g. "tok_visa") to mint a fresh payment method server-side - the cold-start path for CI/seed scripts with no browser. Stripe test mode only; rejected otherwise. See stripe_payment_method_id for the normal path.

email
string

Required the first time this customer is named with no email on file yet.

Response

201 - application/json
id
string
required
tenant_id
string
required
customer
object
required
plan_price_id
string
required
pack_id
string | null
required
pending_plan_price_id
string | null
required
pending_pack_id
string | null
required
provider
enum<string>
required
Available options:
STRIPE,
POLAR
provider_subscription_id
string | null
required
provider_customer_id
string | null
required
status
enum<string>
required
Available options:
ACTIVE,
TRIALING,
PAST_DUE,
CANCELED,
UNPAID,
PAUSED
current_period_start
string<date-time> | null
required
current_period_end
string<date-time> | null
required
trial_start
string<date-time> | null
required
trial_end
string<date-time> | null
required
canceled_at
string<date-time> | null
required
ended_at
string<date-time> | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
plan
object
required
plan_price
object
required
product
object
required
pack
object | null
required
entitlements
object[]
required