php - Payment systems with paypal with pre authorisation and incremental use of credit -


i developing commerce app php/mysql. boss wants this:

  • user can buy "ad credits" on our website , wants paypal pre authorisation
  • then user can use ad bundles various costs
  • this costs taken ad credits , wants actual decrement of user credits in paypal

example: john buys ad credits pack of 30$. pre authorises trasaction paypal account. buys 2 banner spaces cost of 10$. 10$ taken paypal.

is possible? paypal apis?

there couple of ways handle this.

1) use express checkout setup billing agreement buyer , use doreferencetransaction process future payments using billing agreement.

you can same thing payments pro, too. in original request run authorization of 1.00 , void authorization. use transaction id authorization process future payments doreferencetransaction.

2) setup preapproval profile buyer using preapproval api. use pay api process payments in future using preapproval key got preapproval api. explained in detail in adaptive payments documentation.


Comments