A few people have asked me how I’ve setup PayPal on my site so I thought I’d post the info here. This is for single item purchases transacting on the PayPal website, I haven’t tried the PayPal shopping basket features.
To pay using PayPal you can just send the product information using a simple HTML link, you can replace all the values with dynamic variables (use the “go to page” workflow in Bubble), here’s an example
You can of course send more information to PayPal such as shipping info and return page URL’s, all the variables are listed here
If you don’t need to get a confirmation back from PayPal then that’s all you need to do, but if you do want payment confirmation and buyer information back in to Bubble then carry on.
Essentially what we’re doing is sending sales info to PayPal, Payment confirmation from PayPal to Zapier and then Zapier back into Bubble. You’ll need a Zapier Basic account which is $20, then just make a new Zap, there’s a built in Successful Sale Zap ready to go.
Trigger
Zapier will give you an IPN URL which you’ll need to put into the Selling Tools section of PayPal.
Zapier will ask you test this step to make sure it works
Action
Where it says choose Action App select Webhooks by Zapier
Under Action select POST
Next setup the Webhook.
The URL field needs to match an API Endpoint you’ll soon setup in Bubble
The Authorization code is the API token generated from the API tab in Bubble settings (setup a new token called Zapier to Bubble)
You can choose what data you want back from PayPal, Zapier will give you a list of all possible PayPal fields
Finally before you test this in Zapier create the API Endpoint in Bubble (you’ll need to be in the API Workflows page). For Key use the same names as you did in Zapier.
You can then access all this info from the Bubble actions as well save the payment confirmation and payer name and address to Bubble and send out an email confirmation if required.
Hope this helps!