less than a minute read • Updated 2 hours ago
Set up a subscription with a fixed number of payments
How to use sub_enddate to limit a subscription to a set number of payments, such as a payment plan or installment offer.
To limit a subscription to a set number of payments, use the sub_enddate parameter to set a date after the last payment should be taken. Once the end date is reached, the subscription will stop processing.
A common use case is a payment plan — for example, a $200 product offered as 4 payments of $50 over the course of a year.
How to set it up
Add both sub_frequency and sub_enddate to your add-to-cart link or form. For example, for 4 payments of $50 billed every 3 months:
&sub_frequency=3m&sub_enddate=13m
This creates a subscription that bills every 3 months and ends 13 months from today — ensuring exactly 4 payments are taken (at months 0, 3, 6, and 9) before the subscription ends.
Why one month after the last payment?
The sub_enddate must be set to the day after the last payment date. If the end date falls on the same day a payment is scheduled, the subscription will be cancelled before that payment is taken.
In the example above, the 4th payment processes at month 9. Setting sub_enddate=10m would cancel the subscription before that final payment. Setting it to 13m safely allows all 4 payments to process.
Accepted values for sub_enddate
Format | Example | Description |
|---|---|---|
|
| A specific date |
|
| N days from today |
|
| N weeks from today |
|
| N months from today |
|
| N years from today |
Notes
sub_enddateis calculated from today’s date, not the subscription start date. If your subscription starts in the future usingsub_startdate, adjust the end date value accordingly.Omitting
sub_enddatewill make the subscription run indefinitely.To remove an end date from an existing subscription, pass
sub_enddate=00000000when replacing the subscription viasub_modify=replace.