Create Payment Intent
stripe.create_payment_intent
ActionBusiness appsconnection required
Calls the Stripe API with the connection's secret key.
Create a PaymentIntent to collect a payment from a customer.
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
12 fields, 2 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 |
|---|---|---|---|---|---|
amount How much to collect, in the currency's minor unit (2000 = 20.00 USD, and 2000 = 2000 JPY because the yen has no minor unit). | number | Yes | — | 1–99999999 | 2000 |
currency Three-letter lowercase ISO currency code, such as usd or eur. | string | Yes | — | 3–3 characters | usd |
customer The customer to bill (cus_...). Required to reuse a saved card. | string | No | — | — | — |
payment_method A payment method to attach (pm_...), such as a customer's saved card. | string | No | — | — | — |
description Description shown on the payment in the Stripe dashboard. | string | No | — | — | — |
receipt_email Send the receipt to this address once the payment succeeds. | string | No | — | email format | — |
capture_method When Stripe takes the money. Choose manual to authorise now and capture later with Stripe: Capture Charge. | string | No | — | one of "automatic", "automatic_async", "manual" | — |
confirm Attempt the payment immediately instead of leaving the intent open. | boolean | No | — | — | — |
off_session The customer is not present. Set this for a saved-card charge run by a schedule, together with 'confirm'. | boolean | No | — | — | — |
automatic_payment_methods Let Stripe offer every payment method enabled in your dashboard that fits this amount and currency. | boolean | No | — | — | — |
metadata Key/value pairs stored on the PaymentIntent 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.
{
"amount": 2000,
"currency": "usd"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The PaymentIntent id (pi_...). | string | — |
status One of requires_payment_method, requires_confirmation, requires_action, processing, requires_capture, canceled or succeeded. | string | — |
amount Amount to collect, in the currency's minor unit. | number | — |
amount_received Amount collected so far, in the minor unit. | number | — |
amount_capturable Authorised amount still to capture, in the minor unit. | number | — |
currency Three-letter lowercase ISO currency code. | string | — |
customer The customer this intent belongs to, or null. | string | — |
description The description stored on the intent. | string | — |
payment_method The attached payment method id, or null. | string | — |
latest_charge The charge this intent last produced, or null. | string | — |
capture_method When the funds are captured for this intent. | string | — |
cancellation_reason Why the intent was cancelled, when it was. | string | — |
receipt_email Where Stripe sends the receipt, or null. | string | — |
created Creation time, as a Unix timestamp in seconds. | number | — |
metadata The key/value pairs stored on the intent. | object | — |
{
"amount": 0,
"amount_capturable": 0,
"amount_received": 0,
"cancellation_reason": "",
"capture_method": "",
"created": 0,
"currency": "",
"customer": "",
"description": "",
"id": "",
"latest_charge": "",
"metadata": {},
"payment_method": "",
"receipt_email": "",
"status": ""
}Notes
- The client_secret is not returned: it lets a browser complete the payment and run outputs are stored. Fetch it in your front end from the intent id.
See Create Payment Intent 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.