The Stripe integration handles payments, subscriptions, invoicing, and refunds in your Archie app. Once you connect it, Archie exposes a namespaced set of GraphQL queries and mutations (Documentation Index
Fetch the complete documentation index at: https://archie.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
stripe_*) that your frontend, custom functions, and backend routes can call.
A typed TypeScript SDK for integrations is coming with the next archie-app release. This page documents the GraphQL operation surface available today.
Enable the integration
Open the Integrations module in the left sidebar and pick Stripe from the catalog. You’ll need from your Stripe dashboard:- Secret Key — starts with
sk_test_(test mode) orsk_live_(production). Used by the backend to authenticate API calls. - Publishable Key — starts with
pk_test_orpk_live_. Safe to use in the frontend. - Environment — pick
TESTwhile building,LIVEwhen you’re ready to take real payments. - Webhook Secret (optional) —
whsec_.... Required if you want Archie to verify Stripe webhook signatures.
What you can do
The integration adds GraphQL operations for everything most apps need from Stripe:- Customers —
stripe_customer,stripe_customers,stripe_createCustomer,stripe_updateCustomer,stripe_deleteCustomer - Payment intents —
stripe_paymentIntent,stripe_paymentIntents,stripe_createPaymentIntent,stripe_updatePaymentIntent,stripe_confirmPaymentIntent,stripe_cancelPaymentIntent - Subscriptions —
stripe_subscription,stripe_subscriptions,stripe_createSubscription,stripe_updateSubscription,stripe_cancelSubscription - Products and prices —
stripe_products,stripe_createProduct,stripe_prices,stripe_createPrice - Invoices —
stripe_invoice,stripe_invoices,stripe_payInvoice - Refunds —
stripe_refunds,stripe_createRefund - Checkout sessions —
stripe_createCheckoutSessionfor Stripe-hosted checkout - Billing portal —
stripe_createBillingPortalSessionfor self-serve subscription management - Payment methods —
stripe_paymentMethods,stripe_attachPaymentMethod,stripe_detachPaymentMethod - Webhook events —
stripe_webhookEventsfor inspecting signed events Archie has received
first and after.
Calling Stripe from your app
Create a customer
Create a Checkout session
For Stripe-hosted checkout (the easiest path for most builders):url. Stripe handles the payment and redirects to your successUrl when complete.
Open the billing portal
Let customers manage their own subscription:Create a payment intent (manual flow)
If you want to render a custom checkout with Stripe.js or Stripe Elements:clientSecret to your frontend Stripe.js confirm step.
Webhooks
When you save the integration, Archie generates a webhook URL specific to your project and environment. Add it in the Stripe dashboard under Developers → Webhooks, and provide the resulting signing secret in the integration config. Archie verifies every incoming event before storing it. Query received events withstripe_webhookEvents, or react to them inside a custom function — see Webhooks.
Common events you’ll likely care about:
payment_intent.succeededpayment_intent.payment_failedcustomer.subscription.created/updated/deletedinvoice.paid/invoice.payment_failedcheckout.session.completed
FAQ
Test mode vs. live mode — when does each apply?
Test mode vs. live mode — when does each apply?
Archie selects credentials based on the environment your app is running in. Development environments use the keys saved with
TEST; production uses the ones saved with LIVE. Setting up both up front means you can swap stages without touching code.Can I use Stripe.js or Stripe Elements on the frontend?
Can I use Stripe.js or Stripe Elements on the frontend?
Yes. Use
stripe_createPaymentIntent to get a clientSecret, then confirm it on the frontend with the publishable key. The publishable key is returned from the integration config and is safe to expose in client code.How do I refund a payment?
How do I refund a payment?
Call
stripe_createRefund with the paymentIntentId. Omit amount for a full refund or pass an amount for partial. Refunds start as pending and update to succeeded or failed once Stripe processes them.What happens to webhook events if my app is down?
What happens to webhook events if my app is down?
Stripe retries failed webhook deliveries with exponential backoff for up to three days. Once your app is reachable, Archie verifies and stores the event normally. You can also replay events from the Stripe dashboard.
Can I use a specific Stripe SDK version directly?
Can I use a specific Stripe SDK version directly?
Yes. Add the
stripe package to your custom function and call it with ctx.integrations.stripe.config.secretKey. The GraphQL operations cover most cases; the SDK is for anything they don’t expose.