Using PayPal For Event Registration Forms

Sometimes churches and organizations need to use a sign up form for an upcoming event, but aren’t exactly sure how to integrate PayPal with their favorite WordPress form plugin so they can take payments along with registrations. I’m a huge fan of Gravity Forms, but there is no built in support for PayPal as of yet, so here’s how I use it along with PayPal for event registrations. If you have another favorite form plugin, please feel free use it instead.

First we need to set up our button with PayPal. You can do this by going to your PayPal account and selecting merchant services as in the picture above or you can use the code below as a template for your button. This code is set to work around your PayPal email address which can have its advantages if you are unable to use the protected version for some reason or another. I’m including this code in a fund-raising section of a new theme I’m developing for non-profits called Agency.

[html]

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

<input name="cmd" type="hidden" value="_xclick" />
<input name="business" type="hidden" value="me@myemail.com" />
<input name="return" type="hidden" value="n=http://www.yoursite.com/registration-paid" />
<input name="item_name" type="hidden" value="Registration Fee" />
<input name="amount" type="hidden" value="20" />

<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=me@myemail.com&amp;currency_code=USD&amp;amount=20&amp;return=http://www.yoursite.com/registration-paid&amp;item_name=Registration+Fee" target="paypal">Pay and register here.</a>

</form>

[/html]

Here’s a quick run down of what to change in the code. In the second input line, use your email address that is registered with PayPal. The third input line has a very important field, the return URL after someone has completed payment. This is where we will place our registration form. The Fourth input has the name of the item that will be displayed at PayPal.com when someone is paying. The last one is the amount that they will be charged. The last bit of the form is a link that also contains copies of these elements that we’re sending to PayPal.

Once you have your button created, then you will need to insert it into the page or post where you want people to start the registration process. Since all they will see is a text link, you can place this just about anywhere. You could easily include it into a text widget so it could be on every page or post in your site with minimal effort.

Now that your payment link is set, you need to create the page or post where the registration form will go. First we create a new form in Gravity Forms using their visual editor to quickly add the fields we need like name, address, phone number, email address plus anything we need for the registration like a spot for special requests or comments. Once we have the form set up, we go to the page or post where we’d like to use this form and insert it there. Once thing we will want to take care of is to make the URL is not easily guessed. We don’t want people accessing this page or post without first going through PayPal. You can change the “slug” or the end of the URL by clicking just below the title of any WordPress page or post and entering pretty much anything you want. You can shoot for a series of letters and numbers to make it difficult to randomly guess. Just make sure you place this URL into your purchase button and you’ll be set.

So now we have a purchase link that when clicked, takes someone registering to PayPal to pay for the event, and upon successfully paying, they are returned to our registration form where we can collect their information. It’s that easy. I would suggest checking the registrations against the collected payments just to make sure no one slipped through without paying, but you should be pretty secure.

If you’ve found any helpful methods to use your contact form, share them with us in the comments.

63 Comments

Peter Altuch January 11, 2018

Is it possible to integrate PayPal’s “credit” option into Constant Contact’s payment elections. It obviously does support the regular Paypal account options but my clients often don’t have credit cards and would welcome the opportunity to use PayPal’s credit option.

Reply

Claudia Pharis February 8, 2017

WOW!!! This is an amazing site! You, Bill, are an incredibly generous person! I’m not nearly computer literate enough to make use of what you offer here, but I have learned so much by simply scanning the site. I have a PayPal account and want to use it to enable people to pay for their tickets to a party we are planning for my friend’s 70th birthday party. when I come away from this site I will at least know what questions to ask! Thank you!!

Reply

Ashley December 13, 2015

Hi,

Hoping you can help. I am trying to add a registration form to my site that cannot be submitted without a payment. On Godaddy they do not have anything like that, I have tried googling things but all require a payment. I have a paypal account linked to my site but am coming across individuals who instead of typing a valid confirmation number they are just typing in “credit card” when in fact they have not paid. This is something that I am trying to avoid. Any help is appreciated

Reply

    Bill Robbins December 14, 2015

    Hi Ashley,

    All the solutions I know of there are paid. Generally speaking if a web technology allows you to take in money then the developer will typically charge you for it. If you’re using a free form plugin, then any extension that integrates with PayPal, Stripe or something else will virtually always have a charge associated with it.

    A way around that is to make them pay before they see the form to register. Have PayPal redirect them to the form once they have finished payment. You can do that for free.

    Take care,
    Bill

    Reply

Naren October 11, 2015

Thanks Bill. This us quiet useful info. So this woocommerce or other forms use our bank for financial transactions or they have their own window or go with PayPal?

Reply

    Bill Robbins October 12, 2015

    They can. They are set up to work with different payment gateways. It’s possible your bank has one or can recommend one that works with them.

    Reply

Naren October 9, 2015

Hi Bill, I see the most satisfying answers here .so hope you have answer for me too.
We are international organisation and we organise international conference every year. This time I have added PayPal buttons on registration pages. I didn’t have gravity form or any other plugins , I didn’t have even the pro or PayPal solutions. We will have around 500 registrations with average 300 Euros fee per person.is it better by PayPal than a bank payment on website considering the fees taken by PayPal?
is it technically sufficient or I need to pay for pro or other plugins?

Reply

    Bill Robbins October 9, 2015

    Hi Naren,

    Great question there. Since you’re looking at taking in a fairly large sum of money, I would suggest using an actual e-commerce system (WooCommerce or Easy Digital Downloads for WordPress or Shopify for example) and using your bank along with that.

    There have been instances in the past where PayPal users who don’t normally take in large sums of money suddenly do. PayPal has on occasion held the money to make sure it was covered in case people filled chargebacks. Since it’s not a bank it doesn’t fall under the same regulations as most banks. That caused at a least a few conferences to fail due to funds not getting through.

    PayPal is normally great, but a sudden increase in volume like that may cause them to hold on to some of the money. That’s why I would go with your bank plus a more traditional e-commerce package.

    Bill

    Reply

Reggie Bitas June 3, 2015

would help me on what to do to integrate the paypal payment service in the proposed project in fulfillment of my course as part of our thesis..reply asap i do really need the codes using php

Reply

    Bill Robbins June 3, 2015

    You can generate purchase buttons inside your PayPal account. You can then add them to your page. That would be the easiest option. If you need more than that, I would use a shopping cart like WooCommerce.

    Reply

David Offutt May 13, 2015

Mr. Robbins. I’m setting this up for the Continuing Education for Realtors in my area to drive referrals to my insurance agency.

I tested the following code and my credit union declined my $1.00 test payment. they said it appeared as a ‘ specialty retail store’ transaction.

Do you think the $1.00 small transaction was really the issue, or how I originally set up my paypal account?

Second my code did not take me back to the landing website after I payed my $1.00..

Thoughts?

Pay and register here.

Reply

    Bill Robbins May 13, 2015

    David,

    It’s a bit unusual that your credit union would decline a transaction that PayPal sends through. I would ask PayPal about that as they could best advise you on any changes that you need to make to your account.

    Also I would not set up what you’re trying to do with a form like this. I would use an actual e-commerce solution like WooCommerce. This is a really old post now and was written before there were any reliable e-commerce options for WordPress. If I was setting this up, I would go with WooCommerce. It’ll be much smoother for you and your customers.

    Bill

    Reply

Tammy March 31, 2015

I am trying to create a registration form where our participants will be able to register and pay for the event from our site. I am using Wix and I have yet to find an app from their App Market that will allow me to do this. Last year at our event, we used a Paypal card reader to accept payments so we already have an account set up. However, we don’t want our participants to have to sign up for a Paypal account just to pay for the event. Any suggestions?

Reply

    Bill Robbins March 31, 2015

    Most of the time when users are directed to PayPal, they have the option to pay with their PayPal account or to pay with a credit card without logging in. It’s not the option that’s most prominent on the page because PayPal wants more users, but typically that can be done.

    Sites like Wix are really made for very basic functionality. It sounds like you’ve grown beyond that. I would switch to WordPress so you can do whatever you need to. You could use the WooCommerce plugin along with an extension for selling tickets that’s made for The Events Calendar. That way you could sell tickets directly on your site. That’s what I would do.

    Reply

Sandeep February 5, 2015

Thanks for the quick response.

Ninja form also asked for $50 if I want to integrate PayPal on its form.
I think its better if I go with Gravity Form and use your code.
Let me see how it goes.

Thanks,
Sandeep

Reply

    Bill Robbins February 5, 2015

    You can actually go about this using the method I’ve described without paying for the PayPal extension for Ninja Forms or GravityForms. The advantage of using the extension is it’s easier and a bit cleaner. But this will work using just about any contact form out there. The trick is you have to have the form on a page that the URL won’t be guessed by anyone. The only way to get to it is being redirected from PayPal after a successful transaction.

    Reply

Sandeep Dhungel February 5, 2015

Hi Bill,

We are a NGO, providing medical support to developing countries like Nepal.
We already have a donate button linked with Paypal in our website.
We are having a conference in May 2015 and I would like to have a page where our members can register online for that conference. What shall I do to achieve that?
1. Install a plugin called : Gravity Forms which cost $39/year, right?
http://www.gravityforms.com/purchase-gravity-forms/
Isn’t there any free plugins like this?
2. and then I integrate your code in that form, right?

And after I do these two steps I will have two pages Donate page (already present) and registration page (new page) acting two separate entity pointing to my same paypal account.

Thanks,
Sandeep

Reply

    Bill Robbins February 5, 2015

    Hello Sandeep,

    Good questions. The basic idea here should work with just about any form out there. You could one of the free form plugins like Visual Form Builder or Ninja Forms. I would imagine that would be fine.

    You’ll have two pages, one where the payment is taken and the second one where the form is filled out after payment is complete.

    Take care,
    Bill

    Reply

Rhonda December 30, 2014

Hi Bill. I am using asp.net for my website, but need to use the Paypal payment and then the registration form. The information you provided was very helpful. Thanks for that! You mentioned making the url something not easily guessed. Would you suggest creating a page like “pay2*3e92&%fee@483%#@*.aspx” for this? That way it cannot be easily guessed. I just wanted to make sure I understood.

Thanks!

Rhonda

Reply

    Bill Robbins December 31, 2014

    Good Morning Rhonda,

    You’ve got it. As long as it’s difficult to be guessed, isn’t indexed by search engines or available with some type of site search you should be good to go with a URL like that one.

    Happy New Year,
    Bill

    Reply

Bryan Nyman August 31, 2014

Bill,

This may be a bigger question than you care to answer – but I figured it can’t hurt to ask. If you visit the website above, you will see I have a dog obedience school. I want to add on-line registration with the option to pay with Pay-Pal. How do I do this ? (PS – I am not the webpage designer, but I have designed websites in the past so I know alittle about “code” etc.)

Reply

Jaime January 30, 2014

Hi Bill,
So I run athletic tournaments and leagues and have my gravity registration form setup so once they complete it and click submit it automatically takes them to my PayPal page to pay the entry fee. For months I had no issues. All of sudden when the submit button is clicked nothing happens and as you could guess this is a BIG issue if they can’t pay for the event. Any suggestions? Check out my website and click on Registration tab at the top.

Reply

    Bill Robbins January 30, 2014

    That is a big issue. I tried working through the registration form and one thing that I did notice in the process was that the date selector did not pop-up when I clicked on it. That could indicate a javascript conflict on the site. If the form uses AJAX to handle the submission of it, a javascript error could keep that from happening.

    Here’s what I would try first. Deactivate all of your plugins except for Gravity Forms and try it then. If it works, then you’ll the conflict is between Gravity Forms and another plugin. If it doesn’t work, then try switching to the TwentyTwelve or another of the default WordPress themes and see if it does then. If it does work at that point, then the conflict is likely between Gravity Forms and the theme.

    Since it once worked and no longer does, I’m inclined to think it’s related to a plugin or the theme. As WordPress and themes/plugins update, sometimes things that once worked, no longer do.

    Hope that points you in the right direction.

    Reply

Ammy Rao January 17, 2014

Dear Bill,
i want to know whether i can make a form with both form submission and paypal payment page happening with the same button?

Reply

    Bill Robbins January 17, 2014

    The easiest way would be to use the PayPal add-on for Gravity Forms. It’ll send people directly to PayPal to pay or if you have a business account, you can take the payment directly in Gravity Forms without sending visitors to PayPal.

    Reply

Jason Neri December 7, 2013

What happens when your not on the WordPress bandwagon and cant justify eating up almost a 100mb of space for a simple business page? Why are there no free standing options?

Reply

    Bill Robbins December 7, 2013

    You could always do that with a WuFoo or a similar form solution. Or you could add in a simple php form and go that route.

    Reply

Uchenna August 9, 2013

Thank you so much for such a streamlined idea. I’ve being thinking of doing something like that, but I wasn’t sure how to go about it.

I have a question, though. Would you recommend this system for what I’m doing or something like a WordPress plugin? Just looking for your honest opinion. I’m making a site for an organization that has different membership types. So I was thinking of placing the Paypal link, just as you said, then link them back to the site where they fill out their information in the form.

This wouldn’t be a one time thing. I don’t know how often people would pay to become a member, but it would be necessary for a long period of time (maybe a year). Would you recommend this system or something like a dedicated WordPress ecommerce plugin?

Thank you!

Reply

    Bill Robbins August 10, 2013

    Always glad to help. For a membership site, I would probably go with a plugin that handles the collection of the money, user registration and content control. That would give you the best experience. You might try the Restrict Content plugin. It will do those tasks for you and there’s a pro version if you find you’d like more features in the future. Have fun.

    Reply

Hermes June 8, 2013

Nice tutorial BILL.
This is basic though, anyone in need for a more advanced form
using IPN should check out this script:
http://codecanyon.net/item/paypal-payment-form-with-admin-panel/2893385?ref=borni

Reply

Celeste May 26, 2013

Ok my friend n I are putting together a 5k color run in our town and we were gonna go to all three towns and do registrations for the run but we are findong that we have a lot of people coming from outside those 3 communities and dont know how we can get them all to register. Is there any way we can create some kind of paypal where they can register more than one person and choose their shirt and have a printable copy to prove their registration? We are not in any way computer smart :-/

Reply

    Bill Robbins May 27, 2013

    Good question Celeste. If I was setting that up, I would probably choose an e-commerce plugin like Woocommerce to run that. It could handle all the options your trying to have and is pretty easy to set up too. Creating all of those variables inside of PayPal wouldn’t be very straightforward.

    Reply

Pieter May 18, 2013

hi, thanks loads for this! been trying to get a form and paypal button on a simple blogger.com page for a one-timer. the form is on 123contactform so paypal support is not free…everything is working except for the forwarding after payment. It says at the paypal site it has succesfully paid and then i get two links (blue, underlined etc.):
go back to *site i put in the html code* or
go to *my user account at paypal*

i’d like it to forward automatically after payment. here’s the code: http://pastebin.com/GxAnygz9

please advise…

p.s. it’s for a french school reunion… 😉

Reply

Nick May 8, 2013

Dear Bill,

Thanks a lot for the post, you are really helpful!

I have just started using wordpress, so excuse my basic questions below.

I can embed the PayPal payment page in between text?

The reason why I am asking is that I have copied the code (after modifying it for my specific case) into the widgets “Text”. The link to my PayPal payment page appears at the bottom of the page. Instead, I would like to have this link in the middle of the page in between text. I have tried to insert the PayPal page as a “link”, but I realised that after a while the PayPal page logout automatically (timeout).

Many thanks

Nick

Reply

    Bill Robbins May 9, 2013

    Great question. You could insert the form in the middle of a page or post. What you’ll want to do is switch from WordPress’ visual editor to the “text” one by clicking the tab in the top right corner. Then find the spot where you’d like to have the link and insert it there.

    You can then add more content below that spot. Publish/update your page and you should be good to go. If you run into trouble, let me know.

    Reply

      Nick May 11, 2013

      Fantastic! All works.

      My final question is related to page openings.
      I would like to have the following:

      – the costumer clicks on the paypal button on my web page
      – my web page closes and paypal payment page opens
      – when transaction is completed, the only way to go back to my website is to click on the link in paypal page payment confirmatio “return to my website”.

      Many thanks

      N

      Reply

        Bill Robbins May 11, 2013

        You might be best served to use a shopping cart plugin like Woocommerce to have it work work that way. That’s how they handle PayPal transactions by default.

        Reply

amanda January 31, 2013

https://gist.github.com/4687112

Reply

    Bill Robbins January 31, 2013

    Amanda, try this instead:

    There is a second spot for your email address in the line that begins <a

    Reply

      amanda January 31, 2013

      Bill, you are amazing! Thank you so much. I’m so happy that this thread is still alive and you responded so quickly. I can’t wait to get this up and running!!

      Reply

amanda January 31, 2013

When I try to embed the code into my Weebly site, with the appropriate changes, it still reads my e-mail address as the generic one supplied here. How can I get it to accurately read my e-mail address associated with PayPal?

Reply

    Bill Robbins January 31, 2013

    Amanda, great question. If you’ll look near the bottom of that snippet in the long line, you’ll find this as part of the code:

    me@myemail.com

    Just replace that with your PayPal email address and that should cause the form to go to your address instead of the fill-in one.

    Reply

      amanda January 31, 2013

      Thank you for the quick reply. I did put my email address in there but it acts like I didn’t. I even tried another PayPal account email address and it still acted like nothing changed. What do you think?

      Reply

        Bill Robbins January 31, 2013

        Any chance you could post your code at gist.github.com and the paste a link to it back here so I can take a closer look for you?

        Reply

Sergey April 30, 2012

Is there a possibility to modify this form so people will be able to pay with a credit or debit card on paypal.com website if they don’t have a paypal acount?

Reply

Bill Robbins April 30, 2012

Great question Sergey. PayPal automatically has credit card payment as an option for people when they are making a payment at paypal.com. They take care of collecting the payment details so you don’t have to worry about the financial security of your site like you would if you collected the credit card information yourself.

If you want to accept payments directly on your site, Gravity Forms now has a PayPal Pro add-on that will let you accept credit card payments without sending your visitors to a third party. You’ll need a developer license for Gravity and a SSL certificate to ensure that the transactions are secure. It’s a nice option to create a streamlined experience for your visitors.

Reply

Bill Robbins January 15, 2011

Since you’ll be selling more than one item, I’d suggest switching to a self-hosted WordPress and using a dedicated e-commerce plugin. That would give you and your visitors the best experience.

Reply

Sarah January 9, 2011

I don’t think this will work for what I need after all. I will have people purchasing more than one item. Anyway to have the paypal button at the bottom of the form? Here is a copy of the form I am working on.
http://childishfundraising.wordpress.com/whats-a-childish/customize-your-dish/

Reply

Sarah January 5, 2011

I have been out smarted! The form after purchase works beautifully, thanks for the idea. But, I am in wordpress.com and cannot add a paypal button. Off to do more research…

Reply

    Bill Robbins January 5, 2011

    Sorry Sarah. You might want to try a self-hosted WordPress site. They really are quite easy and you can do pretty much whatever you’d like to with them. Take care.

    Reply

Sarah January 5, 2011

Brilliant! This solves a problem for me. I have been trying to figure out how to sell items on my word press site, I only have three different products but each is highly customizable. I can sell my basic product the. Once they pay they will then be take to a form with all the options laid out. If this works i might be able to solve another issue I have…. I will post a link to my site once I figure this out. I am a graphic designer not a programer so this may take a while. Thanks!

Reply

Mike Hickerson August 26, 2010

Thanks for this code, Bill! I’ve been using Jotforms for their PayPal integration, but I’m getting tired of the $10/month subscription. I knew there had to be a way to go directly from a form to PayPal, but I hadn’t had time to figure it out yet.

Reply

Seth Shoultes July 26, 2010

Why not just use the Advanced Events Registration plugin for WordPress.

http://wordpress.org/extend/plugins/advanced-events-registration/

Its an all in one solution for event registration and management with support for PayPal and Authorize.net.

Reply

    Bill Robbins July 26, 2010

    You absolutely can use an events registration plugin for this. If you will be hosting many events that’s the way to go for sure. However if you only have paid events occasionally, this is a good way to accept payments without having to add another plugin. Plus this method will work for other scenarios where you need to accept payment and have a form filled out. I recently helped a literary blog accept payments for a short story contest they were running using Gravity Forms. Good comment Seth and good luck with your plugin. Some of my clients do lots of events, so I’ll be sure to check it out.

    Reply

Submit Your Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get all of our 25 themes (along with future themes) and lifetime updates for only 125 USD.Find out more
+