Get your credentials from PayPal
Open the developer dashboard
Choose Sandbox or Live
Create an app
Copy the credentials
Create the webhook in PayPal
Add a webhook
Enter the URL
Select the events
BILLING.SUBSCRIPTION.RENEWEDPAYMENT.SALE.COMPLETEDBILLING.SUBSCRIPTION.CANCELLEDBILLING.SUBSCRIPTION.EXPIREDBILLING.SUBSCRIPTION.SUSPENDED
Copy the Webhook ID
Add the credentials in MagicPost
Open the PayPal card
Enable it
Paste the credentials
- Live Paypal Client ID
- Live PayPal Client Secret
- Sandbox Paypal Client ID
- Sandbox PayPal Client Secret
Paste the Webhook ID
Save
How payments work
One-time plans (Prepaid, Lifetime). MagicPost creates a PayPal order for the plan price and sends the customer to PayPal to approve it. The checkout page shows your site name (the application name) as the brand and asks for no shipping address. When the customer returns, MagicPost captures the payment, records the order, and for Lifetime plans creates the subscription. Recurring plans (Monthly, Yearly). The first time someone buys the plan, MagicPost creates a PayPal catalog product and a billing plan that charges every month or every year with no end date. It then creates a PayPal subscription for the customer and sends them to PayPal to approve it. You do not create billing plans by hand. After PayPal. The customer comes back to the return URL. MagicPost checks the result, records the order and opens the success page. The customer must come back in the same browser session in which they started the payment. Renewals and cancellation.BILLING.SUBSCRIPTION.RENEWEDandPAYMENT.SALE.COMPLETEDextend the subscriber’s period and renew the credit allowance.BILLING.SUBSCRIPTION.CANCELLED,BILLING.SUBSCRIPTION.EXPIREDandBILLING.SUBSCRIPTION.SUSPENDEDmark the subscription as cancelled.- When a subscriber is cancelled in MagicPost, MagicPost also cancels the PayPal subscription.
Currency
MagicPost sends the plan’s currency code in uppercase and the price with two decimals. Your PayPal account must be able to receive that currency.Test mode
Select Sandbox, enter the sandbox Client ID and Secret, and save. MagicPost then talks to PayPal’s sandbox, where you pay with a sandbox buyer account from the developer dashboard. Switch back to Live before you accept real payments.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.
PayPal could not start the payment. Please try again. / PayPal could not start the subscription. Please try again.
PayPal could not start the payment. Please try again. / PayPal could not start the subscription. Please try again.
storage/logs/laravel.log.We could not prepare this plan for PayPal billing. Please contact support.
We could not prepare this plan for PayPal billing. Please contact support.
Missing PayPal session reference.
Missing PayPal session reference.
PayPal could not capture the payment. / PayPal could not verify the subscription.
PayPal could not capture the payment. / PayPal could not verify the subscription.
Subscription was not activated.
Subscription was not activated.
ACTIVE, APPROVED or APPROVAL_PENDING.PayPal webhook returns 400 invalid signature
PayPal webhook returns 400 invalid signature

