Get your keys from Stripe
Sign in
Pick the environment
pk_live_ and sk_live_. Test keys start with pk_test_ and sk_test_. Make sure you are looking at the one you want to copy.Copy the keys
Create the webhook in Stripe
Add a destination
Choose the events
checkout.session.completedinvoice.payment_succeededcustomer.subscription.deleted
Set the endpoint
Copy the signing secret
whsec_.Add the keys in MagicPost
Open the Stripe card
Enable it
Choose the Mode
Paste the keys
- Live Stripe Publishable Key
- Live Stripe Secret Key
- Sandbox Stripe Publishable Key
- Sandbox Stripe Secret Key
Paste the signing secret
Save
How payments work
One-time plans (Prepaid, Lifetime). MagicPost opens Stripe Checkout in payment mode. The line item is built from the plan’s name, description, price and currency. Recurring plans (Monthly, Yearly). The first time someone buys the plan, MagicPost creates a Stripe Product and a recurring Price (every month or every year) and opens Stripe Checkout in subscription mode. You do not create products or copy Price IDs. If the plan has Free trial days, Stripe delays the first charge by that many days. After payment. Stripe sends the customer back to the return URL with the checkout session. MagicPost fetches the session, records the order, creates the subscription for Monthly, Yearly and Lifetime plans, and opens the success page. Thecheckout.session.completed webhook does the same if the customer closes the browser first. Both paths check whether the order already exists before recording it.
Renewals and cancellation.
invoice.payment_succeededextends the subscriber’s period and renews the credit allowance.customer.subscription.deletedmarks the subscription as cancelled.- When a subscriber is cancelled in MagicPost, MagicPost cancels the Stripe subscription immediately.
Currency
MagicPost sends the plan’s currency in lowercase. Amounts are sent in the smallest unit (price multiplied by 100), except for these currencies, which are sent as whole amounts: BIF, CLP, DJF, GNF, JPY, KMF, KRW, MGA, PYG, RWF, UGX, VND, VUV, XAF, XOF and XPF. Your Stripe account must be able to charge the plan’s currency.Test mode
Use test keys
Create a test-mode webhook
Switch Mode
Go back to Live
Common errors
This payment method is not available right now.
This payment method is not available right now.
We could not start the payment. Please try again or contact support.
We could not start the payment. Please try again or contact support.
storage/logs/laravel.log.We could not prepare this plan for Stripe billing. Please contact support.
We could not prepare this plan for Stripe billing. Please contact support.
Stripe shows webhook deliveries as failed with status 400
Stripe shows webhook deliveries as failed with status 400
webhook secret missing or invalid signature. Fill in Webhook Signing Secret, and make sure it belongs to the destination for the active Mode.Payment was not completed.
Payment was not completed.

