How to Create a PayPal Subscription Button in WordPress

Last updated on by admin

In my PayPal Button plugin there are certain shortcode parameters that you can use to create a PayPal subscription button and accept recurring payments from your WordPress site.

PayPal Subscription Button Parameters

Before getting into adding a shortcode lets take a look at the parameters available for a subscription/recurring payment button.

Button

Type of payment button. For a subscription button you need to specify button=”subscription”.

Recurrence

Duration between each billing. This would be a numeric value based on the period.

Period

Subscription units of duration. Allowable values are:

  • D – for days; allowable range for “recurrence” is 1 to 90.
  • W – for weeks; allowable range for “recurrence” is 1 to 52.
  • M – for months; allowable range for “recurrence” is 1 to 24.
  • Y – for years; allowable range for “recurrence” is 1 to 5.

Src

Settings this value to 1 will make a subscription payment to recur. You don’t really have any reason to set this to 0. But if you do so the payment will not recur, which means it will be a one-time payment (like a buy button).

Srt

Number of times a subscription payment will recur. This would be a numeric value with a range of 2 to 52. You don’t need to specify it if you want the subscription to continue until cancelled.

Subscription with No Recurring Times

Example 1

[wp_paypal button="subscribe" name="My product" amount="2.99" recurrence="1" period="M" src="1"]

If your currency is USD, It means $2.99 USD for each month. The subscription will continue to recur until cancelled.

Example 2

[wp_paypal button="subscribe" name="My product" amount="3.50" recurrence="2" period="W" src="1"]

If your currency is USD, It means $3.50 USD for each two weeks. The subscription will continue to recur until cancelled.

Subscription with Recurring Times

Example 1

[wp_paypal button="subscribe" name="My product" amount="2.99" recurrence="1" period="M" src="1" srt="4"]

It means $2.99 USD for each month, for 4 installments. After this the payment will not recur anymore.

Example 2

[wp_paypal button="subscribe" name="My product" amount="3.50" recurrence="2" period="W" src="1" srt="6"]

It means $3.50 USD for each two weeks, for 6 installments. After this the payment will not recur anymore.

Subscription with Trial

You can use some additional parameters to offer a trial with your recurring/subscription payments.

a1

Trial period amount (similar to amount parameter). In order to offer a free trial you can specify 0.

p1

Trial period duration (similar to recurrence parameter).

t1

Trial period units of duration (similar to period parameter).

Example 1

[wp_paypal button="subscribe" name="My product" a1="1.99" p1="10" t1="D" amount="2.99" recurrence="1" period="M" src="1" srt="4"]

It means $1.99 USD for the first 10 days, then $2.99 USD for each month, for 4 installments. After this the payment will not recur anymore.

Example 2

[wp_paypal button="subscribe" name="My product" a1="1.49" p1="1" t1="M" amount="3.49" recurrence="1" period="M" src="1"]

It means $1.49 USD for the first month, then $3.49 USD for each month. The subscription will continue to recur until cancelled.

Subscription with Free Trial

Example 1

[wp_paypal button="subscribe" name="My product" a1="0" p1="1" t1="M" amount="2.99" recurrence="1" period="M" src="1"]

It means free for the first month, then $2.99 USD for each month. The subscription will continue to recur until cancelled.

Check out the PayPal Button Plugin page for more information.

8 thoughts on “How to Create a PayPal Subscription Button in WordPress”

  1. Great plugin!

    2 questions:

    Does this catch the logged in member’s username who paid for subscription? If not, how can that be included?

    Thanks!

    1. @Girl, Unfortunately it doesn’t track any logged in username. However, the email address used to make the purchase should be included in the orders menu.

  2. Thanks.

    An issue with that though is if the member has a different paypal email than the one they used on the site.

    Which database table does it store the payments?

Leave a Reply