I need a URL for a paypal donation with the purpose field pre-populated

I need a URL for a paypal donation with the purpose field pre-populated.

I want to have a URL for paypal DONATIONS that can have default text for the "purpose" field in the URL so that when the user clicks on it and is presented with the donation page, that field will be pre-populated with my designated text.

How can I do this?  What would that URL look like?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Big MontyWeb Ninja at largeCommented:
I assume you're POSTing data, correct? Below is a list of the fields that can be passed


You can try adding the purpose field in that code as well, just add the html equivalent name to the list of hidden fields
cashonlyAuthor Commented:
Don't know about POSTing, I'm just creating a link that can be on a facebook post that someone can click on.

How EXACTLY is the field passed in?
Big MontyWeb Ninja at largeCommented:
I assumed you were creating a form and sending the data the way...

I was able to find the lit of variables (see link below) that can be used. Do a Ctrl-F on the page and search for "service" and that may give you direction.


can you give an example of the link (take out the domain name) you have so far?
Learn Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

cashonlyAuthor Commented:
This is what I use now:
(feel free to donate if you like hahahaha!)

It takes the user to the donation page, but I would like to somehow pass in some text that will populate the "Purpose" field.

Any ideas?
Big MontyWeb Ninja at largeCommented:
if you look at the html source, the purpose field is called "item_name", so maybe something like this:


actually, I just tried it and it worked, as long as you don't want the field to be editable...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cashonlyAuthor Commented:
Hmmmm... that is good, but I think I need it to be editable, unless I can figure out how to put another field on that donation page where they can enter free form text.
Big MontyWeb Ninja at largeCommented:
I don't think you can make it editable, you're better off going into PayPal and adding an option free text field
cashonlyAuthor Commented:

I tired adding an option field by putting this in the advanced items box:

Then, I added this to the end of that URL:  &Photonum=1234

And while the word "Photonum:" showed up, the 1234 didn't show up anywhere.

If I put the following in the advanced items box:

Then the 1234 did show up after the word Photonum

I need a way to pass something in so I can see it when I look at the donation.  Any ideas?
Big MontyWeb Ninja at largeCommented:
I don't see any other field on the form, did you take it out?

this seems to be getting away from the original purpose of this question, which is to pre-populate the PURPOSE field, which we did. I'm not extremely familiar with building paypal forms, you may want to close this question down and ask a fresh one so that it gets some new eyes on it, or we can continue to try to piecemeal a solution for you, I'm fine either way.
cashonlyAuthor Commented:
Good point.  I'll do that.  You've been a big help.
cashonlyAuthor Commented:
You've been very helpful, thank you!
Big MontyWeb Ninja at largeCommented:
my pleasure! happy programming!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.