1. Home
  2. Functionality
  3. Creating Installment Plans

Creating Installment Plans

Installment plans (aka “max charges” or “payment plans”) allow you to have subscriptions that end after a specific number of charges. When the last charge is reached for a customer’s subscription, it is canceled and charges stop. No need for you to manually cancel subscriptions in your Stripe dashboard at a specific time for each customer.

Note: Subscription capabilities are included with a Plus or higher license only.

How to Add a Webhook

In order to process installment plans you are required to set up a webhook endpoint in Stripe.

Webhooks allow Stripe to send messages back to your WordPress site. We recommend creating two endpoints: one for test mode and one for live mode.

To add yours, in your Stripe dashboard go to Dashboard > Developer > Webhooks (after toggling test or live mode).

Click Add Endpoint, then add the URL found in Simple Pay Pro > Settings > Stripe Setup tab under Webhooks

We recommend selecting “receive all events” as WP Simple Pay Pro will probably need to use the same webhook endpoint to communicate with your site using features not yet released.

After you add the endpoint you should see the new URL listed in the webhooks settings.

Stripe can optionally sign the webhook events it sends to your endpoints for added security. To do so, retrieve your endpoint’s secret from your Dashboard’s webhooks settings. Select an endpoint for which you want to obtain the secret, then select the Click to reveal button.

Then copy the signing secret from the Stripe Dashboard, and paste it into the Test Endpoint Secret text box in the Simple Pay Pro > Settings > Stripe Setup tab under Webhooks, Test Endpoint Secret

If you’re interested in more details, you can visit Stripe’s doc on using webhooks with subscriptions.

Creating Installment Plans

There are 3 different methods you can use to add max charges to your subscription depending on what type of subscription options you are using.

Single and Custom Amount Subscriptions

You can use the new Max Charges option to set the number of max charges for single subscriptions. This field will also be the value used for any custom amount plans that need to use installments (both single and multi-plan).


Multi-Plan Subscriptions

To set up installments for multi-plan (aka “user selects”) subscriptions you can use the new Max Charges column fields. These will set the max charges for that specific plan so that you can set different levels of installments for different plans.

Plans with a Free Trial

You can also set installments for plans that have a free trial attached to them. The only difference is that the first charge that counts towards the max charge count will be when the first actual charge takes place after the free trial ends.

Recurring Amount Toggle

Back on the On-Page Form Display tab, there is a Max Charges setting in the Recurring Amount Toggle custom field. Here you can set the max number of charges ticks the recurring amount checkbox on the payment form.

Viewing Installment Plans in Stripe

To monitor subscriptions with installment plans enabled, head to Subscriptions in your Stripe dashboard. See Viewing Subscription Details in Stripe if you’re unfamiliar with this section.

Select the subscription that should have installment plans enabled.

In the Metadata section, you should see 2 metadata labels with values related to installment plans. simpay_charge_count is the total number of times the user has been charged already at this point. simpay_charge_max is the total number of charges the installment plan is set to charge for. Once these two numbers are equal, the subscription will automatically be canceled.

Can I modify the max charges for a certain user?

Yes, you can! First, select the specific subscription you want to change. There is a tiny edit button above the metadata box that you can click.

Once in edit mode, you can update the value of any metadata entry. All you need to do is adjust the number to what you need and click Save.

Note of Caution

Changing the Max Charges for a subscription in WP Simple Pay -> Subscription Options will not affect existing subscription max charges – those need to be updated manually using the method mentioned above.

These values are not intended to be altered through your Stripe dashboard on a regular basis. It is something we consider to use more as an edge case and is highly recommended that you do not change these values unless very necessary. Proceed at your own risk.

If you are finding that you need to do this on a regular basis we would be happy to hear your situation and start an official feature request about it as it may be something we never thought of.

Finally, remember you can indicate to your customers how many times they’ll be charged on the payment confirmation page. Just use the {max-charges} template tag. See details at Configuring the Payment Confirmation Display.

Updated on May 12, 2019

Was this article helpful?

Related Articles