Stripe Integration
Configure Stripe as your payment processor.
Updated
On this page
Overview
Accept payments on your storefront using Stripe. DashForDevs integrates with Stripe for secure card processing.
Setup
- Create a Stripe account at stripe.com
- Go to Settings → Payments in the dashboard
- Select Stripe as your payment processor
- Enter your Stripe publishable key and secret key
- Save
How It Works
import dash from "@/lib/dash"
// 1. Load Stripe processor
const processor = await dash.payment.load()
// 2. Tokenize card data
const { token, descriptor } = await dash.payment.tokenize({
cardNumber: "4242424242424242",
expDate: "12/26",
cvv: "123",
})
// 3. Complete checkout with token
const { order } = await dash.checkout.complete({
cartId: dash.cart.cartId,
shipping: { ... },
payment_token: { token, descriptor },
})
Next Steps
- Payment Flow — Full payment lifecycle
- Saved Cards — Saving cards for repeat purchases
- Payment Processing — Tokenization details
Which processors are available, and why there is more than one, is covered in payments for high-risk verticals.