cancel
Showing results for 
Search instead for 
Did you mean: 

How do you use Express checkout Buttons for a subscription payment?

Highlighted

How do you use Express checkout Buttons for a subscription payment?

How do you use Express checkout Buttons for a subscription payment?

Examples please - please do not just direct me to PayPals rediculouse ocumentation.

Thanks : )

2 REPLIES
Moderator

Re: How do you use Express checkout Buttons for a subscription payment?

hey, so Express Checkout is an API integration so for subscriptions/recurring payments you would need to integrate several API calls....

 

- SetExpressCheckout

- GetExpressCheckoutDetails and

- CreateRecurringPaymentProfile

 

Or if you're using straight up HTML buttons you can just use a subscription HTML form e.g. 

 

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">

    <!-- Identify your business so that you can collect the payments. -->
    <input type="hidden" name="business" value="alice@mystore.com">

    <!-- Specify a Subscribe button. -->
    <input type="hidden" name="cmd" value="_xclick-subscriptions">
    <!-- Identify the subscription. -->
    <input type="hidden" name="item_name" value="Alice's Weekly Digest">
    <input type="hidden" name="item_number" value="DIG Weekly">

    <!-- Set the terms of the regular subscription. -->
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="a3" value="5.00">
    <input type="hidden" name="p3" value="1">
    <input type="hidden" name="t3" value="M">

    <!-- Set recurring payments until canceled. -->
    <input type="hidden" name="src" value="1">

    <!-- Display the payment button. -->
    <input type="image" name="submit"
    src="https://www.paypalobjects.com/webstatic/en_US/i/btn/png/btn_subscribe_113x26.png"
    alt="Subscribe">
    <img alt="" width="1" height="1"
    src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" >
</form>

Re: How do you use Express checkout Buttons for a subscription payment?

Hey : )
Thanks very much for the response! Smiley Happy
I really appreciate it Smiley Happy

Do you mind if I ask you a follow up quetion?

 


-------
Is it possible to simply add parameters to the Paypal Express Checkout code - that will set up for subscription - or point to an existing subscription - already set up on my seller account?



payment: function(data, actions) {
return actions.payment.create({
payment: {
transactions: [
{
amount: { total: '0.11', currency: 'USD' },
hosted_button_id: 'PAYPALS_BUTTON_ID_7KDHB44PVYQ21',
or_maybe_subscriptio_detials: 'monthly'
}
]
}
});

You know - like you can with their regular HTML buttons:

<input type="hidden" name="hosted_button_id" value="PAYPALS_BUTTON_ID_7KDHB44PVYQ21">


Or do you need to set up the subscription details dynamically through the API?

I like the pop-up and staying on your site of the Express Checkout. But I am not sure it is worth a bunch of additional coding - when I could just send them off to PayPal with a HTML button.