Search code examples
phppaypalpaypal-rest-sdk

How to create flexible billing agreements using PHP Rest SDK?


We need to create flexible billing plans for our customers, in which the timing and amount of the billing is flexible and should be determined by us. Just like a "utility bill" but with flexible charge date. Also, there's no purchasing involved upon agreeing of the customer, just his approval for us to charge his PayPal account.

After researching it we decided to go with "referenced transactions". I've read its documentation and the flow seems to be clear.

However, when I attempt to implement using PayPal's PHP REST SDK, I can't seem to find the methods that implement that flow, or some other description on how to achieve our needs using this SDK. For example, I can't find SetExpressCheckout in the PHP REST SDK.

Can anyone point out how we should implement our business needs as described above (1st paragraph) using the PHP REST SDK? I'm very aware of the rather good PayPal REST API documentation.

Thanks!


Solution

  • Unfortunately Reference Transaction is only available with the Classic APIs. The only similar REST API is called "Future Payments". Unfortunately this API has only been implemented for the PayPal Mobile SDK. You cannot use it outside a native mobile app...

    I'm afraid your only solution is to implement the PayPal Classic API with Reference Transaction.