Stripe Action Block
What it does: Charge customers, manage invoices, create payment intents, handle customers and coupons — all from your workflows without writing payment code.
In simple terms: Connect your workflows to Stripe so you can create charges, manage customers, generate invoices, and track payments automatically whenever your business logic triggers it.
When to Use This
Use the Stripe action when you need to:
- ✅ Charge a customer when they complete a form or trigger an event
- ✅ Create and manage customer profiles in Stripe from other systems
- ✅ Generate and list invoices automatically
- ✅ Create payment intents for custom checkout flows
- ✅ Issue discount coupons as part of a campaign or workflow
- ✅ Check your Stripe account balance programmatically
- ✅ Add or remove saved payment methods
Example: When a user subscribes via your website form, create a Stripe customer, charge their card, and send a confirmation email — all in one workflow.
Features
- Charges: Create, get, list, and update charges
- Customers: Create, get, list, update, and delete customers
- Payment Intents: Create and retrieve payment intents
- Invoices: Create and list invoices
- Balance: Check account balance
- Coupons: Create and list discount coupons
- Cards: Add, get, and remove customer payment cards
- Variable Support: Use
{{variables}}from previous steps in any field
Getting Your Stripe Credentials
Stripe uses Secret API Keys for server-side authentication.
Step 1 — Get Your API Key
- Log in to your Stripe Dashboard (opens in a new tab)
- Click Developers in the top navigation
- Go to API keys
- Under Standard keys, copy your Secret key (starts with
sk_live_for production orsk_test_for testing)
Use test keys while building: Start with sk_test_ keys to test your workflows without processing real payments. Switch to sk_live_ keys only when ready for production.
Keep your Secret key private. It grants full API access to your Stripe account. Never expose it in client-side code or workflow field values — always use Credentials.
Step 2 — Connect in InditeAI
- Add the Stripe action block to your workflow
- Click Select Credentials → Create New
- Paste your Secret Key (
sk_test_...orsk_live_...) - Click Save Credentials
Setup in InditeAI
1. Connect Your Account
Follow the credential steps above. Once connected, select your credentials from the dropdown.
2. Select an Action
| Category | Actions |
|---|---|
| Charges | Create Charge, Get Charge, List Charges, Update Charge |
| Customers | Create Customer, Get Customer, List Customers, Update Customer, Delete Customer |
| Payment Intents | Create Payment Intent, Get Payment Intent |
| Invoices | Create Invoice, List Invoices |
| Balance | Get Balance |
| Coupons | Create Coupon, List Coupons |
| Cards | Add Customer Card, Get Customer Card, Remove Customer Card |
Working with Charges
Create Charge
Immediately charges a payment method.
Amount (required): Amount in the smallest currency unit (cents for USD)
1999
{{order.amountCents}}Example: 1999 = $19.99 USD
Currency (required): Three-letter ISO currency code
usd
eur
inrCustomer ID (optional): Stripe customer ID to charge a saved card
cus_abc123xyz
{{customer.stripeId}}Description (optional): Description for this charge
Order #{{order.id}} — {{product.name}}Amount is in smallest unit: For USD, 1999 = $19.99. For INR, 1999 = ₹19.99. Always convert your amount before passing it in.
Get Charge
Retrieves details of a specific charge.
Charge ID (required):
ch_abc123xyz
{{trigger.chargeId}}Returns: id, amount, currency, status (succeeded, pending, failed), description, customer, created, receipt_url
List Charges
Returns recent charges for your account.
Limit (optional): Number of charges to return (max 100)
20Returns: Array of charge objects.
Update Charge
Updates the description or metadata of an existing charge.
Charge ID (required): Charge to update
Description (optional): New description
Working with Customers
Create Customer
Creates a new customer record in Stripe.
Email (optional): Customer email address
{{form.email}}
{{user.email}}Name (optional): Customer's full name
{{form.fullName}}
{{user.firstName}} {{user.lastName}}Phone (optional): Customer phone number
{{form.phone}}Description (optional): Internal note about this customer
Created from workflow — Source: {{trigger.source}}Returns: id (the cus_... ID — save this for future charges), email, name, created
Get Customer
Retrieves a Stripe customer by ID.
Customer ID (required):
cus_abc123xyz
{{user.stripeCustomerId}}Returns: Full customer object including email, name, phone, default_source, subscriptions.
List Customers
Returns a list of customers in your Stripe account.
Limit (optional): Number to return (max 100)
Returns: Array of customer objects.
Update Customer
Updates an existing customer's details.
Customer ID (required): cus_abc123xyz
Fields to update: Email, Name, Phone, Description — any combination.
Delete Customer
Permanently deletes a Stripe customer and all associated data.
Customer ID (required): cus_abc123xyz
Deleting a customer is irreversible. This removes the customer and all payment methods but does not refund existing charges.
Working with Payment Intents
Payment Intents are the modern way to handle payments — they support 3D Secure, SCA, and complex payment flows.
Create Payment Intent
Creates a PaymentIntent, which represents the intent to collect payment.
Amount (required): Amount in smallest currency unit (e.g., cents)
5000
{{cart.totalCents}}Currency (required): ISO currency code
usdCustomer ID (optional): Link to an existing customer
{{customer.stripeId}}Returns: id (pi_...), client_secret (pass to your frontend for card collection), status, amount
Get Payment Intent
Payment Intent ID (required):
pi_abc123xyz
{{trigger.paymentIntentId}}Returns: Full PaymentIntent object including status, latest charge, payment method.
Working with Invoices
Create Invoice
Creates a Stripe invoice (not yet finalized or sent).
Customer ID (required): The customer to invoice
cus_abc123xyz
{{customer.stripeId}}Description (optional):
Invoice for {{month}} servicesReturns: id (in_...), status, amount_due, hosted_invoice_url
List Invoices
Returns recent invoices for your account.
Limit (optional): Number to return
Customer ID (optional): Filter by customer
Returns: Array of invoice objects with id, status, amount_due, due_date, hosted_invoice_url
Balance & Coupons
Get Balance
Returns your current Stripe account balance.
No fields required.
Returns: available (funds available for payout), pending (charges not yet settled), reserved — all by currency.
Create Coupon
Creates a discount coupon.
Coupon ID (optional): Custom coupon code (auto-generated if blank)
SUMMER20
LAUNCH50Percent Off (optional): Percentage discount (1–100)
20Amount Off (optional): Fixed amount off in smallest currency unit (use instead of percent)
500(500 = $5.00 USD off)
Duration (required): once, forever, or repeating
Returns: id (the coupon code), percent_off, amount_off, duration
List Coupons
Returns active coupons in your account.
Limit (optional): Number to return
Managing Customer Cards
Add Customer Card
Attaches a tokenized card to a customer. Card tokens are generated client-side using Stripe.js.
Customer ID (required): cus_abc123xyz
Card Token (required): A Stripe card token (tok_...) generated by your frontend
{{cardForm.token}}
tok_visaReturns: Card object with id, last4, brand, exp_month, exp_year
Get Customer Card
Customer ID (required): cus_abc123xyz
Card ID (required): card_... ID
{{customer.defaultCard}}Remove Customer Card
Detaches a saved card from a customer.
Customer ID (required): cus_abc123xyz
Card ID (required): card_... ID to remove
Response Mapping
Map Stripe response data to workflow variables:
Customers:
id— Stripe customer ID (cus_...)email,name,phonecreated— Unix timestamp
Charges:
id— Charge ID (ch_...)status—succeeded,pending, orfailedamount,currencyreceipt_url— Stripe-hosted receipt URL
Payment Intents:
id— Payment Intent ID (pi_...)client_secret— For frontend card collectionstatus—requires_payment_method,requires_confirmation,succeeded, etc.
Invoices:
id— Invoice ID (in_...)hosted_invoice_url— Public URL to view/pay the invoiceamount_due,status
Common Use Cases
1. Subscription Sign-Up Flow
Trigger: Form submission (name, email, card token)
Workflow:
- Stripe: Create Customer
Email: {{form.email}} Name: {{form.name}} - Stripe: Add Customer Card
Customer ID: {{createCustomer.id}} Card Token: {{form.cardToken}} - Stripe: Create Charge
Amount: 4999 (= $49.99) Customer ID: {{createCustomer.id}} Description: Monthly subscription - Send Email: Confirmation to customer
- Slack: Notify billing team
2. Invoice Generation
Trigger: Schedule Trigger (first of each month) or CRM trigger
Workflow:
- Stripe: Create Invoice
Customer ID: {{customer.stripeId}} Description: Services for {{lastMonth}} - Send Email: Share
{{invoice.hosted_invoice_url}}with customer
3. Coupon Campaign
Trigger: Form submission (early access sign-up)
Workflow:
- Stripe: Create Coupon
Coupon ID: EARLYBIRD{{user.id}} Percent Off: 30 Duration: once - Send Email:
"Here's your 30% off coupon: {{coupon.id}}"
4. Payment Failure Handling
Trigger: Webhook (Stripe webhook for charge.failed)
Workflow:
- Stripe: Get Customer (get customer email)
- Send Email: Payment retry request
- Slack: Alert billing team
- Condition: If 3rd failure → CRM: Flag account
5. Balance Monitoring
Trigger: Schedule Trigger (daily)
Workflow:
- Stripe: Get Balance
- Condition: If
{{balance.available[0].amount}}< 10000 (= $100) Slack: Alert #finance "Low Stripe balance: ${{calculatedBalance}}"
Best Practices
Security
- ✅ Always use test keys (
sk_test_) during development and staging - ✅ Keep Secret keys in Credentials — never pass them in field values
- ✅ Switch to live keys (
sk_live_) only when ready for real payments - ✅ Use restricted API keys (Stripe Dashboard → Developers → API keys → Restricted keys) for read-only workflows
Reliability
- ✅ Store the Stripe Customer ID when creating customers — you'll need it for charges
- ✅ Use Payment Intents for new integrations — they support SCA and 3D Secure
- ✅ Always check charge
statusbefore proceeding — don't assume success - ✅ Handle
pendingcharges with a follow-up check or webhook trigger
Testing
- ✅ Use Stripe test cards:
4242 4242 4242 4242(success),4000 0000 0000 0002(decline) - ✅ Test failure scenarios with Stripe's special test card numbers
- ✅ Use Stripe's Dashboard → Events to inspect webhook payloads
Troubleshooting
"No such customer"
Fix: Verify the Customer ID starts with cus_ and exists in your Stripe account. Check that you're using the same API key environment (test vs. live).
"Amount must be at least X"
Fix: Stripe has minimum charge amounts per currency. For USD, the minimum is $0.50 (50 cents). Ensure your amount field is in the smallest unit (cents, not dollars).
"Card was declined"
Cause: Test card declined, insufficient funds, or fraud check.
Fix: In test mode, use 4242 4242 4242 4242. In production, check the decline_code in the error for more detail.
"Invalid API key provided"
Fix: Verify your secret key in Credentials. Ensure no spaces and the key matches the environment (test/live). Test keys start with sk_test_, live keys with sk_live_.
Payment Intent not confirmed
Fix: Payment Intents require a frontend confirmation step using Stripe.js. The client_secret from Create Payment Intent must be used in your frontend to collect and confirm the payment.
Limitations
- Refunds: Not supported in the current block version — use an HTTP Request block to call the Stripe Refunds API
- Subscriptions: Subscription management not covered — use HTTP Request blocks with the Subscriptions API
- Webhooks: For real-time Stripe events (payment succeeded, invoice paid), use a Webhook Trigger pointing to your workflow's webhook URL, then configure it in Stripe Dashboard → Developers → Webhooks
- Test/Live separation: Test and live mode use different customer/charge IDs — don't mix credentials
Tip: For real-time payment processing (e.g., responding when a payment succeeds), set up a Stripe Webhook pointing to a Webhook Trigger block in your workflow. This is more reliable than polling and handles events like payment_intent.succeeded, invoice.paid, and customer.subscription.deleted.
Example Workflow
Flow:
- Customer submits signup form with card token
- Stripe customer record is created
- Card is attached to the customer
- Charge is processed
- Success or failure email is sent
- Team is notified in Slack
Related Blocks
- Webhook Trigger: Receive Stripe payment events in real time
- Condition: Route logic based on charge status or amount
- Send Email: Send receipts and payment confirmations
- Slack: Alert billing or finance teams
- HubSpot / CRM: Sync customer payment data with your CRM
- PayPal: Alternative payment provider block
Need Help?
- Review Stripe API documentation (opens in a new tab)
- Test payments with Stripe test cards (opens in a new tab)
- Check Stripe Dashboard (opens in a new tab) for API keys and logs
Pro Tip: Always build and test with sk_test_ keys first. Stripe's test mode is fully functional with test card numbers and doesn't process real money. Only switch to sk_live_ keys after end-to-end testing is complete.