Skip to content
Proud to collaborate with Microsoft for Startups

subscription.platform.checkout ​

Start customer checkout for the canonical Orkestia platform subscription.

Create a Stripe checkout session for the canonical platform subscription.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-subscription
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID to subscribe.
user_uuiduuidNo—User initiating checkout.
success_urlstringYes—Browser return URL after payment.
cancel_urlstringYes—Browser return URL after cancellation.
selected_price_refstringNo—Optional Stripe price reference for a selected billing cycle.
user_seatsintegerNo—Initial paid user seat quantity.
key_seatsintegerNo—Initial paid agent/key seat quantity.
trace_refstringNo—Trace reference for request correlation.
return_channeljsonNo—Optional notification routing metadata.
agent_session_refstringNo—Optional initiating agent session reference.
idempotency_keystringNo—Caller-supplied retry key.

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidNo—Organization UUID.
plan_uuiduuidNo—Resolved platform plan UUID.
platform_app_codestringNo—Canonical app code.
platform_plan_namestringNo—Resolved platform plan name.
checkout_workflow_idstringNo—Child subscription.checkout workflow id to watch.
checkout_urlstringNo—Stripe Checkout URL to open in a browser.
pending_subscription_uuiduuidNo—Pending subscription UUID when available.
stripe_checkout_session_refstringNo—Stripe Checkout Session reference.
selected_price_refstringNo—Selected Stripe price reference.
user_seatsintegerNo—Requested user seat quantity.
key_seatsintegerNo—Requested key seat quantity.
return_channeljsonNo—Notification routing metadata.
agent_session_refstringNo—Initiating agent session reference.
next_actionjsonNo—Instruction for UI/agent handoff.
statusstringNo—Wrapper status.
completed_atstringNo—Workflow completion timestamp.
failed_atstringNo—Failure timestamp.
failure_reasonstringNo—Failure reason.
failure_typestringNo—Failure type.
failed_actionstringNo—Failed action.
failed_at_statestringNo—Failed state.
failed_stepstringNo—Failed step.
failed_layerstringNo—Failed layer.
errorstringNo—Error message.
error_typestringNo—Error class.

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—create_checkout—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingcreate_checkoutcompleted—
* (any state)failfailed—

Business Errors ​

CodeMessage Template
BILLING_AUTHORIZATION_REQUIRED
BILLING_ITEM_INPUT_ERROR
BILLING_ORGANIZATION_NOT_FOUNDOrganization {organization_uuid} not found
PLATFORM_PLAN_NOT_FOUNDNo active platform subscription plan is configured
CHECKOUT_MANAGER_UNAVAILABLEWorkflow manager is unavailable, so checkout cannot be started
CHECKOUT_URL_UNAVAILABLECheckout workflow {checkout_workflow_id} did not return a checkout URL

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "subscription.platform.checkout",
  "initial_data": {
    "organization_uuid": "value",
    "success_url": "value",
    "cancel_url": "value"
  }
}