Update Transaction API

Checksum required: Yes

Use Case


This API updates txnAmount , goods , shippingInfo , extendInfo in order details in Native flow.

Request Attributes

API Content format: JSON

Head

ATTRIBUTEDESCRIPTIONMANDATORY
txnToken stringUnique Transaction Token generated in initiateTransactionCall to PG. Merchant has to send back the same transaction token everytime in each subsequent API Call to communicate with PGYes
version stringApplication version(provided by paytm)No
channelId enum (APP, WEB, WAP, SYSTEM)Channel through which call initiatedYes
requestTimestamp stringUNIX timestamp of the time request is being sentNo
clientId stringClientId by which key checksum is created, required to validate the checksum. Eg C11No
signature stringChecksum string created by using paytm checksum logic/libraryYes

Body

ATTRIBUTEDESCRIPTIONMANDATORY
txnAmount MoneyTxn AmountNo
goods List<GoodsInfo>Goods informationNo
shippingInfo List<ShippingInfo>Shipping informationNo
extendInfo ExtendInfoExtended informationNo

Money

ATTRIBUTEDESCRIPTIONMANDATORY
currency enum (INR)currencyYes
value string (regexp = [0-9]+([.][0-9]{1, 2})?, length less than 16 characters)txn amountYes

ExtendInfo

ATTRIBUTEDESCRIPTIONMANDATORY
udf1 stringUser define parameter 1No
udf2 stringUser define parameter 2No
udf3 stringUser define parameter 3No
mercUnqRef stringUser define parameter 4No
comments stringCommentsNo
amountToBeRefunded stringflag used in case of subscription flow to set refunded amountNo

GoodsInfo

ATTRIBUTEDESCRIPTIONMANDATORY
merchantGoodsId stringUnique id for the goods item (item No)Yes
merchantShippingId stringShipping IdNo
snapshotUrl stringProduct Image URLNo
description stringDescription of productYes
category stringCategory of ProductYes
quantity stringQuantity orderedYes
unit stringUnit of quantity (KG/Liter)No
price MoneyPrice of productYes
extendInfo ExtendInfoExtended info of goodsNo

ShippingInfo

ATTRIBUTEDESCRIPTIONMANDATORY
merchantShippingId stringMerchant shipping idYes
trackingNo stringTracking number of shipmentNo
carrier stringShipping carrier nameNo
chargeAmount MoneyShipping amountNo
countryName stringShipping country nameYes
stateName stringShipping stateYes
cityName stringShipping cityYes
address1 stringShipping address 1Yes
address2 stringShipping address 2No
firstName stringReceiver first nameYes
lastName stringReceiver last nameYes
mobileNo stringReceiver mobile NoNo
zipCode stringReceiver zip codeYes
email stringReceiver emailNo

Response Attributes

Head

ATTRIBUTEDESCRIPTIONMANDATORY
responseTimestamp stringTimestamp at which response was sentYes
version stringApplication versionNo
clientId stringClientId by which key checksum is created, required to validate the checksum. Eg C11No
signature stringChecksum string created by using paytm checksum logic/libraryYes

Body

ATTRIBUTEDESCRIPTIONMANDATORY
resultInfo ResultInfoResult Info of API callYes
extraParamsMap Map<String, Object>Map for any Extra informationNo

ResultInfo

ATTRIBUTEDESCRIPTIONMANDATORY
resultCodeStringResult code returned to merchant . Max length of result code can be 64Yes
resultStatusString
(S:Success, F:Faliure, U:Unknown)
Status of API callYes
resultMsgString (256)Result Message contains information about the result.Yes

Response Codes and Messages

resultCoderesultStatusresultMsg
0000SSuccess operation
1006FtxnToken sent in request has expired or is invalid
2013FDifferent mid's sent in initiate transaction request and updateTransactionRequest
2014FDifferent orderId's sent in initiate transaction request and updateTransactionRequest
0000900USystem error

Endpoints

Staging: https://securegw-stage.paytm.in/theia/api/v1/updateTransactionDetail?mid=YOUR_MID_HERE&orderId=YOUR_ORDER_ID

Production: https://securegw.paytm.in/theia/api/v1/updateTransactionDetail?mid=YOUR_MID_HERE&orderId=YOUR_ORDER_ID

Request CodeResponse JSON
curl -X POST 'https://securegw-stage.paytm.in/theia/api/v1/updateTransactionDetail?mid=YOUR_MID_HERE&orderId=YOUR_ORDER_ID' --header 'Content-Type: application/json' --data '{"body":{"txnAmount":{"value":"2.00","currency":"INR"},"userInfo":{"custId":"CUSTOMER_ID"}},"head":{"txnToken":"TRANSACTION_TOKEN","signature":"GENERATED_CHECKSUM_VALUE"}}'