Update Transaction API

Use Case


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

Request Attributes

API Content format: JSON

Head

PARAMETERDESCRIPTIONREQUIRED
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)YES
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 C11YES
signature stringChecksum string created by using paytm checksum logic/libraryYES

Body

PARAMETERDESCRIPTIONREQUIRED
txnAmount MoneyTxn AmountNO
goods List<GoodsInfo>Goods informationNO
shippingInfo List<ShippingInfo>Shipping informationNO
extendInfo ExtendInfoExtended informationNO

Money

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

ExtendInfo

PARAMETERDESCRIPTIONREQUIRED
udf1 stringTUser 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

PARAMETERDESCRIPTIONREQUIRED
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

PARAMETERDESCRIPTIONREQUIRED
merchantShippingId stringMerchant shipping idYES
trackingNo stringTracking no 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

API Content format: JSON

Head

PARAMETERDESCRIPTIONREQUIRED
responseTimestamp stringTimestamp at which response was sentYES
version stringApplication versionYES
clientId stringClientId by which key checksum is created, required to validate the checksum. Eg C11YES
signature stringChecksum string created by using paytm checksum logic/libraryYES

Body

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

ResultInfo

PARAMETERDESCRIPTIONMANDATORY
resultStatusString (S(Success), F(Failure), U(Unknown))Status of API callYes
resultCodestringResult code returned to merchant . Max length of result code can be 64Yes
resultMsgstring (Max length can be 256])Result Message contains information about the result.Yes

Update Transaction Response Codes and Messages

RESPONSEDESCRIPTIONMESSAGE
1006Session Expired ExceptiontxnToken sent in request has expired or is invalid
2013Mid in the query param doesn’t match with the Mid send in the requestDifferent mid's sent in initiate transaction request and updateTransactionRequest
2014OrderId in the query param doesn’t match with the OrderId send in the requestDifferent orderId's sent in initiate transaction request and updateTransactionRequest
0000900System errorSystem error
0000SuccessSuccess operation

Endpoints

Staging: http://securegw.stage.paytm.in/theia/api/v1/updateTransactionDetail?mid=<mid>&orderId=<orderId>

Production: http://securegw.paytm.in/theia/api/v1/updateTransactionDetail?mid=<mid>&orderId=<orderId>

Request CodeResponse JSON
curl -X POST 'https://securegw-stage.paytm.in/theia/api/v1/updateTransactionDetail?mid=TIMESI54326042593468&orderId=ORDER_20190413205821' --header 'Content-Type: application/json' --data '{"body":{"txnAmount":{"value":"200.00","currency":"INR"},"userInfo":{"custId":"CUST002"}},"head":{"clientId":"C11","version":"v1","requestTimestamp":1555169692,"channelId":"WEB","txnToken":"17f0a01766dd49a993d703b624dde20a1555169345450","signature":"o1pU4aXw2qBzBtYdeJ3nYP5y5TsyvIGW9V6OoCXdYkIYEjhAUvpJjJN0aPaR1Qjo2KWHDdnu6Sa3x+i14Arvi/R/o0SHO7Lj9e1dsr4xt2U="}}'