Search code examples
phppaypal

Paypal Orders API Mixed Single & Subscription Purchase


I'm currently using the Paypal Orders API (v2) to process multiple items from a website's cart. Everything is working smoothly, but I now want to integrate subscriptions for some products. Basically, when they add the item to the cart it should be a subscription after checking out, that will charge money monthly.

Is it possible to combine having single purchases & subscriptions in a single checkout?


Solution

  • It's not possible unless you use a plan with a setup_fee that corresponds to the amount you want to charge immediately, or add an additional TRIAL billing_cycle with a different amount.

    A plan_id can be overridden with other plan details at the time of creating the subscription, be it creation via API or with the JS SDK actions.order.create