How do I add a custom textfield to the payment page?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I want to sell products on my page. When people go to checkout, I want them to be able to add a "referrer" or a salesperson that sold it to them basically. How do I do this? I read about os1 and os2 but got really confused. I want this to be stored in the payment info.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes for this purpose you could use the on0 and os0 fields. These variables are the option field name/label and the Option selection of the buyer for the first option field. Both parameters needs to be added to the paypal button code you've already integrated. I your case you could name the option "referrer" and then give your customers a textfield where the can input a value. Here is an example Code of what you need to add to your Button:
<table> <tr> <td> <input type="hidden" name="on0" value="Referrer">Referrer: </td> </tr> <tr> <td> <input type="text" name="os0" value=""> </td> </tr> </table>
In an complete Button it would look like this:
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="here your email address"> <input type="hidden" name="currency_code" value="EUR"> <input type="hidden" name="amount" value="1.00"> <input type="hidden" name="item_name" value="Test Artikel"> <input type="hidden" name="item_number" value="111111111"> <table> <tr> <td> <input type="hidden" name="on0" value="Referrer">Referrer: </td> </tr> <tr> <td> <input type="text" name="os0" value=""> </td> </tr> </table> <input type="hidden" name="notify_url " value="http://www.mystore.com/ipn.php"> <input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form>
Here you can see all variables you can use with our Button, just in case you need more information:
Hope this helps,
Regards,
Volker

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Can a button be configured to allow the customer to enter the payment amount? in Merchant services (Archive)
- Recording Custom Values During Payment in Merchant services (Archive)
- custom amount on buy now button in Merchant services (Archive)
- My customer received two notification emails for her installment payments in Merchant services (Archive)
- help customer with failed subscription payment in Merchant services (Archive)