# Stripe

<!-- meta: type=event-stripe; location=Custom Events; category=Trigger; platforms=Joomla and WordPress (where applicable) -->

## Overview

When it runs: Stripe POSTs a signed webhook to this flow when a subscribed event occurs. The default is `checkout.session.completed` — a paid Checkout Session with customer email and amount.

Your flow starts with Stripe's event JSON. Downstream steps can use fields such as `type`, `data.object.customer_details.email`, `data.object.amount_total`, `data.object.currency`, and `data.object.payment_status`.

When this trigger fires, JOrchestrator starts the flow and passes the incoming event or request data to the next connected step. Configure filtering, payload shape, and security on the **Design** tab.

## Why use this node

Stripe is a **trigger** in the **Custom Events** group. Triggers start a flow. They listen for an external signal — a CMS event, inbound HTTP call, payment notification, or schedule — and pass the incoming data to the first downstream step.

Typical reasons teams add **Stripe** to a flow:

- Send a receipt or fulfillment email when `checkout.session.completed` fires
- Provision access or update membership when a subscription is created or renewed
- Alert finance when a dispute or refund event arrives
- Sync payment status into your CMS user or order records

## When it runs

Stripe POSTs to this flow when an event type listed on the Design tab arrives. The Joomla and WordPress plugins verify the `Stripe-Signature` header, then start the flow only if `event.type` is in that list. Unmatched events are acknowledged with HTTP 200 so Stripe does not retry, and the flow does not run.

## Example workflows

Common patterns on the canvas:

1. **Stripe** → **Send Email** (receipt using `data.object.customer_details.email` and `data.object.amount_total`)
2. **Stripe** → **If** (`type` is `invoice.paid`) → **Send Email** or CMS update
3. **Stripe** → **Set JSON** → **API REST POST** (sync membership or CRM)

## How to set it up

Link a domain, save and activate the flow, then paste the inbound URL into Stripe Dashboard → Developers → Webhooks. Subscribe only to the event types listed on the Design tab. Paste the endpoint signing secret (`whsec_…`) on the General tab and keep signature verification on.

## Good to know

Stripe rotates egress IPs — do not whitelist IPs. Empty event types accept every event (not recommended). The payload envelope is always a Stripe Event (`id`, `type`, `data.object`); fields inside `data.object` follow the types you selected.

## Properties panel

The designer shows these tabs for this node:

| Tab | Purpose |
|-----|---------|
| **Info** | Plain-language description and output payload fields for downstream steps |
| **AI** | Optional assistant for trigger setup (paid plans) |
| **Design** | Trigger configuration, payload schema, and inbound settings |

### System (automatic — not edited by the user)

These fields are managed by the designer or runtime — you do not type into them directly:

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `_nodeId` | Node ID | `node-id` | No | — | — |
| `_inboundWebhookUrl` | Stripe webhook URL | `webhook-inbound-url` | No | — | Paste this URL in Stripe Dashboard → Developers → Webhooks as the endpoint. Stripe always POSTs. After you add the endpoint, copy the signing secret (whsec_…) into Webhook Secret on the General tab. Subscribe only to the event types listed on this node. |
| `inputSchema` | Payment Payload Schema (optional) | `json-schema` | No | — | Stripe always sends the same Event envelope (id, type, data.object). The fields inside data.object follow the event types you selected — Checkout Session, Invoice, Subscription, and so on. When you select several types, their fields are combined so later steps can map any of them. Branch on type if the objects differ. |

### User-configured — General tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `label` | Label | `text` | No | — | Node label |
| `webhookSecret` | Webhook Secret (whsec_) (optional) | `secret-text` | No | — | Signing secret from Stripe Dashboard after you add this endpoint (starts with whsec_). Used to verify the Stripe-Signature header. Leave blank only for local testing. |
| `verifySignature` | Verify Stripe Signature (optional) | `toggle` (default: `true`) | No | — | When enabled, inbound POSTs must include a valid Stripe-Signature for the signing secret. Keep this on for production. |
| `timestampTolerance` | Timestamp Tolerance (seconds) (optional) | `number` (default: `300`) | No | — | Maximum age in seconds for the Stripe-Signature timestamp (default 300). Older events are rejected as possible replays. |
| `requireHttps` | Require HTTPS Only (optional) | `toggle` (default: `true`) | No | — | When enabled, plain HTTP requests are rejected. Stripe Dashboard endpoints should use HTTPS. |

### User-configured — Design tab

| Property key | Label | Type | Required | Visible when | Notes |
|--------------|-------|------|----------|--------------|-------|
| `eventTypes` | Event types | `multi-select` (default: `checkout.session.completed`) | No | — | Choose one or more Stripe events that should start this flow. Each matching POST runs the flow. Subscribe to the same list in Stripe Dashboard. Leave empty to accept every event (not recommended). |
| `description` | Description (optional) | `textarea` | No | — | Description of the Stripe payment event |

### CMS site configuration (not on this node's properties panel)

Credentials, API keys, mailers, SMTP, and integration defaults are configured in the CMS plugin under **Node Configuration**, not per step on this node. Link the flow to a domain before testing CMS-backed fields.

## Output payload fields

After this step runs, later nodes can reference these fields using placeholders such as
`{{stripe.type}}` or `{{stripe.data.object.customer_details.email}}`.

| Field key | Type | Description |
|-----------|------|-------------|
| `id` | string | Stripe event id (`evt_…`). |
| `object` | string | Always `event`. |
| `type` | string | Event type, for example `checkout.session.completed`. |
| `created` | number | Unix timestamp when Stripe created the event. |
| `livemode` | boolean | Whether the event came from live mode. |
| `data` | object | Stripe `data` wrapper. The object for this event is in `data.object`. |
| `data.object` | object | Checkout Session, PaymentIntent, Invoice, Subscription, Customer, Charge, or Refund — depending on the selected event types. Several types combine those object fields. |
| `data.object.customer_details.email` | string | Customer email on a Checkout Session (default event). |
| `data.object.amount_total` | number | Total amount on a Checkout Session, in the smallest currency unit. |
| `data.object.currency` | string | Checkout Session currency (for example `usd`). |
| `data.object.payment_status` | string | Checkout Session payment status (for example `paid`). |

## Related nodes

Other steps in the same area of the palette:

- **Jorchestrator Cron** (`event-jorchestrator`) — Custom Events
- **PayPal Payments Pro** (`event-paypal`) — Custom Events
- **Webhook** (`webhook`) — Custom Events
- **Zapier Webhook** (`event-zapier`) — Custom Events
