Search code examples
webpaypalpaypal-sandbox

PayPal Smart Payment Button 2 Different Payment


I'm working on PayPal smart payment button, It is possible to combine 2 different types of payment the recruiting/subscription payment with a one-time payment on the PayPal checkout?

E.g
item 1  autorenewal every 2 months  $10
item 2                              $15
total of                            $25

one time payment

   createOrder: function(data, actions) {
            return actions.order.create({
                purchase_units: [{
                    amount: {
                        value: '0.01'
                    }
                }]
            });
        }

recruiting/subscription payment

 createSubscription: function(data, actions) {
            return actions.subscription.create({
            //payment subscription id
            'plan_id': 'P-35079829PE431764RL4WLAYQ'
            });
        }

Solution

  • No, it's not possible to 'combine' them in the way you are thinking.

    You could use the subscriptions APIs to create a new Plan on demand with a setup_fee that corresponds to the amount you want to charge at that moment, for that particular checkout.