search

[NCMC] All Supported Features

Overview

 

All NCMC features below are invoked through the App Invoke SDK (NcmcPayments class). Each section shows the SDK call and the key-value pairs delivered to IPaytmResult.onResult. See [NCMC] Integration via App Invoke for setup, full method signatures and parameter definitions.

Feature

App Invoke SDK method

Read Card (Retail / Transit) NcmcPayments.doReadCard
Add Money with Cash / Linked Account NcmcPayments.doMoneyAdd
Update Balance NcmcPayments.doUpdateBalance
Check Balance with Data NcmcPayments.doCheckBalance
Create Service (CSA / OSA) NcmcPayments.doCreateService

 

1. Read Card for Retail and Transit

 

This part supports all qSparc-related transactions for open loop cards using Third-Party Apps.

Use Cases - To add support for integration of the below qSparc-related transactions

  • Get Card Info for Retail and Transit
  • Get the Global balance of the card
  • Add Money to global balance using Cash / Account for Retail and Transit
  • Update global balance of card (for TopUp done using NetBanking, wallet, etc.)
  • Create NCMC Services - CSA & OSA

doReadCard reads card data according to the tags specified in requestTags. Use flowType = "transit" and set isOsa = true to read the Operator Service Area.

 

  1. Sample-

     

    Request

     

    NcmcPayments.doReadCard(
        activity = this,
        paytmResult = ncmcResult,
        orderId = "12345",
        flowType = "transit",
        isOsa = true,
        readMethod = "tap",
        requestTags = listOf("5A", "DF33")
    )

     

    Response for Success (onResult → responseData)

     

    status = SUCCESS
    cardNo = 608326••••••0017
    responseTags = f6f79de29bca7d099d77b04a20a1167066ba8104230bd924bf1bf5c420148dbf,011010AC00C39E930....
    orderId = 12345
    isOsa = true

     

    Response for Failure (onResult → responseData)

     

    status = FAIL
    errorCode = 1002
    errorMsg = card read timeout
    orderId = 12345
    isOsa = true

     

2. Add Money with Cash / Linked Account for Retail or Transit

 

doMoneyAdd is used for adding money to the Global balance of the card using Cash or the linked account. For cash, serviceType = "CASH", and for the account, serviceType = "ACCOUNT".

 

  1. Sample-

     

    Request

     

    NcmcPayments.doMoneyAdd(
        activity = this,
        paytmResult = ncmcResult,
        amountInPaise = 200,
        orderId = "54321",
        cardNoSHA = "64c553a3fa16961c5fa37d4004a032233beb8cca085e2cba56556e5396779c3c",
        serviceType = "CASH",
        flowType = "transit"
    )

     

    Response for Success (onResult → responseData)

     

    amount = 200
    txnid = 20221031111212800110168887003398471
    status = SUCCESS
    cardNo = ••••••••••••0249
    orderId = 54321
    isOsa = false
    responsePayMode = CARD
    acquirer = PEDC
    cardBalance = 949200
    RRN = 230412901098
    stan = 001119
    txnDate = 31 Oct 2022, 12:07:46 PM
    authCode = 120707
    tid = 14015808
    aid = A0000005241010
    cardScheme = Rupay Prepaid
    issuingBank = ICICI
    bankResponseCode = 00
    bankMid = 5PT000000000026
    bankTid = 5P002524
    bankOfferApplied = false
    subventionCreated = false

     

    Response for Failure (onResult → responseData)

     

    amount = 200
    status = FAIL
    errorCode = -4
    errorMsg = Same card is not used. Please use the original card
    orderId = 54321
    isOsa = false
    cardBalance = null

     

3. Update balance for Retail or Transit

 

doUpdateBalance is used to update the Global balance of the card in case money has already been added to the host account using NetBanking or other third party services.

 

  1. Sample-

     

    Request

     

    NcmcPayments.doUpdateBalance(
        activity = this,
        paytmResult = ncmcResult,
        orderId = "54321",
        cardNoSHA = "d825fc6a5cc8b31738799cb0747255c5bd919d0d4a1738934dc4a01d48262ca2a6b1fcccfb7b69a73ab6ec177d971693e32be5434f1bd740a59f3e793644659f",
        flowType = "transit"
    )

     

    Response for Success (onResult → responseData)

     

    amount = 0
    txnid = 20221031111212800110168418603307334
    status = SUCCESS
    cardNo = ••••••••••••0249
    orderId = 54321
    isOsa = false
    responsePayMode = CARD
    cardBalance = 949200
    RRN = 230412901309
    stan = 001123
    txnDate = 31 Oct 2022, 12:21:04 PM
    tid = 14015808
    aid = A0000005241010
    cardScheme = Rupay Prepaid
    issuingBank = ICICI Bank
    bankMid = 5PT000000000026
    bankTid = 5P002524
    bankOfferApplied = false
    subventionCreated = false

     

    Response for Failure (onResult → responseData)

     

    status = FAIL
    orderId = 54321
    errorCode = 1406
    errorMsg = card number not matched

     

4. Check balance with Data for Retail or Transit

 

doCheckBalance is used to get the Global balance of the card along with card-related data (optional, via requestTags). Card data is the same as returned by doReadCard.

 

  1. Sample-

     

    Request

     

    NcmcPayments.doCheckBalance(
        activity = this,
        paytmResult = ncmcResult,
        orderId = "54321",
        flowType = "transit",
        requestTags = listOf("5A", "DF33")
    )

     

    Response for Success (onResult → responseData)

     

    status = SUCCESS
    cardNo = ••••••••••••0249
    orderId = 54321
    cardBalance = 949200
    responseTags = d825fc6a5cc8b31738799cb0747255c5bd919d0d4a1738934dc4a01d48262ca2a6b1fcccfb7b69a73ab6ec177d971693e32be5434f1bd740a59f3e793644659f,011010AC00C39E930100000000012A221031120651001B0000009492000356603100000001000110114224B61C000000000000000001000110114224B5B0002C012C1748020001000110114224B5AE002B012C175B000001000110618224B5A9001C00641761000001000110618224B5A8001B00641767000000000000000000

     

    Response for Failure (onResult → responseData)

     

    status = FAIL
    orderId = 54321
    errorCode = 1406
    errorMsg = card read timeout

     

5. Create Service for Retail or Transit

 

doCreateService is used to create Common Service Area (CSA) and Operator Service Area (OSA) in open loop cards. If isOsa = true it performs OSA creation, otherwise CSA creation.

 

  1. Sample-

     

    Request

     

    NcmcPayments.doCreateService(
        activity = this,
        paytmResult = ncmcResult,
        orderId = "54321",
        flowType = "transit",
        isOsa = true
    )

     

    Response for Success (onResult → responseData)

     

    status = SUCCESS
    cardNo = 608326••••••0017
    orderId = 54321
    amount = 0
    stan = 001464
    RRN = null
    txnId = 54321
    isOsa = true

     

    Response for Failure (onResult → responseData)

     

    amount = 0
    stan = 001464
    RRN = null
    cardNo = 
    txnId = 467
    status = FAIL
    errorCode = -3
    errorMsg = Error in reading card. Please retry
    orderId = 467
    isOsa = false