Prerequisites
Setup
Get your Stripe API keys
- Publishable key (starts with
pk_test_...orpk_live_...) - Secret key (starts with
sk_test_...orsk_live_...)
pk_test_..., sk_test_...) for development.Connect Stripe in vly
- By prompt (recommended)
- From the integrations dashboard
Define your products and prices in Stripe
price_...). You’ll reference these in vly.Ask vly to wire up checkout
Set up the webhook endpoint
- In Stripe → Developers → Webhooks, click Add endpoint.
- Paste the URL above.
- Select events:
checkout.session.completed,customer.subscription.updated,customer.subscription.deleted,invoice.payment_failed. - Copy the signing secret (starts with
whsec_...). - Paste it back into vly’s integration settings as
STRIPE_WEBHOOK_SECRET.
Test the flow end-to-end
- Open your preview deploy.
- Sign up as a test user.
- Click Upgrade to Pro.
- Use Stripe’s test card:
4242 4242 4242 4242, any future expiry, any CVC. - After successful checkout, refresh — your user should now show the Pro plan.
Configuration reference
pk_test_ or pk_live_.sk_test_ or sk_live_.whsec_. Required to verify webhook authenticity.STRIPE_PRO_PRICE_ID, STRIPE_BUSINESS_PRICE_ID.Code patterns
The patterns vly generates. You can hand-edit any of them in Code mode.Creating a checkout session
Webhook handler
Customer billing portal
Going live
When you’re ready for real payments:Activate your Stripe account
Get live mode keys
pk_live_... and sk_live_....Update vly's secrets for production
Register a production webhook
https://yourapp.com/api/stripe-webhook. Copy the new signing secret into production secrets.Switch test → live in your code
process.env.STRIPE_* everywhere — the secrets just point to live keys now.Test with a real card
Common features
Subscriptions
Subscriptions
Marketplaces (Connect)
Marketplaces (Connect)
Invoicing
Invoicing
Tax
Tax
Refunds
Refunds
stripe.refunds.create({ charge: chargeId }). Add an admin-only “Refund” action in your support tool.Disputes / chargebacks
Disputes / chargebacks
Troubleshooting
Webhook says 'No signatures found matching the expected signature'
Webhook says 'No signatures found matching the expected signature'
STRIPE_WEBHOOK_SECRET doesn’t match the webhook endpoint. Each endpoint has its own secret — re-copy from the Stripe dashboard for the correct endpoint.Checkout shows 'No such price'
Checkout shows 'No such price'
Customer's subscription doesn't update after billing portal change
Customer's subscription doesn't update after billing portal change
customer.subscription.updated webhook. Make sure your webhook handler is processing this event and updating your local database.Test mode webhooks not arriving
Test mode webhooks not arriving
