How to implement PayPal Subscription feature plan in Android

Temp20221105A
Contributor
Contributor

I want to add the feature of PayPal subscription in android. For the web, we have like the below. How to do this with android

 <div id="paypal-button-container-P-9V469527YE388513LMNS6J2A"></div>
<script src="https://www.paypal.com/sdk/js?client-id=AT9hM3c1Dp3C-5_t-cZ2P1bSKkT31rF2jQZ66uK300jORsRLehUCVhBerAzo..." data-sdk-integration-source="button-factory"></script>
<script>
paypal.Buttons({
style: {
shape: 'pill',
color: 'gold',
layout: 'horizontal',
label: 'subscribe'
},
createSubscription: function(data, actions) {
return actions.subscription.create({
/* Creates the subscription */
plan_id: 'P-9V469527YE388513LMNS6J2A'
});
},
onApprove: function(data, actions) {
alert(data.subscriptionID); // You can add optional success message for the subscriber here
}
}).render('#paypal-button-container-P-9V469527YE388513LMNS6J2A'); // Renders the PayPal button
</script>

Login to Me Too
1 REPLY 1

MTS_Chiranjeevi
Moderator
Moderator

Good day @Temp20221105A,

 

Thank you for your post and welcome to the Community Forum.

 

Unfortunately, PayPal Mobile SDK in Production/Sandbox is deprecated on January 20th 2021. PayPal will be discontinuing the use of PayPal’s Mobile SDK and PayPal payments via Braintree JS SDK version 2.

 

To avoid a discontinuation of service, we recommend one of the following integration options:

Option 1: Integrate directly with v2/Orders API

This option is a web-based checkout experience that must be integrated with an API. For more information on how to integrate through this API, refer to these references:

Option 2: Integrate with PayPal JavaScript SDK

With this web-based option, transactions are redirected to PayPal or the Venmo mobile app through a button added to your website.
Here are some developer resource guides:

Option 3: Upgrade from Braintree JS SDK version 2 to JS SDK version 3 in support of PayPal payments.

If you need additional support, we encourage you to contact your web-hosting company, e-commerce software provider, in-house web programmer, or system administrator. You can also contact your PayPal customer success manager or technical account manager for further assistance.

I request to please refer the below guide link :-

https://www.paypal-status.com/history/eventdetails/14397

 

REST API Subscription integration : https://developer.paypal.com/docs/api/subscriptions/v1/  

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.