Category: PHP

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.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners