Stripe

Stripe operations — create customers, payment intents, subscriptions, list invoices, and retrieve account balance via the Stripe REST API.

When to Use

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.

Inputs

HandleTypeDescription
inputanyUpstream data for {{ input.field }} template references in settings.

Output

HandleTypeDescription
resultobjectStripe operation result

The result (accessed as {{ stripe.* }}) shape:

FieldTypeDescription
successbooleanWhether the operation succeeded
idstringStripe resource ID (customer, payment intent, subscription, etc.)
dataobjectRaw Stripe API response payload
errorstringError message if success is false
{
  "success": true,
  "id": "cus_abc123",
  "data": { "email": "[email protected]", "name": "Jane Doe" },
  "error": null
}

Settings

Each node run executes a single operation. Set Operation, then configure the fields shown for that operation.

Operation

SettingTypeDefaultDescription
operationenumcreate_customerStripe action to perform: create_customer, create_payment_intent, list_invoices, create_subscription, or retrieve_balance.

Agent Permissions

SettingTypeDefaultDescription
allowed_operationsmulti-selectAll operationsWhich 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.

create_customer

Shown when operation is create_customer:

SettingTypeDefaultDescription
customer_emailstringCustomer email address. Supports {{ }} bindings.
customer_namestringCustomer display name. Supports {{ }} bindings.

create_payment_intent

Shown when operation is create_payment_intent:

SettingTypeDefaultDescription
amountnumberAmount in cents (e.g. 2000 for $20.00). Supports {{ }} bindings.
currencystringusdISO currency code. Supports {{ }} bindings.
customer_idstringExisting Stripe customer ID to attach. Supports {{ }} bindings.

list_invoices

Shown when operation is list_invoices:

SettingTypeDefaultDescription
customer_idstringStripe customer ID. Supports {{ }} bindings.

create_subscription

Shown when operation is create_subscription:

SettingTypeDefaultDescription
customer_idstringStripe customer ID. Supports {{ }} bindings.
price_idstringStripe Price ID (e.g. price_...). Supports {{ }} bindings.

retrieve_balance

No additional settings beyond Operation and Agent Permissions. Retrieves the current Stripe account balance.

Required Secrets

Configure on the Environment Variables page:

VariableDescription
STRIPE_SECRET_KEYStripe 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.

Example

Canvas

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 }}

TSL

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

Error Handling

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.

Common Gotchas

  • Amounts are in cents: create_payment_intent expects 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_intent and create_subscription if 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.

See Also

On this page