简体   繁体   中英

PayPal Preapproved API usage when dealing with user “credits”

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM