I want to be able to capture payment and subscribe user to monthly payments at once. Is it possible using with PayPal?
With PayPal Subscriptions, the billing is determined by the Plan object. Separate Plans require separate checkouts. It is not possible to add them together or treat them as 'items' in a cart.
If you have multiple plans that bill on the same schedule and a user wants to subscribe to everything at the same time, you can create a new Plan with a billing_cycles -> pricing_scheme object that encompasses everything you want to bill, and use that new combined Plan for the checkout. Alternatively you can start with a base plan_id
and override its billing details by supplying an override plan
object (in addition to the base plan_id
). The override object can have a new, different billing_cycles -> pricing_scheme object which will be used instead, and also change the name of what's being subscribed to so it's not confusing.
See the documentation:
If you are overriding a plan_id
by additionally providing a plan
with the billing_cycles->scheme, this can be done from button JavaScript where it creates the subscription. Alternatively, you can use an API to create the subscription server-side and supply that to the button JS.