'Pass custom field in PayPal email subscription link

I need to pass a custom variable in a PayPal subscription email link. It has to be an email link. I have tried this PayPal Custom Variable in Email Link but it does not seem to work, and have been unable to find another way to make it work.

Does anyone know how I can do this?

What I want to do is send, for example, Account = {account name}.

Any help greatly appreciated.

There is no code as such, just the following PayPal link:

https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1234567890ABCD

I have tried

https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=1234567890ABCD&custom={account name}

But it doesn't work.



Solution 1:[1]

My apologies, the answer in the other post quoted DID work, thank you for your replies.

Quote:

Yes, parameters in the email links work just the same as forms. Just add "&custom=whatever_data_you_need" to your email link and that data will be included with the PayPal payment.

Solution 2:[2]

I would try adding an advanced variable to the button BEFORE you save it and get the code. You can add advanced variables in step 3 of the button creation process. Here is some documentation:

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/buynow_buttons/#id08A1HE00C2L

Here is the variable reference:

https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

Once the button is created with the advanced variable(s) you can still capture the email link.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 omega1
Solution 2 Ind_KevinG