Stripe
Stripe operations — create customers, payment intents, subscriptions, list invoices, and retrieve account balance via the Stripe REST API.
Use Stripe when you need to automate billing workflows:
- Create customers from signup or onboarding events
- Create payment intents for one-time charges
- List invoices for a customer (billing history, dunning)
- Create subscriptions when a user selects a plan
- Retrieve your Stripe account balance for reconciliation
Connect a Stripe node to an AI Agent Tools handle to let the agent look up billing information or create customers on demand.
| Handle | Type | Description |
|---|---|---|
input | any | Upstream data for {{ input.field }} template references in settings. |
| Handle | Type | Description |
|---|---|---|
result | object | Stripe operation result |
The result (accessed as {{ stripe.* }}) shape:
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the operation succeeded |
id | string | Stripe resource ID (customer, payment intent, subscription, etc.) |
data | object | Raw Stripe API response payload |
error | string | Error message if success is false |
{
"success": true,
"id": "cus_abc123",
"data": { "email": "[email protected]", "name": "Jane Doe" },
"error": null
}
Each node run executes a single operation. Set Operation, then configure the fields shown for that operation.
| Setting | Type | Default | Description |
|---|---|---|---|
operation | enum | create_customer | Stripe action to perform: create_customer, create_payment_intent, list_invoices, create_subscription, or retrieve_balance. |
| Setting | Type | Default | Description |
|---|---|---|---|
allowed_operations | multi-select | All operations | Which operations are available when this plugin is used as an AI agent tool. Excluded from the tool schema — the agent can only invoke operations in this list. |
Shown when operation is create_customer:
| Setting | Type | Default | Description |
|---|---|---|---|
customer_email | string | — | Customer email address. Supports {{ }} bindings. |
customer_name | string | — | Customer display name. Supports {{ }} bindings. |
Shown when operation is create_payment_intent:
| Setting | Type | Default | Description |
|---|---|---|---|
amount | number | — | Amount in cents (e.g. 2000 for $20.00). Supports {{ }} bindings. |
currency | string | usd | ISO currency code. Supports {{ }} bindings. |
customer_id | string | — | Existing Stripe customer ID to attach. Supports {{ }} bindings. |
Shown when operation is list_invoices:
| Setting | Type | Default | Description |
|---|---|---|---|
customer_id | string | — | Stripe customer ID. Supports {{ }} bindings. |
Shown when operation is create_subscription:
| Setting | Type | Default | Description |
|---|---|---|---|
customer_id | string | — | Stripe customer ID. Supports {{ }} bindings. |
price_id | string | — | Stripe Price ID (e.g. price_...). Supports {{ }} bindings. |
No additional settings beyond Operation and Agent Permissions. Retrieves the current Stripe account balance.
Configure on the Environment Variables page:
| Variable | Description |
|---|---|
STRIPE_SECRET_KEY | Stripe secret API key (e.g. sk_test_... or sk_live_...). Get your key from the Stripe Dashboard. Use a test key during development. |
Never expose your secret key in workflow settings or code. Always use environment variables via the Env Vars page or {{ env.STRIPE_SECRET_KEY }} bindings.
Create a customer when a user signs up via webhook:
Webhook Trigger → Stripe (create_customer)
Stripe settings:
- Operation:
create_customer - Customer Email:
{{ webhook.body.email }} - Customer Name:
{{ webhook.body.name }}
Access the result downstream:
{{ stripe.success }}
{{ stripe.id }}
{{ stripe.data.email }}
Process a Stripe payment webhook and create a payment intent:
Webhook Trigger (provider: Stripe) → Stripe (create_payment_intent)
Stripe settings:
- Operation:
create_payment_intent - Amount:
{{ webhook.body.data.object.amount }} - Currency:
usd - Customer ID:
{{ webhook.body.data.object.customer }}
import webhook from @tensorify/webhook-trigger:4.0.0
import stripe from @tensorify/stripe:1.0.0
node trigger @tensorify/webhook-trigger:4.0.0 {
provider = "stripe"
path = "/stripe/signup"
method = "POST"
}
node create_customer @tensorify/stripe:1.0.0 {
operation = "create_customer"
customer_email = "{{ webhook.body.email }}"
customer_name = "{{ webhook.body.name }}"
}
trigger.payload -> create_customer.input
Stripe has a hidden On Error control output branch (error). Enable it via the "Error output handle" toggle at the bottom of the settings panel.
The error branch fires when the Stripe API returns an error or the request fails at runtime. On the main path, failures are also reflected in {{ stripe.success }} and {{ stripe.error }} on the result output.
- Amounts are in cents:
create_payment_intentexpects the amount in the smallest currency unit (e.g.2000= $20.00 USD). - Test vs live keys: Use
sk_test_...keys in development. Live keys charge real money. - Check
stripe.success: The node completes on the main output even when the API call fails. Use an If node or the On Error branch to handle failures. - Agent permissions: Restrict Allowed Operations (Agent) — exclude
create_payment_intentandcreate_subscriptionif the agent should only read billing data. - Webhook vs API: Receiving Stripe events uses Webhook Trigger with provider set to Stripe; this plugin calls the Stripe API to create or retrieve resources.
- Webhook Trigger — receive Stripe events with built-in signature verification
- Send Email (via Resend) — send payment confirmation emails
- AI Agent — connect Stripe as an agent tool
- Environment Variables — store your
STRIPE_SECRET_KEY
