stripe.charge.hosted ​
Ensure the customer then create a hosted Stripe checkout and return its URL
One call from "who is paying" to "here is the payment URL".
Ensures the Stripe customer exists (by email, when no customer_id is given) and creates the hosted Checkout Session against it, carrying client_reference_id through so stripe.access.grant_on_payment can entitle the right end-user when the webhook arrives.
Mirrors abacatepay.charge.hosted.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-stripe |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | Org-scoped Stripe connection (customer's own account) |
price_id | string | Yes | — | Price to charge |
success_url | string | Yes | — | Redirect URL after successful payment |
cancel_url | string | Yes | — | Redirect URL when the payer cancels |
mode | string | No | — | payment |
quantity | integer | No | — | Line-item quantity (default: 1) |
customer_id | string | No | — | Existing Stripe customer; skips customer creation |
customer_email | string | No | — | Create/attach a customer with this email |
customer_name | string | No | — | Name for a newly created customer |
client_reference_id | string | No | — | End-user uuid to carry onto the payment |
metadata | json | No | — | Metadata stored on the session |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | — |
session_id | string | No | — | — |
session_url | string | No | — | — |
status | string | No | — | — |
customer_id | string | No | — | — |
created_customer | boolean | No | — | — |
ensure_customer | json | No | — | — |
create_session | json | No | — | — |
price_id | string | No | — | — |
success_url | string | No | — | — |
cancel_url | string | No | — | — |
mode | string | No | — | — |
quantity | integer | No | — | — |
customer_email | string | No | — | — |
customer_name | string | No | — | — |
client_reference_id | string | No | — | — |
metadata | json | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | integer | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | customer | stripe.customers.create_customer | — |
| 2 | checkout | stripe.checkout.create_session | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
stripe.customers.create_customer | ensure_customer |
stripe.checkout.create_session | create_session |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "stripe.charge.hosted",
"initial_data": {
"organization_uuid": "value",
"cloud_connection_uuid": "value",
"price_id": "value",
"success_url": "value"
}
}