Skip to main content
POST
cURL
Moves a trialing subscription’s end, or ends the trial now. Free trials explains both kinds.
  • trialEndsAt sets the new end; days counts from now (14 on day 10 of a 14-day trial gives 14 more). The new end must be after now (422 invalid_trial_end). No credits are added: the trial’s grant lasts until the new end.
  • end: "now" on a card trial bills the first period at once and grants it; send an Idempotency-Key. On a no-card trial it goes back to the plan before the trial at once.
  • A subscription that isn’t trialing answers 409 subscription_not_trialing.
Needs the Billing permission at Write.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

idempotency-key
string

Required with end: now on a card trial, which charges.

Required string length: 1 - 255

Path Parameters

subscriptionId
integer
required

The subscription's id from List customer subscriptions.

Required range: x <= 2147483647

Query Parameters

customerId
string
required

Your ID for the customer, such as your user ID.

Required string length: 1 - 255

Body

application/json
trialEndsAt
string<date-time>
required

The trial's new end. Must be after now.

Response

The trial's state after the change

subscriptionId
integer
required
status
enum<string>
required
Available options:
trialing,
active,
canceled,
past_due
trialEndsAt
string<date-time> | null
required