search

Native Apps Integration

The native SDKs for Custom UI solution allows you to integrate the same in your native Apps for both Android and iOS. This document provides the steps required to integrate the solution in your App for processing seamless payments from your customers.

Custom UI SDK Android versions

The Custom UI SDK for Android is available with different versions. These versions support different features as per your requirements. Please refer to the table below for different supported versions.

Android SDK version Features Status
com.paytm.nativesdk:core-wr:1.2.0 Includes core SDK features along with support of Redirection in case paytm app not present Published
com.paytm.nativesdk:core:1.2.0 Includes core SDK features with Direct bank integration Published
com.paytm.nativesdk:core-nodp:1.2.0 Includes core SDK features without Direct bank page Published
com.paytm.nativesdk:core-vs:1.0.0 Includes core SDK features along with Visa one click Available on request
com.paytm.nativesdk:core-ep:1.0.0 Includes core SDK features along with OTP Auto read through Assist Available on request

Pre-requisites

Before you begin the integration, make sure you follow the steps below:

  1. Create an account on Paytm as a merchant. Click how to create an account.

    Note: Save the MID and merchant key generated in the above step.
  2. If applicable, the additional details such as Client Id and Client Secret Key will be shared with you over an email after the approval.

  3. Go through the checksum logic to understand how to generate and validate the checksum.

  4. Get the staging android or iOS Paytm app for integration testing on the merchant staging environment.

  5. Get the sample merchant app to go over the different methods available in the SDK. Please get the sample apps for both android and iOS from here.

Integration types

Paytm Custom UI SDK can be integrated into two ways:

 

Integration Type 1 - Merchant links Paytm user's account without OTP

In this integration, merchants can link the Paytm user account through one-time consent. After the consent you can retrieve and present the following instruments on your checkout page as per your theme and design:

  • Paytm Wallet and Postpaid
  • Saved Cards of Paytm users
  • UPI linked bank accounts

In order to present these on your checkout page, you need to get approval for a couple of additional parameters such as client id and client secret key. Please contact your account manager or click here to apply for the same. For this integration type, please refer to the following steps:

  1. SDK initialisation
  2. Paytm account linking
  3. Transaction processing
  4. Optional methods integration
Note: Client id and client secret key along with Paytm user’s SSO token should not be shared with anyone.

Integration Type 2 - Merchant invokes Paytm app for user's saved instruments 

In this integration type, a merchant can simply invoke the Paytm app for the transactions processing through Paytm user's instruments such as wallet, postpaid, saved cards and bank accounts. For this integration type, please refer to the following steps:

  1. SDK initialisation
  2. Transaction processing
  3. Optional methods integration
 

Custom UI Integration - SDK Initialisation

  1. 1

    Addition of Dependencies

    1. Add the below line to the ‘repositories’ section of your project-level build.gradle file.
      maven {
          url "https://artifactory.paytm.in/libs-release-local" 
      }
    2. Add below line to ‘dependencies’ section of your app build.gradle.
      implementation "com.paytm.nativesdk:core-wr:1.2.0"
  2. 2

    Initialisation of SDK

  3. Initialise the SDK in the onCreate of Application class or before calling any method of SDK.
     

    Signature:

    PaytmSDK.init(context: Context)

    Method Parameter:

    context: Application Context

 

  1. 1

    Addition of Dependencies

    1. The latest version of SDK can be taken from here. You can also refer to the sample merchant App integrated with this SDK from here.

 

Once the SDK is initialised, please move to the next part for continuing the integration.