PayPal or other commerce integration

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Aduro91
Posts: 36
Joined: Sat Jul 22, 2023 8:49 pm

PayPal or other commerce integration

Post by Aduro91 » Tue Feb 27, 2024 1:03 am

Hi all

Ideally I'd like to integrate my app with PayPal but specifically so that people can tip eachother while I take a 20% fee.

So I need my app to set up two payments to be sent simultaneously and accordingly.

Cheers

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: PayPal or other commerce integration

Post by stam » Tue Feb 27, 2024 1:35 am

Interesting question - can you pose a single payment request to the user while actually taking two payments? (genuinely no idea if this is possible and actually curious...)

Aduro91
Posts: 36
Joined: Sat Jul 22, 2023 8:49 pm

Re: PayPal or other commerce integration

Post by Aduro91 » Tue Feb 27, 2024 1:40 am

Some of this may be out of date now but this is what I need to use on the PayPal side, from a forum post in 2013:

"There are a number of ways you could set this up.

You could use the Adaptive Payments platform, specifically the Pay API, to create parallel or chained payments so that multiple receivers can receive money within the same transaction.

You can also do a parallel payment with Express Checkout, but you can't do a chained payment.

The main difference is that with parallel payments the buyer will see the split during checkout. With a chained payment you can hide that so they only see the primary receiver. Also, chained payments can be delayed so you can trigger the commission to be paid at a later time if necessary (for example, waiting for services to be completed.)

Another way you could do this is to use Payments Standard, Express Checkout, or Payments Pro, and let the payment go entirely to a single account. Then setup a Pay API request to submit payment to the secondary receiver, or use the MassPay API. This could be setup within an IPN solution so the entire thing is automated. In this case you'd basically be building what the adaptive payments platform does for you, but it would give you a little bit more freedom over everything in the application."

So I'm looking into these options through a LiveCode iOS app, if anyone has some advice or pointers let me know, I'll post updates

Aduro91
Posts: 36
Joined: Sat Jul 22, 2023 8:49 pm

Re: PayPal or other commerce integration

Post by Aduro91 » Tue Feb 27, 2024 1:43 am

stam wrote:
Tue Feb 27, 2024 1:35 am
Interesting question - can you pose a single payment request to the user while actually taking two payments? (genuinely no idea if this is possible and actually curious...)
The above indicates its possible, and ideally I'd like the first option which hides the details of the split, just to make it more professional and not discourage people from tipping by seeing my hand take some of it so explicitly :lol:

Aduro91
Posts: 36
Joined: Sat Jul 22, 2023 8:49 pm

Re: PayPal or other commerce integration

Post by Aduro91 » Tue Feb 27, 2024 1:58 am

Ah Adaptive payments are out:

"Adaptive Payments are deprecated by the time I am writing this answer. What you can do is letting the owner of the website receive the payment to his PayPal account and then use Paypal Payouts to transfer the merchant's money. For example, if you are getting 5 percent of the payment, you have to transfer 95 percent of the received money to the merchant. The steps are as follows:

Let the user make payment to the website's owner account using Paypal API.
Upon receiving the payment, i.e. receiving a call to your webhook, you have to use Paypal Payouts to transfer whatever you own to the merchant.

This way, you have to keep the merchants' PayPal accounts in your database, and there is no need for you to access their PayPal merchant keys.

You can check my answer about using webhooks here."

Looking into this webooks thing https://developer.paypal.com/api/rest/webhooks/

Not sure about the chances of getting this working inside an LC iOS app

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: PayPal or other commerce integration

Post by stam » Tue Feb 27, 2024 2:35 am

Maybe use a different backend? Many seem to prefer Stripe.
At a glance, I saw this: https://docs.stripe.com/payments#multiparty-payments
Looks like it is the kind of thing you're looking for, but not sure... (ie I'm too lazy to read ;))

Aduro91
Posts: 36
Joined: Sat Jul 22, 2023 8:49 pm

Re: PayPal or other commerce integration

Post by Aduro91 » Tue Feb 27, 2024 3:09 am

stam wrote:
Tue Feb 27, 2024 2:35 am
Maybe use a different backend? Many seem to prefer Stripe.
At a glance, I saw this: https://docs.stripe.com/payments#multiparty-payments
Looks like it is the kind of thing you're looking for, but not sure... (ie I'm too lazy to read ;))
Thanks so much for directing me to this!

I haven't done anything like this yet but I'll give it a go and post here with any updates

MWCoastMedia
Posts: 32
Joined: Fri Jan 16, 2015 5:31 pm

Re: PayPal or other commerce integration

Post by MWCoastMedia » Fri Mar 01, 2024 2:54 pm

stam wrote:
Tue Feb 27, 2024 2:35 am
Maybe use a different backend? Many seem to prefer Stripe.
At a glance, I saw this: https://docs.stripe.com/payments#multiparty-payments
Looks like it is the kind of thing you're looking for, but not sure... (ie I'm too lazy to read ;))
I don't have experience specifically with multiparty payments but am currently working on a project in LiveCode (server) where I'm successfully making purchases through the Stripe API then using the data returned from that transaction to push a few other database operations. Let me know if you have trouble with their workflow.

Post Reply

Return to “Talking LiveCode”