Stripe
Process payments, manage customers, and handle subscriptions with the Stripe addon for Spala.
Stripe
The Stripe addon integrates Stripe's payment processing API into your Spala flows. Create payment intents, manage customers, set up subscriptions, and handle refunds using drag-and-drop steps.
Installation
1. Enable the Stripe addon from the Addons panel 2. Enter your Stripe Secret Key in the addon configuration
Configuration
API Keys.' },
Use a test mode key (sk_test_...) during development. Switch to a live key (sk_live_...) when you are ready to process real payments.
Available Steps
Create Payment Intent
Creates a payment intent to handle a one-time payment.
Create Customer
Creates a new customer in Stripe.
Create Subscription
Subscribes a customer to a recurring price.
Create Refund
Refunds a previously created charge.
Example: Payment Endpoint
// POST /api/payments/charge
// Step 1: Create Customer (Stripe addon) // email: input.email // name: input.name // Output → vars.customer
// Step 2: Create Payment Intent (Stripe addon) // amount: input.amount // currency: 'usd' // customerId: vars.customer.id // description: 'Order #' + input.orderId // Output → vars.paymentIntent
// Step 3: Database Query // INSERT INTO payments (order_id, stripe_payment_intent_id, amount, status) // VALUES (input.orderId, vars.paymentIntent.id, input.amount, vars.paymentIntent.status)
// Step 4: Response
// { success: true, paymentIntentId: vars.paymentIntent.id }
Always validate payment amounts on the server side. Never trust amounts sent from the client, as they can be tampered with.
Your Stripe secret key (starts with sk_live_ or sk_test_). Found in the Stripe Dashboard under Developers > API Keys. Your Stripe webhook signing secret (starts with whsec_). Required for the Verify Webhook Signature step. Found in the Stripe Dashboard under Developers > Webhooks. Amount in the smallest currency unit (e.g., cents). For $10.00, use 1000. Three-letter ISO currency code (e.g., 'usd', 'eur'). A Stripe customer ID to associate with the payment. An optional description for the payment. Customer email address. Customer full name. Key-value pairs of additional customer data. The Stripe customer ID. The Stripe price ID for the subscription plan. The ID of the charge to refund. Amount to refund in the smallest currency unit. Omit for a full refund. Order # Addons Overview /addons Browse available addons Installing Addons /addons/installing Enable and configure addons in your project