As you might have read over at our PayPal Forward Blog it’s time to celebrate for PayPal | Developer. One year ago we relaunched our Developer Platform with way clearer documentation, new REST APIs and our CardIO-enhanced Mobile SDK that allows for frictionless payments on Android and iOS.

Today I want to quickly elaborate on an amazing new feature of our mSDK version 2.0 called Future Payments that allows for great use-cases like subscription payments without requiring the user to re-authorize each payment by logging in again. Great experiences like the ones that you can find when using Uber can be created by using this kind of payment. By authorizing the application once to handle future transaction the user grants the application a revokable token that will be passed in all future transactions and therefore skips the login step.

Implementing this step is actually very easy as our SDK got even easier with version 2. First of all we need to change the configuration of the SDK slightly. In the following examples I will showcase how to do so when working on Android apps – bear in mind that implementing this feature in iOS is equally easy to handle:

If you’ve worked with our SDK prior this version you will see that the configuration got much easier by removing all Intent Extras and adding dedicated methods for initializing the SDK.

After the user logged in an OAuth 2.0 authorize token is being returned which can be exchanged against a short-lived access token. Furthermore a refresh token is being returned which we will need to acquire a new access token once the previous one becomes invalid.

By using the startActivityForResult mechanism we receive the PayPalAuthorization in onActivityForResult:

The payment is being handled on server-side – to do so we hand over the app’s correlation ID and payment details to the backend. To acquire the correlation ID we leverage a method that we introduced with version 2.0 of the SDK:

It is required that the application provides a way to revoke the token on client-side to ensure a user-friendly experience.

We are looking forward to bringing even more great features to the SDK and are as always keen for your feedback!

Best regards,

About Tim Messerschmidt

As a long time mobile and web developer specializing in Android, Tim channels his knowledge and experience as Developer Evangelist across Europe for PayPal’s Developer Network. Tim is very passionate about startups, and serves as a mentor of Seedcamp, Wayra, Startup Wise Guys & Rockstart. In his spare time, he leads and creates training classes in all sorts of Android related topics, and is the author of the Android chapter of the Mobile Developer's Guide to the Galaxy, as well as numerous articles published in magazines like web&mobile developer.

Tagged with:

13 Responses to Announcing Mobile SDK v2.0

  1. Awesome write up, can i make a request that sdk 2 gets some integration with cross platform languages too please (Titanium, Corona SDK, Unity, etc)

  2. Freak4pc says:

    Hey Tim, great news! When is this going to be avilable for iOS?

  3. Tim Messerschmidt says:

    The iOS SDK is going to release at the same time as the Android one!

  4. Tim Messerschmidt says:

    Hey Steve,
    we’ll have a phonegap plugin ready. No word on the other frameworks & environments, though.


  5. Freak4pc says:

    Sweet! Any expectation for the date ?

  6. Artur Kiulian says:

    Any estimation on when it will be released?
    We are stoked to implement it right away!

  7. Vaibhav says:

    I am a non US developer and i want to integarte paypal in my app. is
    this SDK will now work for my app as i ntially it was only for US
    developers. Should I integrate this new PayPalAndroidSDK.jar or i should
    use PayPal MPL.jar . Please reply ASAP…

  8. Vaibhav says:

    I have one more question regarding receiver email in PayPal. How to add receiver email in new methods. i am integrating new PayPalAndroidSDK.jar and libs in my app and i m not getting option to change receiver email. Please help me.

  9. Entrytest Team says:

    PaymentActivity is unable to get any of these method.can anyone help me??I have attached the image which is showing the the error i am having.thanx in advance.

  10. Entrytest Team says:

    PaymentActivity is unable to get any of these method.can anyone help me??I have attached the image which is showing the error.please help me.

  11. Brij says:

    Hello Tim, I have followed all the instructions but at last i am getting this error in file

    private String environemnt = PaymentActivity.ENVIRONMENT_LIVE;

    error : ENVIRONMENT_LIVE can not be resolved or is not a field.

    i am using this for a phonegap 2.9 based android app.

  12. Frank Y says:

    Please request to the product team to bump priority of allowing the SDK screens to be skinnable (or at a minimum allow the colors to be reassignable). It’s jarring for users to navigate through the app to reach the payment page that looks significantly different.

  13. Lan Nguyen says:

    Paypal here? When will it available to integrate into our app?