Payment Providers
Stripe + Creem setup, provider selection, and production checklist.
Payment configuration controls checkout, renewals, refunds, and wallet credits. Use the steps below to get a stable path in production.
Provider Options
- Stripe: direct PSP. Best if you already operate your own legal entity and want full control.
- Creem (MoR): Merchant of Record handles taxes/compliance, good for global sales with less ops overhead.
Minimum Required Variables
Stripe:
STRIPE_SECRET_KEYSTRIPE_WEBHOOK_SECRET
Creem:
CREEM_API_KEYCREEM_WEBHOOK_SECRET
Optional:
PAYMENT_PROVIDER_DEFAULT(defaults tostripe; set tocreemif you want Creem as fallback)
The current web env validation still requires STRIPE_*. If you only use Creem, keep Stripe test keys or update apps/ship/src/env.ts.
Supported Product Types
- One-time payments: pay once to unlock delivery or entitlements.
- Subscriptions: monthly/yearly recurring billing for ongoing services and credit refresh.
Subscription Trial Period
Use trialDays on subscription products:
trialDays > 0: subscription starts with a trial period, then transitions to normal billing.trialDays = 0: no trial; billing starts immediately.
Trial periods only apply to subscriptions, not one-time purchases.
Common Enablement Steps
- Set the provider env variables.
- In Admin → Products → Payment configs, add a config per product:
provider:stripeorcreemexternalPriceId: provider-specific price/product IDisActive:truesortOrder: lower means higher priority
- Restart web + API.
- Configure the provider webhook endpoint.
Quick Setup: Stripe
1. Create products and prices
Use one Stripe product per plan, and create two recurring prices under it:
- Monthly price:
recurring.interval = month - Yearly price:
recurring.interval = year
Use a globally unique lookup_key for each price.
2. Map price references
Set externalPriceId to either:
price_xxx(direct price ID), orcreator_monthly/lookup:creator_monthly(lookup key reference)
3. Configure webhook
Endpoint:
https://your-domain/api/v1/webhook/stripe
Recommended events:
checkout.session.completedcustomer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.paidinvoice.payment_failedpayment_intent.succeededpayment_intent.payment_failedpayment_intent.canceled
Quick Setup: Creem
1. Create products in Creem
Each plan/credit pack should have a Creem product_id.
2. Map product IDs
Set externalPriceId to the Creem product_id for that product.
3. Configure webhook
Endpoint:
https://your-domain/api/v1/webhook/creem
Creem sends the signature in the creem-signature header (HMAC-SHA256).
Recommended events:
checkout.completedsubscription.activesubscription.paidsubscription.canceledsubscription.scheduled_cancelrefund.created
Buyer Checklist
- Product payment configs match your provider catalog.
- Webhook endpoint is reachable from the provider in production.
- Renewal, failure, cancellation, and refund flows are tested.
- Dashboard and admin pages show consistent order/subscription status.