subscription.billing.end-user-seat-pack.checkout ​
Create a paid Stripe Checkout URL for an end-user seat pack.
Create a Stripe Checkout session for an end-user seat pack and grant it after payment.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-subscription |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
identity_app_uuid | uuid | Yes | — | — |
pack_size | integer | Yes | — | — |
success_url | string | Yes | — | — |
cancel_url | string | Yes | — | — |
user_uuid | uuid | No | — | — |
return_channel | json | No | — | — |
agent_session_ref | string | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | — |
identity_app_uuid | uuid | No | — | — |
pack_size | integer | No | — | — |
included_free_seats | integer | No | — | — |
stripe_customer_ref | string | No | — | — |
stripe_price_ref | string | No | — | — |
stripe_checkout_session_ref | string | No | — | — |
checkout_url | string | No | — | — |
seat_grant_uuid | uuid | No | — | — |
billing_item_uuid | uuid | No | — | — |
entitlement_grant_uuid | uuid | No | — | — |
next_action | json | No | — | — |
return_channel | json | No | — | — |
agent_session_ref | string | No | — | — |
status | string | No | — | — |
completed_at | string | No | — | — |
canceled_at | string | No | — | — |
cancel_reason | string | No | — | — |
failed_at | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | create_checkout | — |
checkout_created | No | No | — | — | — |
canceled | No | Yes | Yes | — | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | create_checkout | checkout_created | — |
checkout_created | payment_received | completed | — |
checkout_created | cancel | canceled | — |
* (any state) | fail | failed | — |
Business Errors ​
| Code | Message Template |
|---|---|
BILLING_OPERATION_INPUT_ERROR | |
BILLING_OPERATION_STRIPE_NOT_CONFIGURED | STRIPE_SECRET_KEY is required for paid billing item changes |
BILLING_OPERATION_PRICE_NOT_CONFIGURED | No Stripe price is configured for {item_code} |
BILLING_OPERATION_IDENTITY_APP_NOT_FOUND | Identity app {identity_app_uuid} not found for organization |
BILLING_OPERATION_CHECKOUT_URL_UNAVAILABLE | Stripe did not return a checkout URL |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "subscription.billing.end-user-seat-pack.checkout",
"initial_data": {
"organization_uuid": "value",
"identity_app_uuid": "value",
"pack_size": 123,
"success_url": "value"
}
}