Stripe
Stripe is the default gateway in Subscribd and the most feature-complete integration, including native proration, trial extension, and automatic tax.Configuration
Environment variables
Checkout modes
The Stripe gateway supports two embedded checkout modes controlled bySTRIPE_CHECKOUT_MODE:
Elements mode (default)
Uses Stripe’s Payment Element (SetupIntent + card form). The subscriber completes checkout in-page without leaving your application:<livewire:subscribd::subscriber.checkout /> to render the embedded form.
Checkout mode
Redirects to Stripe’s hosted Checkout page. On completion, Stripe redirects back to yourreturn_url:
Webhooks
Register the webhook endpoint
Registerhttps://yourapp.com/subscribd/webhook/stripe as a webhook endpoint in the Stripe Dashboard. Enable the following events:
customer.subscription.createdcustomer.subscription.updatedcustomer.subscription.deletedinvoice.payment_succeededinvoice.payment_failedpayment_method.attachedpayment_method.detachedcustomer.updated
Webhook signing
Copy the Signing secret from the webhook endpoint dashboard entry and set it asSTRIPE_WEBHOOK_SECRET. Subscribd verifies every webhook signature — unsigned requests are rejected with 400.
Local development
Use the Stripe CLI to forward webhooks to your local environment:whsec_) into your .env.
Automatic tax
Enable Stripe Tax to calculate tax automatically based on the customer’s location:Native proration
Stripe supports native proration. When the proration strategy isnow, Subscribd forwards the proration flag to Stripe rather than computing the adjustment locally. The proration invoice appears in Stripe’s dashboard and in your subscribd_invoices table.
Trial extension
Stripe is the only gateway that supports native trial extension. When you callExtendTrial, Subscribd pushes the new trial_end timestamp to Stripe directly:
Strong Customer Authentication (SCA)
For cards that require 3DS confirmation,CreateSubscription throws RequiresActionException. Handle it by redirecting the user to the confirmation URL: