End Subscription Trial
End a Subscription's trial immediately and start the paid subscription. The Subscription must be in trialing status. The first Invoice is created and charged right away using the payment method on file. The outcome (emails, webhooks, orders) is identical to the trial ending naturally. Safe to retry: the same trial is only ever invoiced and charged once. Once the trial has ended, a repeat returns 400.
Authorization
Public key Secret key In: header
In: header
Path Parameters
Subscription identifier - the initial order number, exactly as returned in subscription.id. Omit the leading # the dashboard shows: a #-prefixed value passes validation but resolves to nothing. Payment-provider subscription ids are not accepted.
^#?([0-9A-Za-z]{12,32}|[0-9]+)(-[0-9]+)?$Request Body
application/json
PATCH /v0/subscriptions/:subscriptionIdOrNumber/endTrial Request body
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v0/subscriptions/ABC123DEF456/endTrial" \ -H "Content-Type: application/json" \ -d '{}'{ "status": "success", "data": { "success": true, "status": "string" }}Pause Subscription Collection PATCH
Pause a Subscription's payment collection temporarily with options for handling payments. During the pause period: - No charges will be made - Access to subscription benefits will be maintained - Can be resumed manually or automatically at a specified time
Create Payment Method Session POST
Create a short-lived session that lets this Subscription's customer update their payment method through the embeddable update element, without your page ever touching card data. Call it from your backend, then hand only the sessionToken to the embed script on your page — the secret key must never reach the browser. The token works only for this one Subscription and expires 15 minutes after it is minted; it is also retired as soon as an update completes, though a browser that never reports back leaves it usable until it expires — the 15 minutes is the guarantee. Mint a fresh token per attempt rather than storing one. Minting is rate-limited per Subscription; exceeding the limit returns 429. The Subscription must be in a state whose payment method can still be used for a future charge (active, trialing, past_due, unpaid or paused); other states return 400. Returns 403 when the embedded payment-method update feature is not enabled for your workspace.