Reputation: 433
I'm trying to implement paypal using reference transactions, i read that NVP/SOAP API allows this creating a billing agreement and then reference this billing agreement ID for future payment requests.
I want to know if this is possible to achieve using the REST API.
I know that REST API allows to create billing plans and agreements for subscription plans, but this is not what i need, i need to handle recurring payments on my own, where users can approve the agreement on Paypal when they susbscribe on my app and then charge them periodically with a cron to the approved account on PayPal.
Is this possible? if so can anyone provide an example of the flow i must follow?
Thanks.
Upvotes: 2
Views: 855
Reputation: 23
Meanwhile, Reference Transactions through REST are technically possible, but you have to get the feature approved by a paypal account manager. Paypal calls this "limited release".
Therefore, the feature is not included in the documentation which is officially linked, but in this "hidden" one: https://developer.paypal.com/limited-release/reference-transactions/
Upvotes: 0
Reputation: 2140
I'm going to go with no. What you want is Reference Transactions for the workflow your talking about.
Unfortunately, you can see in the base REST API bug tracker the following ticket Reference Transactions #44 which is tagged with the nvp-soap-parity tag meaning we don't have it in REST yet.
When I look through the REST API Reference for billing agreements, there's nothing that gives me hope that there's poorly publicized way to make it happen. And lastly when you look at PHP REST SDK Class Documentation, for the Plan class, it looks like there is nothing supported outside of plans that have a defined frequency and amount.
The good news is you can still use the merchant-sdk-php for now, even though NVP is apparently deprecated from Jan 1, 2017 forward. and then just plan to change things over to REST when the Reference Transactions bug is fixed.
Upvotes: 1
Reputation: 26056
Yes. Load the REST API reference and scroll down to the Billing Plans and Agreements section. You'll find chapters for "Create an agreement", "Execute an agreement", etc.
Upvotes: 0