Adding payment method and escrow to a site in PHP

3.2k Views Asked by At

I am creating a site in PHP in which I take Credit card info from user and now I want to process that.also some recurring payment. My use case is that I will deduct some money say $100 from user account and escrow them and on confirmation transfer 10% to another account and and remaining 90% to another account. I know about paypal and different payment gateways but I want to make sure what I am doing is right or not.

My understanding is for Escrow I will deduct money from users account and transfer that to my (admin) account and on confirmation I will transfer the other amounts to respective accounts.

Not sure this is the best way or not . Also I see paypal allows you recurring payment, but what about if I only have users credit card info. how can I do that?

I see similar question for escrow but not helpful

Also important to know how my site database will be helpful, will I rely on my db for recurring payments and escrow or some third party?

3

There are 3 best solutions below

7
On BEST ANSWER

For escrow I would recommend using Balanced.

They have a built-in support for Escrow and PHP libraries + tutorials.

It's supposed to be quite easy to set up.

4
On

Holding money in Escrow is not something PayPal (or any merchant account provider) likes you doing.

Instead, with PayPal, you can use their Preapproval API to allow your users to setup profiles so that you can submit payments on their behalf without further approval. This way you don't have to hold any money, but when the time comes to move it around, you can do so using their preapproval key(s).

For recurring payments with credit cards directly you'll need to sign up with Payments Pro w/ Recurring Billing. This will allow you to create profiles from credit card data without the user having a PayPal account.

0
On

If you or the user is uncomfortable with money being charged up front, most payment gateways offers a pre-auth service. Pre Authorisation allows for the placement of cardholder funds on hold for a pre-determined time, giving you the option of completing the transaction at a later date. If not, the money is released back into the credit card after x number of days.

If your gateway/bank charges refund fees, this could save you a bit on transaction costs. On the other hand, keeping money in your account generate interest. So I would recommend the most financially viable option depending on the circumstances.