step

stripe

Integrate with Stripe payment platform for customer and subscription management.

Overview

Integrate with Stripe payment platform for customer and subscription management.

This step enables interaction with Stripe's comprehensive payment infrastructure. You can create and manage customers, set up recurring subscriptions, generate invoices, process one-time charges, and retrieve payment information. All operations support template substitution for dynamic data binding. The connector handles authentication via API keys and provides detailed error handling for payment-related issues. Perfect for building billing workflows, subscription management, payment processing, and customer lifecycle automation.

Setup: 1. Create a Stripe account at https://stripe.com/ 2. Get your API keys from the Developers section (https://dashboard.stripe.com/apikeys) 3. Use test keys for development (sk_test_...) and live keys for production (sk_live_...) 4. Store your API key securely (e.g., as an environment variable: STRIPE_API_KEY)

API Key: Required. Get your API keys from https://dashboard.stripe.com/apikeys

Examples

Create a customer

Create a new Stripe customer with email and metadata

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: create
object_type: customers
data:
  email: ${user.email}
  name: ${user.name}
  metadata:
    user_id: ${user.id}
    source: signup_flow
output_to: stripe_customer

Create subscription

Set up a recurring subscription for a customer

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: create
object_type: subscriptions
data:
  customer: ${stripe_customer.id}
  items:
    - price: price_1234567890
  trial_period_days: 14
  metadata:
    plan: premium
output_to: subscription

Retrieve subscription

Get current subscription details

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: retrieve
object_type: subscriptions
object_id: ${subscription.id}
expand:
  - customer
  - default_payment_method
output_to: subscription_details

Update customer metadata

Add or update custom metadata on a customer

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: update
object_type: customers
object_id: ${stripe_customer.id}
data:
  metadata:
    plan_upgraded: "true"
    upgraded_at: ${event.timestamp}
output_to: updated_customer

List active subscriptions

Get all active subscriptions with pagination

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: list
object_type: subscriptions
params:
  status: active
  limit: 100
output_to: active_subscriptions

Search customers by email

Find customers matching an email address

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: search
object_type: customers
query: email:'${user.email}'
output_to: matching_customers

Cancel subscription

Immediately cancel a customer's subscription

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: delete
object_type: subscriptions
object_id: ${subscription.id}
output_to: cancelled_subscription

Create charge

Process a one-time payment charge

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: create
object_type: charges
data:
  amount: ${order.amount_cents}
  currency: usd
  customer: ${stripe_customer.id}
  description: "Order #${order.number}"
output_to: charge

List recent charges

Get the last 10 charges for a customer

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: list
object_type: charges
params:
  customer: ${customer.id}
  limit: 10
output_to: recent_charges

Create invoice

Generate a new invoice for a customer

type: stripe
api_key: ${env:STRIPE_SECRET_KEY}
operation: create
object_type: invoices
data:
  customer: ${stripe_customer.id}
  auto_advance: true
  collection_method: send_invoice
  days_until_due: 30
  description: "Monthly service invoice"
output_to: invoice

Configuration

Parameter Type Required Description
api_key string Yes Stripe secret API key (starts with sk_test_ or sk_live_). Use environment variables to keep this secure.
operation string Yes Stripe API operation to perform: 'create', 'retrieve', 'update', 'delete', 'list', or 'search'.
object_type string Yes Stripe object type: 'customers', 'subscriptions', 'invoices', 'charges', 'payment_intents', 'payment_methods', 'prices', 'products', etc.
object_id string No Stripe object ID for retrieve, update, or delete operations. Supports template substitution.
data string No Data payload for create or update operations. Supports nested objects and template substitution.
params string No Query parameters for list operations (e.g., limit, starting_after, ending_before).
query string No Search query for search operations (Stripe search syntax). Only supported for customers, invoices, charges, payment_intents, prices, products, subscriptions.
output_to string No Event key where the Stripe API response will be stored.
Default: "stripe"
timeout integer No Request timeout in seconds.
Default: 30
api_version string No Stripe API version to use (optional). If not specified, your account's default version is used.
idempotency_key string No Idempotency key for safe retries on create operations. Supports template substitution.
expand string No List of fields to expand in the response (e.g., ['customer', 'default_payment_method']).

Base Configuration

These configuration options are available on all steps:

Parameter Type Default Description
name null Optional name for this step (for documentation and debugging)
description null Optional description of what this step does
retries integer 0 Number of retry attempts (0-10)
backoff_seconds number 0 Backoff (seconds) applied between retry attempts
retry_propagate boolean false If True, raise last exception after exhausting retries; otherwise swallow.