Updating Subscription Payment Method - WP Simple Pay Documentation
  1. Home
  2. Functionality
  3. General
  4. Updating Subscription Payment Method
  1. Home
  2. Functionality
  3. Updating Subscription Payment Method

Updating Subscription Payment Method

In order to allow customers to update their subscription payment details, you must set up a webhook endpoint in Stripe.

Only Subscriptions created with WP Simple Pay 3.7.0 or later will automatically receive email reminders. See how to allow reminders for previously created Subscriptions.

You can configure whether you’d like to email your subscribers a reminder to keep their payment information up to date before a subscription renews.

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

The Upcoming Invoice event is determined by the setting in Stripe’s “Subscription and emails” settings and should be configured as indicated below. There is no further configuration needed:

NOTE: While you can choose the number of days to send an upcoming invoice event, the Customer Emails settings do not work with WP Simple Pay and must remain disabled.

The email that your customers will receive will be formatted like this:

This is a friendly reminder that your {account_name} subscription will automatically renew on {renewal_date}

Your payment method on file will be charged at that time. If your billing information has changed, you can update your payment details below:

{update_url}

NOTE: At this time the email content cannot be modified. 

When the subscriber clicks the {update_url} URL they will be directed to their original payment confirmation page with a form below to update their payment method:Entering a new card number here will ensure all upcoming invoices charge the new card.

Allowing Reminders for Subscriptions Created Prior to Version 3.7.0

Subscriptions that were purchased prior to WP Simple Pay 3.7.0, or created manually in Stripe, will not receive Upcoming Invoice email reminders. These Subscriptions will not contain the necessary identifying information WP Simple Pay uses to determine the validity of a Subscription.

In order to send emails for these Subscriptions the Subscription must contain the following pieces of Metadata:

  • simpay_form_id
  • simpay_subscription_key

When viewing the Subscription in the Stripe dashboard, click “Edit” in the “Metadata” section:

Add the aforementioned pieces of metadata. simpay_form_id should match the ID of the payment form the Subscription originated from. simpay_subscription_key can be any arbitrary unique string. simpay_subscription_key is used by WP Simple Pay to create a URL to the Payment Confirmation page containing the Update Payment Method form.

Updating a Payment Method Prior to Upcoming Invoice

If you need to manually send a customer to the “Update Payment Method” page before the automatic email reminder is sent you can manually construct URL to send.

You need four pieces of information:

  • The URL to your payment confirmation page.
  • The simpay_form_id metadata value.
  • The simpay_subscription_key metadata value.
  • The Subscription Customer’s ID.

Replace the values in the following URL to create a permalink to the Update Payment Method page:

https://example.com/payment-confirmation?form_id=SIMPAY_FORM_ID&customer_id=CUSTOMER_ID&subscription_key=SIMPAY_SUBSCRIPTION_KEY

Disabling WP Simple Pay’s Email Reminders

If you need to disable WP Simple Pay’s invoice email reminder add the following custom code snippet to your website: “remove-update-payment-method-email.php

Alternatively, if you have limited your incoming webhooks you can disable the invoice.upcoming webhook.

Updated on August 25, 2020

Was this article helpful?

Related Articles