search

Initiate Payment

This step involves one API integration (Initiate Transaction API) from merchant’s server side.

 

It is a backend, server-to-server (S2S) integration step where the merchant’s server sends a request to the Paytm PG server via the Initiate Transaction API. 

 

 POST   Initiate Transaction API


This is the first API that the merchant needs to call to initiate the transaction. Initiate Transaction API must be initiated from the merchant’s server at any point of time before invoking the JS code. Mostly, merchants call this API when a customer reaches the cart / order page.

This API is required to initiate the transaction at merchant’s end. In response, Paytm PG returns the token in a key called txnToken. This token is later used to invoke the JS code that renders the checkout page. 

 CAUTION

 

This API call needs to send a checksum value in the request header.

 

    REQUEST

URL: https://securegw-stage.paytm.in/theia/api/v1/initiateTransaction?mid={mid}&orderId={order-id}

 

Sample Request

curl -X POST 'https://securegw-stage.paytm.in/theia/api/v1/initiateTransaction?mid={mid}&orderId=ORDERID_98765' \
--header 'Content-Type: application/json' \
--data '{"body":{"requestType":"Payment","mid":"{mid}","websiteName":"{websiteName}","orderId":"ORDERID_98765","txnAmount":{"value":"1.00","currency":"INR"},"userInfo":{"custId":"CUST_001"},"callbackUrl":"https://<callback URL to be used by merchant>"},"head":{"signature":"{signature}"}}'  

 

JSONObject paytmParams = new JSONObject();

JSONObject body = new JSONObject();
body.put("requestType", "Payment");
body.put("mid", "YOUR_MID_HERE");
body.put("websiteName", "YOUR_WEBSITE_NAME");
body.put("orderId", "ORDERID_98765");
body.put("callbackUrl", "https://<callback URL to be used by merchant>");

JSONObject txnAmount = new JSONObject();
txnAmount.put("value", "1.00");
txnAmount.put("currency", "INR");

JSONObject userInfo = new JSONObject();
userInfo.put("custId", "CUST_001");
body.put("txnAmount", txnAmount);
body.put("userInfo", userInfo);

/*
* Generate checksum by parameters we have in body
* You can get Checksum JAR from https://developer.paytm.com/docs/checksum/
* Find your Merchant Key in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys
*/

String checksum = PaytmChecksum.generateSignature(body.toString(), "YOUR_MERCHANT_KEY");

JSONObject head = new JSONObject();
head.put("signature", checksum);

paytmParams.put("body", body);
paytmParams.put("head", head);

String post_data = paytmParams.toString();

/* for Staging */
URL url = new URL("https://securegw-stage.paytm.in/theia/api/v1/initiateTransaction?mid=YOUR_MID_HERE&orderId=ORDERID_98765");

/* for Production */
// URL url = new URL("https://securegw.paytm.in/theia/api/v1/initiateTransaction?mid=YOUR_MID_HERE&orderId=ORDERID_98765");

try {
    HttpURLConnection connection = (HttpURLConnection) url.openConnection();
    connection.setRequestMethod("POST");
    connection.setRequestProperty("Content-Type", "application/json");
    connection.setDoOutput(true);

    DataOutputStream requestWriter = new DataOutputStream(connection.getOutputStream());
    requestWriter.writeBytes(post_data);
    requestWriter.close();
    String responseData = "";
    InputStream is = connection.getInputStream();
    BufferedReader responseReader = new BufferedReader(new InputStreamReader(is));
    if ((responseData = responseReader.readLine()) != null) {
        System.out.append("Response: " + responseData);
    }
    responseReader.close();
} catch (Exception exception) {
    exception.printStackTrace();
}

 

const https = require('https');
/*
* import checksum generation utility
* You can get this utility from https://developer.paytm.com/docs/checksum/
*/
const PaytmChecksum = require('./PaytmChecksum');

var paytmParams = {};

paytmParams.body = {
    "requestType"   : "Payment",
    "mid"           : "YOUR_MID_HERE",
    "websiteName"   : "YOUR_WEBSITE_NAME",
    "orderId"       : "ORDERID_98765",
    "callbackUrl"   : "https://<callback URL to be used by merchant>",
    "txnAmount"     : {
        "value"     : "1.00",
        "currency"  : "INR",
    },
    "userInfo"      : {
        "custId"    : "CUST_001",
    },
};

/*
* Generate checksum by parameters we have in body
* Find your Merchant Key in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys 
*/
PaytmChecksum.generateSignature(JSON.stringify(paytmParams.body), "YOUR_MERCHANT_KEY").then(function(checksum){

    paytmParams.head = {
        "signature"    : checksum
    };

    var post_data = JSON.stringify(paytmParams);

    var options = {

        /* for Staging */
        hostname: 'securegw-stage.paytm.in',

        /* for Production */
        // hostname: 'securegw.paytm.in',

        port: 443,
        path: '/theia/api/v1/initiateTransaction?mid=YOUR_MID_HERE&orderId=ORDERID_98765',
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            'Content-Length': post_data.length
        }
    };

    var response = "";
    var post_req = https.request(options, function(post_res) {
        post_res.on('data', function (chunk) {
            response += chunk;
        });

        post_res.on('end', function(){
            console.log('Response: ', response);
        });
    });

    post_req.write(post_data);
    post_req.end();
});

 

<?php
/*
* import checksum generation utility
* You can get this utility from https://developer.paytm.com/docs/checksum/
*/
require_once("PaytmChecksum.php");

$paytmParams = array();

$paytmParams["body"] = array(
    "requestType"   => "Payment",
    "mid"           => "YOUR_MID_HERE",
    "websiteName"   => "YOUR_WEBSITE_NAME",
    "orderId"       => "ORDERID_98765",
    "callbackUrl"   => "https://<callback URL to be used by merchant>",
    "txnAmount"     => array(
        "value"     => "1.00",
        "currency"  => "INR",
    ),
    "userInfo"      => array(
        "custId"    => "CUST_001",
    ),
);

/*
* Generate checksum by parameters we have in body
* Find your Merchant Key in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys 
*/
$checksum = PaytmChecksum::generateSignature(json_encode($paytmParams["body"], JSON_UNESCAPED_SLASHES), "YOUR_MERCHANT_KEY");

$paytmParams["head"] = array(
    "signature"    => $checksum
);

$post_data = json_encode($paytmParams, JSON_UNESCAPED_SLASHES);

/* for Staging */
$url = "https://securegw-stage.paytm.in/theia/api/v1/initiateTransaction?mid=YOUR_MID_HERE&orderId=ORDERID_98765";

/* for Production */
// $url = "https://securegw.paytm.in/theia/api/v1/initiateTransaction?mid=YOUR_MID_HERE&orderId=ORDERID_98765";

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json")); 
$response = curl_exec($ch);
print_r($response);

 

import requests
import json

# import checksum generation utility
# You can get this utility from https://developer.paytm.com/docs/checksum/
import PaytmChecksum

paytmParams = dict()

paytmParams["body"] = {
    "requestType"   : "Payment",
    "mid"           : "YOUR_MID_HERE",
    "websiteName"   : "YOUR_WEBSITE_NAME",
    "orderId"       : "ORDERID_98765",
    "callbackUrl"   : "https://<callback URL to be used by merchant>",
    "txnAmount"     : {
        "value"     : "1.00",
        "currency"  : "INR",
    },
    "userInfo"      : {
        "custId"    : "CUST_001",
    },
}

# Generate checksum by parameters we have in body
# Find your Merchant Key in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys 
checksum = PaytmChecksum.generateSignature(json.dumps(paytmParams["body"]), "YOUR_MERCHANT_KEY")

paytmParams["head"] = {
    "signature"    : checksum
}

post_data = json.dumps(paytmParams)

# for Staging
url = "https://securegw-stage.paytm.in/theia/api/v1/initiateTransaction?mid=YOUR_MID_HERE&orderId=ORDERID_98765"

# for Production
# url = "https://securegw.paytm.in/theia/api/v1/initiateTransaction?mid=YOUR_MID_HERE&orderId=ORDERID_98765"
response = requests.post(url, data = post_data, headers = {"Content-type": "application/json"}).json()
print(response)

 

Dictionary<string, object> body = new Dictionary<string, object>();
Dictionary<string, string> head = new Dictionary<string, string>();
Dictionary<string, object > requestBody = new Dictionary<string, object >();

Dictionary<string, string> txnAmount = new Dictionary<string, string>();
txnAmount.Add("value", "1.00");
txnAmount.Add("currency", "INR");
Dictionary<string, string> userInfo = new Dictionary<string, string>();
userInfo.Add("custId", "cust_001");
body.Add("requestType", "Payment");
body.Add("mid", "YOUR_MID_HERE");
body.Add("websiteName", "YOUR_WEBSITE_NAME");
body.Add("orderId", "ORDERID_98765");
body.Add("txnAmount", txnAmount );
body.Add("userInfo", userInfo);
body.Add("callbackUrl", "https://<callback URL to be used by merchant>");

/*
* Generate checksum by parameters we have in body
* Find your Merchant Key in your Paytm Dashboard at https://dashboard.paytm.com/next/apikeys 
*/
string paytmChecksum = Checksum.generateSignature(JsonConvert.SerializeObject(body), "YOUR_KEY_HERE");

head.Add("signature", paytmChecksum);

requestBody.Add("body", body);
requestBody.Add("head", head);

string post_data = JsonConvert.SerializeObject(requestBody);

//For  Staging
string url = "https://securegw-stage.paytm.in/theia/api/v1/initiateTransaction?mid=YOUR_MID_HERE&orderId=ORDERID_98765";

//For  Production 
//string  url  =  "https://securegw.paytm.in/theia/api/v1/initiateTransaction?mid=YOUR_MID_HERE&orderId=ORDERID_98765";

HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);

webRequest.Method = "POST";
webRequest.ContentType = "application/json";
webRequest.ContentLength = post_data.Length;

using (StreamWriter requestWriter = new StreamWriter(webRequest.GetRequestStream()))
{
    requestWriter.Write(post_data);
}

string responseData = string.Empty;

using (StreamReader responseReader = new StreamReader(webRequest.GetResponse().GetResponseStream()))
{
    responseData = responseReader.ReadToEnd();
    Console.WriteLine(responseData);
}

 

Request Attributes

 

Content Type : JSON

 

Head

 

Attribute Data Type Mandatory / Optional Description Possible Values
version String  Optional Version of the API.
Example: v1
        --
channelId String  Optional Identifies the Channel for which API call is initiated. WEB , WAP
requestTimestamp String Optional EPOCH timestamp at which the request is sent.
Example: 1588402269
         --
signature String Mandatory

Used by Paytm to validate the request and ensure that request parameters are not tampered with. For creating the checksum (signature), refer to the steps given in Checksum Logic.

Note: Create the signature using the body parameter of the request.

         --

 

Body

Table 1: Mandatory Attributes

 

ATTRIBUTE DATA TYPE MANDATORY / OPTIONAL DESCRIPTION POSSIBLE VALUES
requestType String  Mandatory Used to identify the transaction flow.
 
                   Payment
mid String  Mandatory

Unique identifier provided by Paytm to each merchant. Go to Merchant Dashboard to get your Staging and Production MID. You can get the Production MID post the account activation.
Example: INTEGR7769XXXXXX9383

Note: You can only get the Production MID post the account activation.

                          --
orderId String  Mandatory Unique Reference ID of the order. It is alphanumeric and max length is 50 characters.
Example: OREDRID_98765
                         --
websiteName String  Mandatory

Key to extract the static callbackUrl defined for merchants. This is provided by Paytm.

Note: URL passed in callbackUrl has a higher preference over the URL configured against this key.

WEBSTAGING (for staging/testing environment), DEFAULT (for production environment)

userInfo

 

 

      custId

 

 

 


      mobile

 

 

 

 


      email

 

 

      firstName
          

     lastName

 

 

Object

 

 

String

 

 

 

 

String

 

 

 

 

 

String

 

 

String

 

String

 

 

Conditional

 

 

Mandatory

 

 

 


Conditional

 

 

 

 

 

Optional

 

 

Optional

 

Optional

 

 

User information contains user details like customer ID, email, phone number etc.

 

Unique reference ID for every customer that is generated by merchant. Special characters allowed in CustId are @, ! ,_ ,$
Example: CUST_001


10-digit mobile number of user.
Example: 9988000000

Note: Mandatory when the merchant wants to give Debit Card EMI as a payment option to its users.

 

Valid email id of the user.
Example: abc@gmail.com

 

First name of the user


Last name of the user

 

 

 

                          --

 

 

 

                          --

 

 

 

 

                          --

 

 

 

                           --

 

 

                           --

 

                           --

 

 

callbackUrl String Mandatory

Contains the URL over which Paytm sends the response of transaction. 
Example: https://<callback URL to be used by merchant>

Note: Either websiteName or callbackUrl should be passed in the request. If callbackUrl is not present then websiteName param key will be used to get the static callbackUrl.

If you are hosting your website on third party webviews (eg: social media platforms like Facebook, Twitter, Linked etc), the callback URL configuration is mandatory to post the response

                          --

txnAmount

 

 

 

 

     value

 

 


    currency

Object

 

 

 

 

String

 

 

 

String

Mandatory

 

 

 

 

Mandatory

 

 

 

Mandatory

This parameter is an object and should contain the value of transaction i.e. amount and currency type.

Example: {"value" : "1.00", "currency" : "INR"}

 

This parameter contains the amount to be charged to the customer and can have two places of decimal.
Example: 1.00


This parameter indicates the currency in which transaction amount is to be deducted.

                

                          --

 

 

 

                           --

 

 

 

                          INR

 

Table 2: Optional Attributes

 

Attribute Data Type Mandatory / Optional Description Possible Values

extendInfo

Object

Optional

Merchant can pass any order specific information that is required to be passed here. For more details, please refer Table 5. below.

                       --                                

simplifiedPaymentOffers

 

 

 

 

 

 

    promoCode

 

 

    applyAvailablePromo

 

    validatePromo

Object

 

 

 

 

 

 

String

 

 

String

 

String

Optional

 

 

 

 

 

 

Optional

 

 

Optional

 

Optional

Object of Simplified Payment Offers.
Either paymentOffersApplied or simplifiedPaymentOffers. To be used for custom checkout-type 2, JS checkout and all-in-one SDK flows.

Example: { "promoCode":"TESTXXWALLET","applyAvailablePromo":"true","validatePromo":"false" }

 

It is the code that has been applied during the transaction on the merchant website.
Example: TESXXXOMO

 

Default Promo to be applied.

 

To validate Promo to be applied and fail transaction accordingly.

 

 

                         --

 

 

 

                          --

 

true, false

Default: true

 

true, false

Default: false

vanInfo

 

    merchantPrefix

 

 

 

    identificationNo

 

 

 

 

    purpose

 

Object

 

String (4)

 

 

String (10)

 

 

 

String (256)

Optional

 

Mandatory

 

 

 

Conditional

 

 

 

 

Optional

 

 

Details of customer VAN

 

Merchant identifier issued to the merchant at the time of onboarding. Merchants can opt for names resembling their business names.

Example: Paytm can opt for merchant prefix as PYTM.

 

This is 10 digits alphanumeric string that forms that last 10 digits of the VAN. While merchants can use this in multiple ways possible, this should be unique to the entity against which reconciliation is required. The length of this is fixed and hence needs to be accommodated for while passing this string.

 

The purpose for which VAN is getting created. This is free string that can be passed by merchant. The value passed in these fields will be available in order APIs, webhooks, VAN APIs, transaction and settlement report against the payment received for a particular VAN.

                            --

enablePaymentMode

 

 

 

 

    mode

 

 

 

    channels

array of objects

 

 

 

String

 

 

 

Array

Optional

 

 

 

 

Optional

 

 

 

Optional

List of the payment modes which needs to enable. If the value provided then only listed payment modes are available for transaction.
Example: [{"mode" : "UPI", "channels" : ["UPIPUSH"]}]

 

Mode of Payment

BALANCE, PPBL, UPI, CREDIT_CARD DEBIT_CARD NET_BANKING EMI PAYTM_DIGITAL_CREDIT

 

 

Channel associated with mode.

 

                             --

 

 

                            --

 

 

For UPI: UPI UPIPUSH UPIPUSHEXPRESS
For CREDIT_CARD/DEBIT_CARD/EMI: VISA, MASTER, AMEX
For NET_BANKING: SBI, PNB, HDFC, ICICI. List of Banks

disablePaymentMode

 

 

 

    mode

 

 

 

    channels

Array of Objects

 

 

String

 

 

 

Array

Optional

 

 

 

Optional

 

 

 

Optional

List of the payment modes which need to disable. If the value provided then all the listed payment modes are unavailable for transaction.
Example: [{"mode" : "UPI", "channels" : ["UPIPUSH"]}]

 

Mode of Payment

BALANCE, PPBL, UPI, CREDIT_CARD DEBIT_CARD NET_BANKING EMI PAYTM_DIGITAL_CREDIT

 

Channel associated with mode.

 

                              --

 

 

 

For UPI: UPI UPIPUSH UPIPUSHEXPRESS
For CREDIT_CARD/DEBIT_CARD/EMI: VISA, MASTER, AMEX
For NET_BANKING: SBI, PNB, HDFC, ICICI. List of Banks

goods Array of objects Optional This contains the goods info for an order. For more details, please refer Table 3 below.  
shippingInfo Object Optional This contains the shipping info for an order. For more details, please refer Table 4 below.                               --

splitSettlementInfo

 

 

   splitMethod

 

   splitInfo

Object

 

 

String

 

Object

Optional

 

 

Mandatory

 

Mandatory

Split payment details

Note: Send only in case split settlement required

 

Split method

 

List for child vendor merchant mid's and their split info. For more details, please refer Table 6 below.

AMOUNT, PERCENTAGE

simplifiedSubvention

 


    planId
 

 

 

 

 

    customerId

 

     items
 

 

 selectPlanOnCashierPage

 

 

   subventionAmount

 

 

    offerDetails

 

       offerId

Object

 

 

String

 

 

 

 

 

String

 

Object
 

 

Boolean

 

 

Double

 

 

Object

 

String

Optional

 

 

Conditional

 

 

 

 

 

Mandatory

 

Conditional

 

 

Conditional

 

 

Conditional

 

 

Conditional

 

Mandatory

Object of Simplified subvention.
Either simplifiedSubvention object or emiSubventionToken will have to be passed in case of EMI subvention integration


EMI plan id needs to be sent only in those cases where you either keep the plan ids data at your end or receive the same in any API response.
Note: This param need not be send for EMI subvention integration through All-in-one SDK or JS checkout.


Customer id


Items for subvention (mandatory for product based subvention). For more details, please refer Table 7.


This parameter needs to be sent only in case of EMI Subvention through All-in-One SDK and JS checkout. Value should be "True" only.

Amount on which subvention is to be applied for amount based validation (mandatory for amount based subvention).


OfferId that is enabled on the product (mandatory for amount based subvention).


OfferId of the product

                           --

 

Table 3: 'goods' Attribute Details

 

Attribute Data Type Mandatory / Optional Description Possible Values

merchantGoodsId

String

Optional

Unique id for the goods item (item no.)

           --

merchantShippingId

String

Optional

Merchant shipping id

           --

snapshotUrl

String

Optional

Product Image URL

           --

description

String

Mandatory

Description of product

           --

category

String

Optional

Category of Product

           --

quantity

String

Mandatory

Quantity ordered

           --
unit

String

Optional

Unit of quantity (KG/Litre)

           --

price

  Money

  value

 

 

 

   currency

Object

 

String

 

 

 

String

Mandatory

 

Mandatory

 

 

 

Mandatory

Price of product


This parameter contains the amount to be charged to the customer and can have two places of decimal.
Example: 1.00


This parameter indicates the currency in which transaction amount is to be deducted.

         --

 

 

 

       INR

extendInfo

Object Optional Extended info of goods. For more details, please refer Table 5. below.  

 

Table 4: 'shippingInfo' Attribute Details

 

Attribute Data Type Mandatory / Optional Description Possible Values

merchantShippingId

String

Optional

Merchant shipping id

            --

trackingNo

String Optional

Tracking no of shipment

            --

carrier

String Optional

Shipping carrier name

            --

chargeAmount

   Money

   value

 

 

 

   currency

String

 

String

 

 

 

String

Optional

 

Mandatory

 

 

 

Mandatory

Shipping amount

 

This parameter contains the amount to be charged to the customer and can have two places of decimal.
Example: 1.00


This parameter indicates the currency in which transaction amount is to be deducted.

         INR

countryName

String Optional

Shipping country name

          --

stateName

String Optional

Shipping state name

           --

cityName

String Optional

Shipping city name

           --

address1

String Optional Shipping address 1           --
address2 String Optional

Shipping address 2

          --
firstName String

Optional

Receiver first name            --
lastName String 

Optional

Receiver last name            --

mobileNo

String Optional Receiver mobile no            --

zipCode

String Optional Receiver zip code            --

email

String Optional

Valid email of the user.

Example: abc@gmail.com

           --

 

 

Table 5: 'extendInfo' Attribute Details

 

Attribute Data Type Mandatory / Optional Description Possible Values

udf1

String Optional

User define parameter 1. Merchant will receive this parameter in the callback and transaction status API response.

                       --

udf2

String Optional User define parameter 2. Merchant will receive this parameter in the callback and transaction status API response.                        --

udf3

String Optional User define parameter 3. Merchant will receive this parameter in the callback and transaction status API response.                        --

mercUnqRef

String Optional Merchant's reference text which comes in final response of Process Transaction API from Paytm.                        --

comments

String Optional Comments                        --

subwalletAmount

String Optional

This parameter is required to limit the maximum amount that could be deducted from a particular subwallet. This parameter is only used for payMode Balance (Paytm Wallet).

Note: As per compliance rules, you need to send the Food item amount separately to Paytm.

FOOD, GIFT, MULTI_PURPOSE_GIFT, TOLL, CLOSED_LOOP_WALLET, CLOSED_LOOP_SUB_WALLET, FUEL, INTERNATIONAL_FUNDS_TRANSFER, CASHBACK, GIFT_VOUCHER. e.g. "subwalletAmount":{ "FOOD": "2"}

 

Table 6: 'splitInfo' Attribute Details

 

Attribute Data Type Mandatory / Optional Description Possible Values

mid

String

Mandatory

Child mid

         --

partnerId

String

Conditional


Id created for child mid

         --

amount

 

 

  value

 

       currency

Object

 

 

String

 

 

String

Conditional

 

 

Mandatory

 

 

Mandatory

Share of child vendor in the split by amount base
Use: Only splitMethod is AMOUNT


This parameter contains the amount to be charged to the customer and can have two places of decimal.
Example: 1.00

 

This parameter indicates the currency in which transaction amount is to be deducted.

 

 

 

 

       INR

percentage

String

Conditional

Share of child vendor in the split by percentage base
Use: Only splitMethod is PERCENTAGE
         --

good

Object

Optional

Split merchant goods info list          --

shippingInfo

Object

Optional

Split merchant shipping info list          --

extendInfo

String Optional This contains the Map which needs to be sent by merchant (ref1, ref2,...,ref12) and contains keys (ref1, ref2,...,ref12) and their corresponding value.          --

 

 

Table 7: 'item' Attribute Details

Attribute Data Type Mandatory / Optional Description Possible Values

id

String

Mandatory

Any unique identifier for one item in the request e.g. in case of 2 items in the cart, the values can be sent as 1234 and 1236.

       --

productId

String Mandatory Unique product identifier for the merchant.        --

brandId

String Mandatory Product brand identifier for the merchant e.g. LG, Sony etc. Should be send in the request if EMI plans are configured with brand attribute.        --

categoryList

String Mandatory Product category identifiers for the merchant (categories can be Electronics, footwears etc). This should be sent in the request with same value which is configured in the EMI plan.         --

model

String Optional Model id of the product. This should be sent if the merchant's EMI plans are configured with model attribute.         --

ean

String Optional (Bar code Number) of product. This should be sent if the merchant's EMI plans are configured with EAN attribute.         --

price

Double Mandatory Cumulative price of the product (multiplied by quantity)          --

quantity

Int Mandatory Quantity of the product.quantity          --

offerDetails

 

   offerId

Object

 

String

Mandatory

 

Mandatory

OfferId that is enabled on the product


OfferId of the product

         --

 

 

 

    RESPONSE

Sample Response

{
    "head": {
        "responseTimestamp": "1526969112101",
        "version": "v1",
        "clientId": "C11",
        "signature": "TXBw50YPUKIgJd8gR8RpZuOMZ+csvCT7i0/YXmG//J8+BpFdY5goPBiLAkCzKlCkOvAQip/Op5aD6Vs+cNUTjFmC55JBxvp7WunZ45Ke2q0="
    },
    "body": {
        "resultInfo": {
            "resultStatus": "S",
            "resultCode": "0000",
            "resultMsg": "Success"
        },
        "txnToken": "fe795335ed3049c78a57271075f2199e1526969112097",
        "isPromoCodeValid": false,
        "authenticated": false
    }
}

 

Response Attributes

 

Content Type : JSON
 

Head
Attribute Data Type Description Possible Values
responseTimestamp String EPOCH timestamp at which response is sent.
Example: 1588402269
         --
version  String Version of the API.
Example: v1
         --
clientId String Paytm uses the Merchant Key on the basis of clientId parameter value. It requires only if the merchant has more than one key.          --
signature String You should validate the parameter values by verifying the signature comes in the response. It ensures that parameter values not tempered. Signature string can be verified by using Paytm checksum library.           --
Body
Attribute Data Type Description Possible Values

resultInfo

 

 

   resultCode

 


    resultStatus     

 

 

   resultMsg

 

 

 

   isRedirect

 

 

   bankRetry

 

    retry

Object

 

 

String

 

 

 

String

 

 

String

 

 

 

Boolean

 

 

Boolean

 

Boolean

 

Gives the information about the result of the API response.

 

 

This is the resultCode corresponding to a particular message and is returned to the merchant. The maximum length is 64. The different result codes corresponding to this API are mentioned below.

 

This parameter indicates the status of API call. 
 

This parameter is the result message which contains information about the result.The different result messages corresponding to this API are mentioned below.

 

This flag indicates that number of retries are over and user is to be redirected from cashier page.

 

This flag indicates that retry is allowed at bank's end or not.

 

This flag indicates that retry is allowed at bank's end or not.

 

        --

 

 

        --

 

 

    S, F, U

 

         --

 

 

         --

 

 

 

         --

 

         --

txnToken String

Unique transaction token received in the response of Initiate Transaction API. It is valid for 15 minutes.

Example: f0bed899539742309eebd8XXXX7edcf61588842333227

        --
authenticated Boolean True when ssoToken is provided in request and it is valid         --

 

 

 

 

 

 

Response Codes & Messages

List of Codes
Response Code Status Description
0000 Success  Success
0002 Success Success Idempotent
196 Failed Payment failed as the amount entered exceeded the allowed limit. Please enter a lower amount and try again or reach out to the merchant for further assistance.
1001 Failed Request parameters are not valid
1006 Failed Your Session has expired
1007 Failed Missing mandatory element
1008 Failed Pipe character is not allowed
1009 Failed Promo code request is not valid
1011 Failed Invalid Promo Param
1012 Failed Promo amount cannot be more than transaction amount.
2004 Failed SSO Token is invalid
2005 Failed Checksum provided is invalid
2007 Failed Txn amount is invalid
2013 Failed MID in the query param doesn’t match with the Mid sent in the request
2014 Failed OrderId in the query param doesn’t match with the OrderId sent in the request
2023 Failed Repeat Request Inconsistent
2100 Failed Link details are not valid.
00000900 Failed System error