Get your keys from Paystack
Sign in
Pick test or live
pk_test_ and sk_test_, live keys with pk_live_ and sk_live_.Copy the keys
Add the keys in MagicPost
Open the Paystack card
Enable it
Paste the keys
- Live Paystack Public Key
- Live Paystack Secret Key
- Sandbox Paystack Public Key
- Sandbox Paystack Secret Key
Save
Add the webhook in Paystack
Open the webhook settings
Enter the URL
Save
How payments work
One-time plans (Prepaid, Lifetime). MagicPost starts a Paystack transaction for the plan price and redirects the customer to the Paystack payment page. When the customer returns, MagicPost looks up the transaction by its reference, and only records the order if Paystack reports it as successful. Recurring plans (Monthly, Yearly). The first time someone buys the plan, MagicPost creates a Paystack plan that bills monthly or annually. The customer pays the first charge on Paystack, and Paystack creates the subscription. MagicPost then looks up the subscription code for that customer and plan and stores it on the subscriber. Renewals and cancellation.subscription.createandinvoice.payment_succeededextend the subscriber’s period and renew the credit allowance.subscription.disableandsubscription.not_renewmark the subscription as cancelled.charge.successrecords a payment that has not been recorded yet, provided the charge carries the user and plan details MagicPost sent when it started the payment.- Cancelling a subscriber in MagicPost does not cancel it at Paystack. Also disable the subscription in your Paystack Dashboard.
Currency
MagicPost sends the plan’s currency in uppercase and the price multiplied by 100, for every currency. Your Paystack account must be able to charge the plan’s currency.Test mode
Fill in the two Sandbox key fields, select Sandbox under Mode and save. Pay with one of Paystack’s test cards while your Paystack Dashboard is in test mode. Switch Mode back to Live before you sell.Common errors
This payment method is not available right now.
This payment method is not available right now.
Paystack could not start the payment. Please try again. / Paystack could not start the subscription. Please try again.
Paystack could not start the payment. Please try again. / Paystack could not start the subscription. Please try again.
storage/logs/laravel.log.Paystack returned an unexpected response.
Paystack returned an unexpected response.
We could not prepare this plan for Paystack billing. Please contact support.
We could not prepare this plan for Paystack billing. Please contact support.
Missing Paystack reference. / Paystack verification failed. / Payment was not completed.
Missing Paystack reference. / Paystack verification failed. / Payment was not completed.
Paystack shows the webhook failing with status 400
Paystack shows the webhook failing with status 400
invalid signature: the Secret Key saved for the active Mode is not the one that signed the event. A body of webhook secret missing means no Secret Key is saved for that Mode.
