Create Checkout Session
stripe.create_checkout_session
ActionBusiness appsconnection required
Calls the Stripe API with the connection's secret key.
Create a Stripe Checkout Session and get the hosted payment page URL.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- API key
- Providers
- Stripe
- Secret shape
- the Stripe secret key (sk_...)
- Resolved by
- config.connection_id, else node.connection_id
Configuration
13 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
mode payment takes a one-off payment, subscription starts a recurring one, setup only saves a payment method for later. | string | Yes | — | one of "payment", "setup", "subscription" | payment |
price_id A single price to charge for (price_...). Use 'line_items' for more than one line. | string | No | — | — | price_1MoBy5LkdIwHu7ixZhnattbh |
quantity How many units of 'price_id' to charge for. | number | No | 1 | ≥ 1 | — |
line_items What the customer is buying, as a JSON array of objects such as [{"price": "price_123", "quantity": 2}]. | array | No | — | array of object | — |
success_url Where Stripe sends the customer after a successful payment. | string | No | — | url format | https://example.com/thanks |
cancel_url Where the customer goes if they back out of the payment page. | string | No | — | url format | — |
customer Charge an existing customer (cus_...) and prefill their details. | string | No | — | — | — |
customer_email Prefill the email field for a customer you have not created yet. | string | No | — | email format | — |
client_reference_id Your own id for this session — an order or cart id — returned on the session and its webhook so you can match them up. | string | No | — | ≤ 200 characters | — |
allow_promotion_codes Show a promotion code box on the payment page. | boolean | No | — | — | — |
expires_at When the session expires, as a Unix timestamp in seconds. Between 30 minutes and 24 hours from now; Stripe defaults to 24 hours. | number | No | — | ≥ 0 | — |
metadata Key/value pairs stored on the Checkout Session and returned on every read. | object | No | — | — | — |
idempotency_key Overrides the key this node derives from the step. Set it to a business identifier (an order id, say) when the same write must not repeat across runs; leave it blank and a retry of this step reuses the step's own key. | string | No | — | ≤ 255 characters | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"mode": "payment",
"price_id": "price_1MoBy5LkdIwHu7ixZhnattbh",
"quantity": 1,
"success_url": "https://example.com/thanks"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The Checkout Session id (cs_...). | string | — |
url The hosted payment page to send the customer to. | string | — |
status open, complete or expired. | string | — |
payment_status paid, unpaid or no_payment_required. | string | — |
mode payment, setup or subscription. | string | — |
amount_total Total after discounts and tax, in the minor unit. | number | — |
amount_subtotal Total before discounts and tax, in the minor unit. | number | — |
currency Three-letter lowercase ISO currency code. | string | — |
customer The customer the session created or used, or null. | string | — |
customer_email The email prefilled on the page, or null. | string | — |
client_reference_id Your own reference for this session, or null. | string | — |
payment_intent The PaymentIntent the session created, or null. | string | — |
subscription The subscription the session created, or null. | string | — |
expires_at When the session expires, Unix seconds. | number | — |
created Creation time, as a Unix timestamp in seconds. | number | — |
{
"amount_subtotal": 0,
"amount_total": 0,
"client_reference_id": "",
"created": 0,
"currency": "",
"customer": "",
"customer_email": "",
"expires_at": 0,
"id": "",
"mode": "",
"payment_intent": "",
"payment_status": "",
"status": "",
"subscription": "",
"url": ""
}Notes
- payment and subscription mode need at least one line item; setup mode needs none.
- success_url is required for the hosted page, which is the default UI.
See Create Checkout Session run in a workflow.
In a technical demo we add the Stripe connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.