Gianluca Ghettini
Gianluca Ghettini

Reputation: 11658

Perform a PayPal payment automatically using PHP

How can I automate a PayPal payment using PHP?

I have the email of my PayPal business account, the PayPal email of the receiver and the amount to transfer. Is there a way to make the money transfer without my interaction? (the payment originates from my account)

Of course I'll run the PHP script manually

Upvotes: 3

Views: 2101

Answers (1)

Gianluca Ghettini
Gianluca Ghettini

Reputation: 11658

I'm going to answer my own question:

It's possible to make a PayPal payment using PHP only, it's called Implicit approval payments

Implicit approval payments are payments where the sender and the API caller are using the same account. Because PayPal draws the funds for the payment from your own account, there is no approval necessary, and as such there is no visible flow for implicit approval payments.

I tried using the Pay API and the payment is made within the PHP script, no need for a web flow or any other manual approvement.

The Pay API requires an extra field, called senderEmail, set this field to the PayPal email user account

Upvotes: 3

Related Questions