search
Your Paytm for business app is working and will keep working beyond March 15th, 2024. Click to know more

POSTModify Order API

Use Case

OrderModify can be used by merchants to update certain details such as Order Amount, Goods Info, etc for a particular order ID. For example, a user adds a certain product in the cart for Rs. XXX amount. At this instance, if the user increases the item quantity in the cart, the total order amount gets updated. At this stage, the merchant needs to call the OrderModify API of AI Router which will update the Order Amount and the goods info on the same Order ID which was created during InitiateTransaction. 

 

Key highlights:

  • Merchants can call the Order Modify API only when the user has added the products to the cart and before the payment hit - No modification of the order is possible post-payment initiation.
  • The total number of attempts for Order Modify API call is restricted to 5 times per order only. 
     

Request Attributes

Content Type : JSON

Head

AttributeDescription
channelId
Enum
optional

DeviceName from which request is sent.

 

Possible Values: APP, WEB, WAP

requestTimeStamp
string
optional

EPOCH timestamp of the time at which request is being sent.

tokenType
string
mandatory

Token Type 

 

Eg. TXN_TOKEN

token
string
mandatory

Transaction Token

signature
string
optional

Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request.

Body

AttributeDescription
txnAmount
Money
optional

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

 

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

TxnAmount
+
AttributeDescription
value
string
mandatory

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

currency
string
mandatory

This parameter indicates the currency in which transaction amount is to be deducted.
Possible Values: INR

goodsInfo
Array of GoodsInfo
optional

This contain the goods info for an order

GoodsInfo
+
AttributeDescription
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
object
mandatory

Price of product

Money
+
AttributeDescription
value
string
mandatory

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

currency
string
mandatory

This parameter indicates the currency in which transaction amount is to be deducted.
Possible Values: INR

extendInfo
object
optional

Extended info of goods

ExtendedInfo
+
AttributeDescription
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).

Possible Keys: 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"}

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

shippingInfo
Array of ShippingInfo
optional

This contain the shipping info for an order.

ShippingInfo
+
AttributeDescription
merchantShippingId
string
optional

Merchant shipping id

trackingNo
string
optional

Tracking no of shipment

carrier
string
optional

Shipping carrier name

chargeAmount
object
optional

Shipping amount

Money
+
AttributeDescription
value
string
mandatory

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

currency
string
mandatory

This parameter indicates the currency in which transaction amount is to be deducted.
Possible Values: 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: vaibhav41094@gmail.com

extendInfo
Map
optional

Merchant can pass any order specific information that is required to be passed here.

Response Attributes

Content Type : JSON

Head

AttributeDescription
responseTimestamp
string

EPOCH timestamp of the time at which response is being sent.

signature
string

Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request.

Body

AttributeDescription
resultInfo
string

This parameter gives the information about the result of the API response

resultInfo
+
AttributeDescription
resultStatus
string

This parameter is the result specific to the phase of the transaction mentioned in the txnType field

resultCode
string

This is the resultCode corresponding to a particular message and is returned to the merchant. It's maximum length is 64.

resultMsg
string

This parameter is the result message which contains information about the result.

Response Codes & Messages

resultCoderesultStatusresultMsg
0000SSuccess
1006Ftoken sent in request has expired or is invalid
501FSystem Error
2013FDifferent mid sent in create order request and modify order request.
2014FDifferent orderId sent in create order request and modify order request.
1011FParameter illegal
2222FInvalid request body
1001FRequest parameters are not valid Note: If the value is not valid in the request parameter then the result message should be in the format of "Invalid {field name}" For example: Invalid tokenType, etc
1012Fparam missing
1111FOrder modification not allowed. Transaction already in process
1001FRequest parameters are not valid Note: If the value is not valid in the request parameter then the result message should be in the format of "Invalid {field name}" For example: Invalid currency, etc
2007FTxn amount is invalid
410Forder status is closed
201Forder is paid
⇾
Staging
Production
https://stage-router.paytm.in/aoa-acquiring-biz/v2/modifyOrder?mid={mid}&orderId={orderId}copy icon
REQUEST
RESPONSE
CURL
JAVA
NODE
PHP
PYTHON
DOTNET
curl --location --request POST 'https://stage-router.paytm.in/aoa-acquiring-biz/v2/modifyOrder?mid=YOUR_MID_HERE&orderId=Ravi1363' \
--header 'Content-Type: application/json' \
--data-raw '{"head": {"requestTimestamp": "2022-10-18T10:43:20+05:30","channelId": "WEB","token": "cb3db4af-3548-4eb7-bc03-0cd76173d447","tokenType": "TXN_TOKEN","signature": "CH"},"body": {"txnAmount": {"value": "3","currency": "INR"},"goodsInfo": [{"merchantGoodsId": "24525635625623","merchantShippingId": "564314314574327545","snapshotUrl": "[http://snap.url.com ]","description": "description","category": "travelling/subway","quantity": "3.2","unit": "Kg","price": {"currency": "INR","value": "199"},"extendInfo": {"udf1": "","udf2": "","udf3": "","udf4": "","udf5": ""}}],"shippingInfo": [{"merchantShippingId": "564314314574327545","trackingNo": "646431431322332133","carrier": "Federal Express","chargeAmount": {"currency": "INR","value": "1"},"countryName": "JP","stateName": "GA","cityName": "Atlanta","address1": "137 W San Bernardino","address2": "4114 Sepulveda","firstName": "Jim","lastName": "Li","mobileNo": "13765443223","zipCode": "310001","email": "abc@gmail.com"}],"extendInfo": {"udf1": "abc","udf2": "def","udf3": "xyz","mercUnqRef": "","comments": ""}}}

 

copy icon