search

Decouple Flow transaction

Introduction

Decoupled flow in the context of card transactions refers to the separation of the authentication and authorization processes. This method allows merchants to first authenticate a payment using a Payment Aggregator (PA) or Payment Gateway (PG) and, after successful authentication through a Merchant Plug-in or 3D Secure Server (3DSS), initiate the authorization with a different PA or PG.

As of today, we only support authorization where the merchant can initiate a transaction request to complete the authorization.

Required Parameters for Authorisation-Only Transactions

There are a few additional parameters required for authorization, which are typically received in a callback following successful authentication. Along with the card (PAN or Token) information and order details, the following parameters are necessary for processing an authorization-only transaction.

S.No Attribute  Description   Sample Value
1 ECI Electronic Commerce Indicator (ECI) is a value returned by the Directory Servers (Visa, Master, American Express...) indicating the result of the authentication requested. Rupay, Visa - 05
Mastecard - 02
Data may consist of the characters 0-9
2 authenticationToken This is generated by the issuer's Access Control Server (ACS). This provides evidence that cardholder authentication occurred or that the merchant attempted authentication. Required for Visa & Rupay pass Cardholder Authentication Verification Value (CAVV)
E.g : AAIBB0CCAwAABK9qNWMIdAAAAAA=

For Mastercards, pass Account Authentication Value (AAV/UCAF Data)
E.g : kBPQfMLMjMkYt0USP9vRezVh3Iit
3 dsReferenceNumber. This is unique transaction identifier assigned by the Directory Servers to identify a single transaction. The Directory Server is the element that enables the communication between the 3DS Server and the ACS. Sample value -

Visa - f6039c96-63a3-4891-9581-d7f2832c5585
Mastercard - aca97d19-3a62-44c6-8a42-736c2b0d9eaa
Not required for Rupay
4 acsTransactionId This is unique transaction identifier assigned by the ACS to identify a single transaction. Sample value -
Visa - 5e46213d-06e0-11ef-9e6c-8f7fc88d7e73
MasterCard - 1746e49b-0920-11ef-b742-b376edc6968c
Not Required for Rupay
5 3dSecureVersion 3-D Secure is a protocol designed to be an additional security layer for online credit and debit card transactions Sample Value -
2.1.0, 2.2.0

Overview of Payment Processing for Authorization only transaction

  • You hit the Process Transaction API with the required parameter as an HTML form post through the client. Paytm processes the transaction to acquirer. As authorization API is the S2S API hence no reqirection will be required.
  • Instead of providing the Bank form information in PTC response, we provide the final transaction status in the PTC response.
  • You call the Transaction Status API through your backend server to verify the transaction response.
  • Below are the sample request and response.
PTC -  Request curl --location 'https://pgp-qa14.paytm.in/theia/api/v1/processTransaction?mid=deco1222807154519922&orderId=testF59938991109' \
--header 'Content-Type: application/json' \
--header 'Postman-Token: d28ea9b3-6e06-4ea1-a6d0-4ec9d4d29f9e,b923f255-af5b-4339-9a3a-10634a42e302' \
--header 'cache-control: no-cache,no-cache' \
--header 'Cookie: JSESSIONID=40AC47B9FFDBCE8F965BB1EB667B32DD' \
--data '{
    "head": {
        "version": "v1",
        "requestTimestamp": 1551766556536,
        "channelId": "WAP",
        "txnToken": "5c1648d69b15494ba7f121b50b6b69b21718375811393"
    },
    "body": {
        "mid": "deco1222807154519922",
        "orderId": "testF59938991109",
        "paymentMode": "CREDIT_CARD",
        "cardInfo": "|4405230017706470|318|082027",
        "authMode": "otp",
        "channelCode": "",
        "saveForFuture": "1",
        "paymentFlow": "NONE",
        "payerAccount": "",
        "mpin": "",
        "planId": "",
        "encCardInfo": "",
        "PROMO_CAMP_ID": "",
        "cardTokenRequired": "",
        "aggMid": "",
        "account_number": "",
        "storeInstrument": "1",
        "eci":"05",
        "acsAuthenticationToken":"AAIBCANhdAAAAABmNWFmdVAWI3A=",
        "dsReferenceNumber":"e8ecd90e-692b-4a3c-8ef1-75b708cb15b3",
        "acsTransactionId":"7bd21335-0020-4d2b-95b9-ba552ad11d7e",
        "secureVersion3D":"2.2.0"
    }
}'
PTC Response {
    "head": {
        "responseTimestamp": "1718375840682",
        "version": "v1"
    },
    "body": {
        "resultInfo": {
            "resultStatus": "S",
            "resultCode": "0000",
            "resultMsg": "Success",
            "retry": false
        },
        "txnInfo": {
            "BANKNAME": "IDFC FIRST Bank",
            "BANKTXNID": "7183758298556787305957",
            "CURRENCY": "INR",
            "GATEWAYNAME": "HDFCPAY",
            "MID": "deco1222807154519922",
            "ORDERID": "testF59938991109",
            "PAYMENTMODE": "CC",
            "RESPCODE": "01",
            "RESPMSG": "Txn Success",
            "STATUS": "TXN_SUCCESS",
            "TXNAMOUNT": "1.00",
            "TXNDATE": "2024-06-14 20:07:08.0",
            "TXNID": "20240614011760000008466829721016564"
        },
        "callBackUrl": "https://automation-pg-ext.paytm.in/mockbank/MerchantSite/bankResponse",
        "riskContent": {
            "eventLinkId": "grhx51b882df6f43492bb7cf50d1d5616df0"
        }
    }
}