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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners