In this guide, you’ll learn how to implement Paystack Subscription with PHP. A subscription allows a customer to pay a certain (mostly fixed) amount of money on a regular interval.
To do this, you will have to send a request to the Create Plan endpoint: The URL (endpoint) above requires we send some $_POST data alongside.
An important thing you shouldn’t miss, when you create a subscription Plan under TEST mode on your dashboard or with TEST SECRET KEY and you go live, you won’t have access to that plan and Vice Versa.
When you run the code above and a plan is created, the response — a JSON contains a plan code that will be used to create a subscription for customers: As you can see above, when a plan is created, the response contains a plan code, and this is what you will use to create a subscription as you will see later.