Substratal Apps Substratal Apps Hub Interface Specifications
GitHub

Help Screens Plan & billing

Checkout / billing portal BIL-03

Hand off to the payment page or billing portal in the browser and confirm the result on return.

Who can use itSelf (individual); org_admin (org checkout); org_admin or billing.manage (org portal)
Where it is/billing/return · link: https://hub.substratalapps.com/billing/return or substratal://billing/return
Available onWeb (PWA), iOS / iPadOS, Android, Windows, Linux (GNOME), macOS
PhasePhase 2

What you can do here

  • Upgrade (individual) — 201 {url, expires_at} → open url externally. 409 subscription_exists → open portal instead. 409 test_mode_billing_unavailable / 503 billing_unavailable → explain.
  • Manage billing (individual) — 201 → open url externally. 409 no_billing_account → hide button.
  • Subscribe organization — as individual
  • Manage organization billing — as individual
  • Return — success: poll the matching GET …/subscription until plan = standard (coverage starts when the payment processor confirms, usually seconds); cancelled: toast "Checkout cancelled". A checkout that was never finished leaves the subscription incomplete, then incomplete_expired (about 24 h); either way, starting checkout again is allowed

On your platform

AppStatusHow it's built
Web (PWA)—window.open (new tab) / same-tab redirect for PKCE
iOS / iPadOS—openURL / ASWebAuthenticationSession
AndroidPlannedCustom Tabs / Auth Tab
Windows—Launcher.LaunchUriAsync
Linux (GNOME)—GtkUriLauncher (OpenURI portal)
macOS—NSWorkspace.open / ASWebAuthenticationSession

Status is reported by each app's repository; — means that app doesn't report it yet.

For developers: API calls

MethodPathWhat it does
POST/users/me/billing/checkout-sessionsStart a checkout on the payment page to subscribe yourself to Standard, monthly or yearly (User token)
POST/users/me/billing/checkout-sessions/{session_id}/confirmConfirm your checkout on return and apply the subscription at once (User token)
POST/users/me/billing/portal-sessionsOpen the billing portal for your own subscription (User token)
POST/organizations/{id}/billing/checkout-sessionsStart a checkout on the payment page to subscribe the Organization to Standard, monthly or yearly (org admin, User token)
POST/organizations/{id}/billing/checkout-sessions/{session_id}/confirmConfirm the Organization's checkout on return and apply the subscription at once (org admin, User token)
POST/organizations/{id}/billing/portal-sessionsOpen the billing portal for the Organization's subscription (org admin or billing.manage, User token)

Every call sends Substratal-Version: 1. Paths are at the host root, with no /v1.

Full screen specification

Last updated 2026-11-23 · Built 2026-11-24 from 5941f4c · API 1.0.0-draft.36 · Substratal-Version: 1