WordPress HowTo

How-to guide for WordPress

  • Home
  • Plugins
  • Themes
  • Contact
    • Privacy Policy
  • About

How to Create a PayPal Subscription Button in WordPress

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.

recurring subscription button created with wp paypal website payments standard wordpress plugin

Table of Contents

  • PayPal Subscription Button Parameters
    • Button
    • a3
    • p3
    • t3
    • Src
    • Srt
  • Subscription with No Recurring Times
  • Subscription with Recurring Times
  • Subscription with Trial
    • a1
    • p1
    • t1
  • Subscription with Free Trial
  • Subscription with Trial 2
    • a2
    • p2
    • t2

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=”subscribe”.

a3

Regular subscription price. This would be a numeric value.

p3

Regular subscription duration between each billing. This would be a numeric value based on t3.

t3

Regular subscription units of duration. Allowable values are:

  • D – for days; allowable range for “p3” is 1 to 90.
  • W – for weeks; allowable range for “p3” is 1 to 52.
  • M – for months; allowable range for “p3” is 1 to 24.
  • Y – for years; allowable range for “p3” 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" a3="2.99" p3="1" t3="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" a3="3.50" p3="2" t3="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" a3="2.99" p3="1" t3="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" a3="3.50" p3="2" t3="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 price (similar to a3 parameter). In order to offer a free trial you can specify 0.

p1

Trial period duration (similar to p3 parameter).

t1

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

Example 1

[wp_paypal button="subscribe" name="My product" a1="1.99" p1="10" t1="D" a3="2.99" p3="1" t3="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" a3="3.49" p3="1" t3="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" a3="2.99" p3="1" t3="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.

Subscription with Trial 2

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

a2

Trial period price (similar to a1 parameter). This parameter can only be specified if you also specify a1.

p2

Trial period duration (similar to p1 parameter).

t2

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

Example 1

[wp_paypal button="subscribe" name="My product" a1="1.99" p1="10" t1="D" a2="2.99" p2="1" t2="W" a3="3.99" p3="1" t3="M" src="1" srt="4"]

It means $1.99 USD for the first 10 days, then $2.99 USD for one week, then $3.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" a2="2.49" p2="1" t2="M" a3="3.49" p3="1" t3="M" src="1"]

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

The subscription button can be customized further using the Variable Subscription extension. It can also be used to accept recurring donation payments.

Check out the PayPal Button Plugin page for more information.

Related

Written by Noor Alam · Categorized: PayPal, wordpress

Comments

  1. Shashi says

    Hello!
    I wish to customize the payments option for WP PAYPAL plugin. I need some help. I wish to have payments button instead of donation. Can someone help me with this?

    Reply
    • Noor Alam says

      @Shashi, The plugin also supports buy now and add to cart type buttons.

      Reply
  2. Murray Thomson says

    Is it possible to have this without the need to click “return to merchant” after payment completion?

    Reply
  3. Dale Ferrario says

    I am having trouble getting my subscription to work. I have made sure that my PayPal business account does not require encryption and does not have a return URL. But it still does not work.

    I have this in testing mode.

    Here is my shortcode.

    [wp_paypal button="subscribe" name="Starter" amount="180.00" recurrence="1" period="M" src="1"]

    I get the message:

    “Things don’t appear to be working at the moment. Please try again later.”

    Interestingly, I tried a different shortcode and got closer.

    [wp_paypal button="subscription" name="Starter" amount="180.00" recurrence="1" period="M" src="1"]

    This gave me a button with the title “undefined”.

    This brought me to the PayPal login. I could see the amount at the top. But I was unable to login to my account (even though I have validated that I can previously). It gives me the following message.

    “Some of your info isn’t correct. Please try again.”

    Help please!

    Thanks,
    Dale

    Reply
    • Noor Alam says

      @Dale, There might be something wrong on the PayPal’s end. I copied and pasted the exact shortcode onto my site. It took me to the PayPal payment page without any error.

      Reply
      • Dale says

        Thank you for responding. I went to PayPal and created the button directly, worked great.

        Reply
  4. Heidi Duncan says

    1) I’ve attempted to assign my own images to the buttons but they are not displaying to replace the default images.

    2) The Buy Now buttons are working fine connecting to PayPal, but I’m having issues with Subscribe buttons. I get the same error message that Dale Ferrario posted on April 4, 2020, “Things don’t appear to be working at the moment. Please try again later.” I’m still in testing mode, but you can view the buttons I’ve created at https://expectingnewlife.com/mentorship-program.

    3) When I attempt to complete a test transaction, the PayPal login page tells me my info isn’t correct, but I’m 100% certain that it is. Could the problem be that I’m trying to make a purchase from myself?

    I am needing to create a total of 12 buttons – 6 buy now and 6 subscriptions – so your help would be appreciated.

    Reply
  5. Ben says

    We need to have customers input text WITH their subscription. Is there anyway to do that?

    Reply
    • Noor Alam says

      @Ben, You mean they will state what they are paying for?

      Reply
      • Ben says

        Basically, yes. They actually need to give us information (their domain name) WITH their subscription purchase.

        Thanks.

        Reply
        • Noor Alam says

          @Ben, There is no way to enter additional information for a subscription. If you leave the item name parameter empty (name=””) it will show a description box on the payment page.

          Reply
  6. Kelly says

    The subscription button isn’t working. I entered this code into a short code block,

    [wp_paypal button="subscribe" name="My product" a3="22.20" p3="1" t3="W" src="1" srt="20" target="_blank"]

    It opens PayPal into a new window with an error that says,
    “Things don’t appear to be working at the moment. Please try again later.”

    I don’t know what to do. 🙁

    Reply
    • Noor Alam says

      @Kelly, Please provide a link to the page in question so I can take a look.

      Reply
  7. Mari Garcia says

    Is there a way to add shipping to a subscription short code?

    Reply
    • Noor Alam says

      @Mari, PayPal only supports shipping for buy now and add to cart buttons.

      Reply
  8. Leif says

    Hello,
    great plugin.

    I have a question about setting up a subscription with recurring times. I’ve set srt=”12″ and would assume that after 12 installments, the payment will NOT recur anymore.

    However, when I place a test order through PayPal, the order text reads, “Subscription Details:$4.70 USD for each month, for 12 installments (Renews until you cancel)”

    This seems to indicate that the subscription will renew automatically, instead of payments stopping after the 12 installments. What have I misunderstood?

    Here is the button short code:
    [wp_paypal button="subscribe" name="Plague Birds 2021 Month To Month Comic Calendar International" a3="5.35" p3="1" t3="M" src="1" srt="12" no_shipping="2" return="http://www.nationalwastecomics.com/thank-you/"]

    Thanks for your help!

    Reply
    • Noor Alam says

      @Leif, Your setup looks correct. I think what PayPal is trying to say is that the payment will continue to recur within this period (12 installments) until cancelled.

      Reply
      • Leif says

        Noor, Thanks for your reply. That’s what I was hoping, but it wasn’t 100% clear. cheers.

        Reply
  9. AndyP says

    Is there a way to define multiple different subscription options in a drop down then have the user select the one they want? We want to be able to have users select from:

    3 months @ $30.00 per month
    6 months @ $27.00 per month
    12 months @ $24.00 per month

    Reply
    • Noor Alam says

      @AndyP, This is not possible at the moment.

      Reply
  10. Christian says

    Is is possible to start the subscription at a future date?

    As of now if I subscribe, the subscription starts on the same day. Can I make it that it starts on the 1st of the following month? Like when I pay on October 11 it starts on November 1?

    Reply
    • Noor Alam says

      @Christian, You can set up a free trial.

      Reply
  11. tuan says

    Hi
    Thank for your great work.
    Can we get any parameters return on success page to let’s us know that it is success payment from paypal ( because user can reload our success page without payment) and we can base on that to record on database the success result.

    Thank you very much

    Reply
  12. Nisha says

    Hi ,

    Great Plugin . I am facing a issue with return parameter , when I use my site link for the return parameter it is shows error , but when use example one which is mentioned in the site it is working . Below is the short code where I am facing the issue.
    [wp_paypal button="subscribe" name="My Product" a1="0" p1="7" t1="D" a3="29.00" p3="1" t3="M" src="1" return="https://www.louveyogastudio.com/payment-confirmation/"]

    Reply
    • Noor Alam says

      @Nisha, Please provide a link to the page where you have the button.

      Reply
      • Nisha says

        @Noor Alam
        This is the Link
        https://www.louveyogastudio.com/paypal-testing/

        first button with return link as my website page link, which is not working .
        second button with default return link , which is working.

        Reply
        • Noor Alam says

          @Nisha, None of them is working for me. I get this error – “Things don’t appear to be working at the moment. Please try again later”.

          Reply
    • tuan says

      Hi Nisha
      Can you get any parameter on return page https://www.louveyogastudio.com/payment-confirmation/ such as transaction_id, mount… and how to get it?

      Thank You

      Reply
  13. Peter says

    How can a payer cancel a recurring payment?

    Reply
    • Noor Alam says

      @Peter, They can cancel from their PayPal account.

      Reply
      • Peter Holden says

        Thank you Noor, but what if they have no PayPal account?

        Reply
        • Noor Alam says

          @Peter, You may need to cancel it for them.

          Reply
          • Peter says

            So how would I do that?

          • Noor Alam says

            @Peter, You can try this method: https://youtu.be/4jHQnwOPud8

  14. Peter says

    Many thanks!

    Reply
« Older Comments

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search WP HowTo

Recent Posts

  • Custom Donations for WordPress PayPal Donate Buttons
  • Gmail SMTP Plugin Cc Configuration
  • How to Add a Reply-To Address in the Gmail SMTP WordPress Plugin
  • What Does a Security Challenge Mean on PayPal?
  • WP PayPal Button Integration with Contact Form 7
  • Can People See Your Address on PayPal?
  • Mailchimp Integration for WP PayPal Plugin
  • How to Show a Text Box at WP PayPal Checkout to Collect Custom Data from Buyers
  • How to Add a Recurring Price Field to a PayPal Subscription Button
  • How to Add a Quantity Field to a PayPal Button

Featured Add-ons

Buy Now Custom Amount for PayPal

Buy Now Discount for PayPal

Contact Form 7 Integration for PayPal

Custom Input for PayPal

Mailchimp Integration for PayPal

Product Variations for PayPal

Variable Quantity for PayPal

Variable Subscription for PayPal

Custom Donations for PayPal

Reply-To for Gmail SMTP

Cc for Gmail SMTP

Disable Right Click on Video.js

Copyright © 2023 · WordPress HowTo

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAcceptRead More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT