paypal / PayPal-PHP-Server-SDK

Other
6 stars 1 forks source link

Creating payment subscriptions #22

Open dparker1005 opened 1 day ago

dparker1005 commented 1 day ago

Hi there!

We currently use the SetExpressCheckout NVP endpoint to handle checkout flows for both one-time payments and to set up payment subscriptions.

As the NVP/SOAP APIs are legacy integration methods, we are considering moving to PayPal Advanced Checkout. The PayPal Advanced Checkout sample code leverages this SDK, but there isn't any sample code for setting up subscriptions with Advanced Checkout. Is setting up subscriptions with Advanced Checkout currently possible, possibly with a different SDK or API? If not, is this a planned feature of this SDK?

Alternatively, is there a different PayPal payment flow that would be better suited for one-time payments, subscriptions, and SCA compliance?

LeonarthusMectus commented 15 hours ago

Hey @dparker1005

I want to clarify a bit first to be sure I understand your integration. Based on the API call and the behavior you're describing, it sounds like you're using the SetExpressCheckout API to configure checkout to generate a billing agreement for future use, not specifically to generate a subscription inside of PayPal, correct?

I and my team don't work with the NVP/SOAP APIs, so my understanding is sparse at best, but as I understand it, you'd still need to make a separate call to something like CreateRecurringPaymentsProfile to setup the actual recurring billing behavior. Unless your code handles that aspect and simply uses the billing agreement itself and a call such as DoReferenceTransaction to do it.

If you could elaborate a bit on what APIs you're using, or give a general description of the logic flow around what you're calling subscriptions, I can clarify if the SDK can currently do what you need or if there's an additional API that is required that is not yet available.