Hi there
If we have a SaaS where I allow users to set up a booking page for their business, is there a simple way to allow them to take payments online? I wouldn't need a cut of the proceeds. It would be ideal if the amount could be made dynamic - e.g. I could generate a button that paid a certain amount.
Most useful would be a way for my site to be notified when a payment was successfully completed. In the old days there was a PayPal IPN but IIRC that pinged whenever that user bought anything and was a royal PITA for them to set up.
What do other people on here use? Would be v grateful for any pointers.
I'd go with Stripe too, but if you want to use PayPal, their smart payment buttons are good and easy to implement: https://developer.paypal.com/docs/checkout/
I believe paypal won't notify your server via webhook. But you have to specify a custom success callback, so you use this to ping your backend.
Thanks for this. I had just seen the custom paypal button on this page:
https://www.dummies.com/business/online-business/ebay/how-to-create-a-paypal-button-on-your-website/
and yes I think that would work. I noticed it seems possible to be able to add a IPN url as well with the 'Advanced Features' page e.g.
The button can then be made into a URL with all of these as GET parameters. I'll test it out when I get a chance and see what info is sent to that IPN link. Looks promising though :)
Thanks to all for your replies!
Tried it and it works. In case it helps anyone here:
Perhaps a little overkill but thought example (obfuscated in places) POST data might be useful:
{'mc_gross': ['0.01'],
'protection_eligibility': ['Ineligible'],
'payer_id': ['XXXXXXXXXXXX'],
'payment_date': ['16:27:20 Feb 06, 2020 PST'],
'payment_status': ['Completed'],
'charset': ['windows-1252'],
'first_name': ['Joe'], 'mc_fee': ['0.01'],
'notify_version': ['3.9'],
'custom': [''], 'payer_status': ['verified'],
'business': ['[email protected]'],
'quantity': ['1'],
'verify_sign': ['xxxxxxxxxxxxxxxxxxxxxxxxxxx'],
'payer_email': ['[email protected]'],
'txn_id': ['7Xxxxxxxxxxxxx3R'],
'payment_type': ['instant'],
'last_name': ['Bloggs'],
'receiver_email': ['[email protected]'],
'payment_fee': [''],
'shipping_discount': ['0.00'],
'receiver_id': ['XXXXXXXXXXXXXX'],
'insurance_amount': ['0.00'],
'txn_type': ['web_accept'],
'item_name': ['Item name goes here'],
'discount': ['0.00'],
'mc_currency': ['GBP'],
'item_number': ['ITEM ID ON YOUR SITE'],
'residence_country': ['GB'],
'shipping_method': ['Default'],
'transaction_subject': [''],
'payment_gross': [''],
'ipn_track_id': ['xxxxxxxxxxxxxxx']}
Hopefully the bank won't stop my credit card because of all the suspicious £0.01 transactions I've been making tonight :D
This will get me moving forward. Very pleased.
This comment was deleted 4 years ago.
I'd go with Stripe for this. You can dynamically create one-time/recurring payments and you can also get notified via Events if e.g. a charge went through. Stripe is very developer friendly and has a few libraries for all major languages.
https://stripe.com/docs/api
https://stripe.com/docs/api/charges
https://stripe.com/docs/api/events
Thanks, I've heard good things about Stripe :)