SynqDocs
Management APIOrgs

End the trial now and pay

Ends the org's trial now and pays for its plan: Stripe charges the first period's invoice today on the card it has (nothing prorated), the billing date moves to today, and the plan carries on, charged a period from now; users over the allowance are billed at the period's end, as ever. Answers Stripe's paid invoice, whose `hosted_invoice_url` is the receipt. A declined card is `payment_failed`, nothing is charged, and the trial carries on. When the person's bank wants to confirm the payment (3-D Secure) it is `payment_requires_action`: nothing is charged yet and the trial carries on, `hosted_invoice_url` is Stripe's page where they confirm it, and once they do Stripe takes the payment and the trial ends, as Stripe's webhook tells Synq (with the email and the audit row); it waits a day at most (`expires_at`). Refused while the trial is set to end (renew the plan first, `POST …/billing/plan` with the plan the org is on) and while a move down waits for its end (call the move off the same way, then end the trial; or keep the move and pay when the trial ends): `conflict`. Without a card it is `card_required`, and with no trial `no_trial`. `POST …/billing/trial/end/preview` says what it charges first. The owners and admins get an email of it. Recorded as `org.trial_ended`. Needs `org.billing.edit`.

POST/v1/orgs/{org}/billing/trial/end

Ends the org's trial now and pays for its plan: Stripe charges the first period's invoice today on the card it has (nothing prorated), the billing date moves to today, and the plan carries on, charged a period from now; users over the allowance are billed at the period's end, as ever. Answers Stripe's paid invoice, whose hosted_invoice_url is the receipt. A declined card is payment_failed, nothing is charged, and the trial carries on. When the person's bank wants to confirm the payment (3-D Secure) it is payment_requires_action: nothing is charged yet and the trial carries on, hosted_invoice_url is Stripe's page where they confirm it, and once they do Stripe takes the payment and the trial ends, as Stripe's webhook tells Synq (with the email and the audit row); it waits a day at most (expires_at). Refused while the trial is set to end (renew the plan first, POST …/billing/plan with the plan the org is on) and while a move down waits for its end (call the move off the same way, then end the trial; or keep the move and pay when the trial ends): conflict. Without a card it is card_required, and with no trial no_trial. POST …/billing/trial/end/preview says what it charges first. The owners and admins get an email of it. Recorded as org.trial_ended. Needs org.billing.edit.

Authorization

bearer
AuthorizationBearer <token>

An org API key (sk_live_…, sk_test_…), or an access token from the Synq issuer (the synq brand, on the accounts host) for this API.

In: header

Path Parameters

org*string

The org's id

Match^org_[0-9a-hjkmnp-tv-z]{26}$

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://api.synq.build/v1/orgs/org_01h455vb4pex5vsknk084sn02q/billing/trial/end" \  -H "Authorization: Bearer $SYNQ_API_KEY"
{  "plan": "pro",  "interval": "month",  "current_period_end": "2026-12-16T16:00:00.000Z",  "invoice": {    "id": "in_1Abc",    "number": "SYNQ-0001",    "status": "paid",    "currency": "usd",    "total_cents": "2500",    "amount_due_cents": "2500",    "created": "2026-10-04T16:00:00.000Z",    "period_start": "2026-10-21T12:00:00.000Z",    "period_end": "2026-10-21T12:00:00.000Z",    "hosted_invoice_url": "https://example.com",    "invoice_pdf": "https://example.com"  }}