PayPal Preapproved API usage when dealing with user "credits"

94 Views Asked by At

Is it possible to use PayPal's preapproved payments api for the following scenario:

Online marketplace where users buy fixed amounts of credits.

They spend the credits on items/services in the marketplace.

We detect when the credits run out and based on the billing agreement automatically charge them to renew the amount of credits.

I have spent quite a while looking around for an answer to this but cannot find my specific problem.

Any help very much appreciated! Thanks.

1

There are 1 best solutions below

2
On

Yes this is definitely possible. I would write a cron job that periodically checks current credits against their billing agreement. If there is a match, then make a pay request to paypal. Sorry I cannot provide code examples without more knowledge of how your site is structured.