MMTC-PAMP API Documentation
MMTC-PAMP API Documentation
Version: v2.0
This documentation provides a comprehensive list of APIs that can be used by partners based
on their product flow and integration requirements. It outlines the necessary endpoints,
request/response structures, and authentication mechanisms to facilitate seamless
integration with our systems.
Usage Notice:
This documentation is intended for authorized partners only and should not be shared, published,
or distributed elsewhere without permission.
LOGIN/AUTHENTICATION API
Overview
This API allows partners to access resources / APIs in a secure and scalable way. The Login API
(POST /security/login) returns a session ID upon successful authentication. This session ID
must be included in the headers of all subsequent API requests to authenticate the user session.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
To generate the sessionId, MMTC-PAMP will provide the following access credentials:
• partner_id
• username
• password
How to Use:
• The username and password should be used as Basic Authentication credentials when
calling the /security/login endpoint.
• The partner_id must be passed in the headers of the request.
Module SECURITY
API Endpoint /security/login
1. (401) Unauthorized
Sample Error
2. (500) Internal Server Error
Response
Sample Success
200 OK {“sessionId”:” XXXXXXX”}
Response
Method POST
Overview
The below API allows partners to create / update / fetch / activate / inactivate the profiles of the
users/customers.
BASE_URL : https://cemuat.mmtcpamp.com
CREATE PROFILE API
Overview
This API allows partners to create the profiles of the users/customers.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
A) KYC STATUS: If validated (value will be “Y”), if “Y”, KYC_INFO object must be passed
B) KYC STATUS: If not validated (value will be “I”), if “I”, can ignore KYC_INFO object.
C) ZIP: Should be in number not STRING. You can fetch the other details like state-code, state,
city from an API (mentioned below in PVT section) and provide this in the billing/delivery
Address objects.
D) There should be one mobile number associated with one account only and the same with
customerRefNo .
Module CUSTOMER
API Endpoint /customer/createProfile
Sample Success
200 OK {"dgCustomerRefNo": "29RLIIQ5BKVJ"}
Response
curl --location 'https://cemuat.mmtcpamp.com/customer/createProfile'
Method POST
Overview
This API allows partners to update the profile of the user/customer.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module CUSTOMER
API Endpoint /customer/updateProfile
Sample Success
200 OK. Update successfully.
Response
curl --location 'https://cemuat.mmtcpamp.com/customer/updateProfile'
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDE0OTcxM30.SReDny8-
GIn8W85ZNX0DyY_J7TsXG2F59eDnf_Bs06Q'
Method POST
Overview
This API allows partners to get the the portfolio balabce of the user/customer.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module CUSTOMER
{
"customerName": "Tarun Aggarwal",
"kycStatus": "Y",
"balances": [{
"balQuantity": "149.8740",
Sample Success "currencyPair": "XAU/INR",
Response "blockedQuantity": "0.0000"},
{"balQuantity": "96.2000",
"currencyPair": "XAG/INR",
"blockedQuantity": "0.0000" }
]
}
curl --location 'https://cemuat.mmtcpamp.com/customer/getPortfolio' \
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
Curl Request
RhY2tfRmluYW5jZSIsImlhdCI6MTc0NzExNjcxN30._yfPATFxPA5cjlY0wMHX6
7ldlpICGl3FwloxMlunlTo' \
--data '{
"customerRefNo": "cxodwmxow3seA"
}'
Method POST
Mandatory 1-customerRefNo
Parameters 2-sessionId passed in the cookie In Headers
Overview
This API allows partners to get the profile details of the user/customer.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module OAT
--data ''
Method POST
Mandatory Customer Ref Number or customer mobile no. In the headers, Refer to curl
Parameters request.
Overview
This API allows partners to Activate / Unblock the user account status.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module CUSTOMER
Sample Success
200 OK
Response
Method POST
Mandatory
Customer Ref Number In the headers, Refer to curl request.
Parameters
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module CUSTOMER
Sample Success
200 OK
Response
--header 'mobileNumber;'
Curl Request
--header 'Accept: application/json'
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDE0OTcxM30.SReDny8-
GIn8W85ZNX0DyY_J7TsXG2F59eDnf_Bs06Q'
Method POST
Mandatory Customer Ref Number Or Mobile Number to be passed the headers, Refer to curl
Parameters request.
Overview
This API allows partners to Validate KYC of the User. Although, UpdateProfile API can also validate
KYC
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module CUSTOMER
Sample Success
200 OK
Response
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDE0OTcxM30.SReDny8-
GIn8W85ZNX0DyY_J7TsXG2F59eDnf_Bs06Q'
Method POST
Mandatory Customer Ref Number Or Mobile Number to be passed the headers, Refer to curl
Parameters request.
Overview
This API allows partners to Invalidate KYC of the User. Although, UpdateProfile API can also
Invalidate KYC.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module CUSTOMER
--header 'mobileNumber;'
Curl Request
--header 'Accept: application/json'
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDE0OTcxM30.SReDny8-
GIn8W85ZNX0DyY_J7TsXG2F59eDnf_Bs06Q'
Method POST
Mandatory Customer Ref Number or Mobile Number to be passed the headers, Refer to curl
Parameters request.
Overview
This API allows partners to get the historical price of gold metal.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PRICE
Sample Error "code": 39: "timeFrame must be equal to one of the allowed values" ,
Response "code": "500": "An Application Error has occurred."
[
{
"buy_pretax": 6315.55,
"date_time": "20230317"
},
{
"buy_pretax": 6396.37,
"date_time": "20230318"
Sample Success
},
Response
{
"buy_pretax": 6396.54,
"date_time": "20230319"
},
{
"buy_pretax": 5910.88,
"date_time": "20230320"
}]
Method POST
Mandatory timeFrame
Parameters sessionId (Cookie)
Overview
This API allows partners to get the historical price of silvermetal.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PRICE
API Endpoint /XAG/INR
Sample Error "code": 39: "timeFrame must be equal to one of the allowed values" ,
Response "code": "500": "An Application Error has occurred."
[{
"buy_pretax": 6315.55,
"date_time": "20230317"
Sample Success },
Response {
"buy_pretax": 6396.37,
"date_time": "20230318"
}]
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDE0OTcxM30.SReDny8-
GIn8W85ZNX0DyY_J7TsXG2F59eDnf_Bs06Q'
Method POST
Mandatory timeFrame
Parameters sessionId (Cookie)
Overview
his API lets partners verify if a pincode is serviceable and retrieve related details like state code and
state name, which can be used in the Create Profile API.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint / pvt/isPinCodeServiceable?pincode=110006"
"39" "must have required property 'pin code' "
Sample Error
"06" "Pincode is invalid"
Response
"500" "An Application error has occurred"
{
"serviceable": true,
"pincode": "110094",
Sample Success "state": "DELHI",
Response "statecode": 7,
"city": "East Delhi",
"deliveryInDays": 10
}
curl --location
'https://cemuat.mmtcpamp.com/pvt/isPinCodeServiceable?pinCode=590011
'
Method GET
Mandatory pinCode in search query i.e. "pvt/isPinCodeServiceable?pincode=110006"
Parameters sessionId (Cookie)
Overview
This API lets partners get the Address Details of the customer.
How to Send Session ID in Request Headers
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint / pvt/getAddresses
{"code": "06": "CustomerRefNo is invalid"}
Sample Error
{"code": "03": "Session Id Invalid"},
Response
{"code": "500", "An Application Error has occurred."}
[
{
"id": "MkevMfR5_fyIYcaTtMUpJ",
"name": "Sparsh Jain",
"line1": "E1-22, Sector 14",
"line2": "Panjab University, Sector 14",
"city": "Chandigarh",
"state": "Chandigarh",
"zip": 160014,
"country": "India",
"mobileNumber": "6283763297",
Sample Success "statecode": "12",
Response "type": "B",
"customerRefNo": "29RLIIQ5BKVJ"
},
{
"id": "ZiAZXtUncIXgomO-S_W8N",
"name": "Prashant Chauhan",
"line1": "laxmi nagar",
"line2": "new delhi",
"city": "delhi",
"state": "delhi",
"zip": 110092,
"country": "India",
"mobileNumber": "9718957271",
"statecode": "07",
"type": "D",
"customerRefNo": "29RLIIQ5BKVJ"
}
]
Method POST
1- Need to pass inside the request body : "customerRefNo":
Mandatory
"PTM_1234567890"
Parameters
2- sessionId (Cookie)
Note: In the response of getAddress Api, an object which has type as ‘B’, is Billing Address object and
an object which has type as ‘D’, is Delivery Address object.
Overview
This API lets partners delete the Address Details of the customer.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint / pvt/deleteAddresses
Method POST
Mandatory
Unique id of the address object
Parameters
Note: The id, which is mandatory in the request body, is the Id you can get from getAddresses Api.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint / pvt/addUpdateAddress
--data '{ "id": "", "name": "Prashant kumar", "line1": "delivery laxmi nagar
West Delhi", "line2": "West Delhi", "city": "West Delhi", "state": "DELHI", "zip":
110041, "country": "India", "mobileNumber": "9718957271", "statecode":
"07", "type": "D", "customerRefNo": "STF_000001" }'
Method POST
Mandatory "city","country","customerRefNo","line1","mobileNumber", "name", "state",
Parameters "statecode","type", "zip"
Note: If the request body includes the field "id" (with its value obtained from the Get Addresses
API), the API will update the existing address. If "id" is not provided, the API will add a new address.
1. trade/getQuoteBuy 1. trade/getQuoteBuy
2- trade/validateQuotePartnerPg 2. trade/validateOrderAndExecute
FOR BUY
3-trade/executeOrderPartnerPg 3. trade/executeOrderWithPayIn
FOR SELL
1. trade/getQuoteSell 1. trade/getQuoteSell
2. trade/executeOrderPartnerPg 2. trade/executeOrderWithPayOut
1-redeem/getRedemptionCatalog
1- redeem/getRedemptionCatalog
2- 2- ValidateAndCreateRedeemOrder
REDEEM redeem/validateRedeemOrderForPart 3- redeem/executeRedeemOrder
nerPg
3-
redeem/executeRedeemOrderForPart
nerPg
Overview
This API is used to get nonexecutable Quotes for buy and sell also currencyPair can be passed to get
quotes for gold and silver respectively.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint / pvt/ getNonExecutableQuote
Method POST
Mandatory "currencyPair": "XAU/INR" for gold or “XAG/INR” for silver,
Parameters "type": "BUY" or “SELL”
NOTE: The getNonExecutableApi can be used to show the live price of the metal to the
user/customer.
Overview
This API is used for getting the Buy Quote for a customer without passing his profile details. An RFQ
quote number is returned in response which then can be confirmed using validateQuoteAPI. The
quote returned is for 1 Gram quantity based and for CGST/SGST customer.
How to Send Session ID in Request Headers
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint / pvt/getQuoteBuy
code 39 : will be common for any required property missing in the payload: must
Sample Error
have required property 'property name'.
Response
Code 6: Invalid currencyPair.
Code 500: An Application Error has occurred
{
"totalAmount": "6105.73",
"quantity": "1.0000",
"quoteValidityTime": "480000",
"taxType": "CGST/SGST",
"tax1Amt": "88.92",
"tax2Amt": "88.92",
Sample Success "tax1Perc": "1.50",
Response "tax2Perc": "1.50",
"preTaxAmount": "5927.89",
"taxAmount": "177.84",
"quoteId": "MPLXpSCMI3gCjv8o1AInbtAia",
"type": "BUY",
"createdAt": "2023-04-04T07:58:30.039Z",
"currencyPair": "XAU/INR"
}
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDE0OTcxM30.SReDny8-
GIn8W85ZNX0DyY_J7TsXG2F59eDnf_Bs06Q'
Method POST
"customerRefNo": "STF_te23nfk599",
"currencyPair": "XAU/INR",
Mandatory
"transactionRefNo": "fed71ea9-b190-42f3-97d9-9086fd4a97b9",
Parameters
"value": "1000000", //not mandatory but used for calculation
"type":"A" // not mandatory but used for calculation
Note: The quotation is generated for 1 gram always. Partner has to calculate the total amount
(rounded up to 2 decimals), preTax(rounded up to 2 decimals), tax1(rounded up to 2 decimals),
tax2(rounded up to 2 decimals), and quantity (rounded up to 4 decimals) then call the validate quote
API. The quotation is valid for 8 min only. The process from quote generation to verifying the
payment(executeOrderAPI) must be done within 8 min of the window.
Overview
This API will fetch the OrderId from Payment Partner and return it back. This will be used for PayIn
integration as providing Order Id for trade. Additionally quote details provided will be validated and
error will be returned if validation fails
To be called only once customer confirms for the final purchase option for a quote.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/validateOrderAndExecute
Curl Request
curl --location
'https://cemuat.mmtcpamp.com/trade/validateOrderAndExecute' \
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
--data '{
"customerRefNo": "STF_000001",
"billingAddressId": "es8vu76axhMau64fjYTGq",
"calculationType": "A",
"preTaxAmount": "5665.85",
"quantity": "1.0000",
"quoteId": "STFt1fFJOfwYCsp7SCOXmS4Jb",
"tax1Amt": "84.99",
"tax2Amt": "84.99",
"tax3Amt": "5.10",
"transactionDate": "2023-04-27T09:34:46.435Z",
"transactionOrderID": "103879a9-85af-4749-b8dd-d40f81782dea",
"totalAmount": "5835.82"
}'
Method POST
{
Mandatory "customerRefNo": "",
Parameters "billingAddressId": "",
"calculationType": "",
"preTaxAmount": "",
"quantity": "",
"quoteId": "",
"tax1Amt": "",
"tax2Amt": "",
"transactionDate": "",
"transactionOrderID": "",
"totalAmount": ""
}
NOTE : The validateOrderAndExecute API is used to validate the quotation in case a partner is using
our PG to BUY the digital metal. This API will create an Order_ID on PG and return that order_id with
the PG key which then is passed to PG SDK to accept the payment from the customer.
Overview
Quote validated in the validateCreateOrder will be passed here along with the payment details
received from PG partner. This API will validate the payment response and execute the quote for
customer and credits gold to his account.
Additionally, this API will be validating the payment details passed through this via signature for Pay
In Module
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/executeOrderWithPayIn
39': error code will be common for any required property missing in the payload:
must have required property 'property name'.
"53": "Transaction date invalid"
"71": "Quote is currently under execution"
'500': "Duplicate request found. Request will not be processed"
'23': "QuoteID Invalid"
Sample Error
'43': "Error in processing request, payload is wrong"
Response
'86': "payment order details provided are incorrect or already processed"
'51': "Billing addresses is Missing"
'89': "Error processing auto-refund"
'109': "Cannot update user balance"
'101': "OrderType is invalid"
'03': Session id Invalid/Missing
curl --location
'https://cemuat.mmtcpamp.com/trade/executeOrderWithPayIn' \
--data '{
"customerRefNo": "STF_000001",
"billingAddressId": "es8vu76axhMau64fjYTGq",
Method POST
{
"customerRefNo": "string",
"billingAddressId": "string",
"payIn": {
"pgPaymentId": "string",
"pgOrderId": "string",
"pgSignature": "string",
"pgProvider": "string",
"pgAmount": "string"
Mandatory },
Parameters "calculationType": "string",
"preTaxAmount": "string",
"quantity": "string",
"quoteId": "string",
"tax1Amt": "string",
"tax2Amt": "string",
"transactionDate": "string",
"transactionOrderID": "string",
"totalAmount": "string"
}
NOTE: This API is used to validate the payment in case a partner is using our PG to BUY the digital
metal.Quote validated in the validateOrderAndExecute will be passed here along with the payment
details received from PG partner. This API will validate the payment response and execute the quote
for customer and credits gold to his account.
Additionally, this API will be validating the payment details passed through this via signature for Pay
In Module.
Overview
This API is used for getting the Sell Quote for a customer without passing his profile details. An RFQ
quote number is returned back in response of executeOrder API.The quote returned is for 1 Gram
quantity based and for CGST/SGST customer
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint / pvt/getQuoteSell
code 39 : will be common for any required property missing in the payload: must
Sample Error
have required property 'property name'.
Response
Code 6: Invalid currencyPair.
Code 500: An Application Error has occurred
{
"totalAmount": "5258.06",
"quantity": "1.0000",
Sample Success
"quoteValidityTime": "480000",
Response
"taxType": "CGST/SGST",
"tax1Amt": "0.00",
"tax2Amt": "0.00",
"tax3Amt": "1025.00",
"tax1Perc": "0.00",
"tax2Perc": "0.00",
"preTaxAmount": "5258.06",
"taxAmount": "0.00",
"quoteId": "PTM1YBMHtlOwgC52dokNOShDg",
"type": "SELL",
"createdAt": "2023-03-27T10:42:13.071Z"
}
--header 'Cookie:
Curl Request sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDE0OTcxM30.SReDny8-
GIn8W85ZNX0DyY_J7TsXG2F59eDnf_Bs06Q'
Method POST
"customerRefNo": "STF_te23nfk599",
Mandatory "currencyPair": "XAU/INR",
Parameters "transactionRefNo": "b7d241ac-24ca"
"value": "1000000", //not mandatory but used for calculation
"type":"A" // not mandatory but used for calculation
Note: The quotation is generated for 1 gram always. Partner has to calculate the total amount
(rounded up to 2 decimals), preTax(rounded up to 2 decimals), tax1(rounded up to 2 decimals),
tax2(rounded up to 2 decimals), and quantity (rounded up to 4 decimals) then call the execute order
with payout API. The quotation is valid for 8 min only.
2-EXECUTE ORDER WITH PAYOUT API
Overview
This API is used for getting the Sell Quote for a customer without passing his profile details. An RFQ
quote number is returned back in response of executeOrder API.The quote returned is for 1 Gram
quantity based and for CGST/SGST customer
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ executeOrderWithPayOut
curl --location
'https://cemuat.mmtcpamp.com/trade/executeOrderWithPayOut' \
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Curl Request Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
"calculationType": "string", "customerRefNo": "string","otp": "","payOut":
{"customerAccountInfo": {"name": "string","accountNumber": "string","ifsc":
Mandatory
"string","vpa": "string"},"paymentChannel": "string"},"preTaxAmount":
Parameters
"string","quantity": "string","quoteId": "string","tax1Amt": "string","tax2Amt":
"string","transactionDate": "string","transactionOrderID": "string","totalAmount":
"string"}
Overview
This API is used to get all redeemable products.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module REDEEM
API Endpoint /redeem/getRedemptionCatalog
Sample Error
99 : Product Catalog doesnt exist
Response
Sample Success [ { "productId": "248309", "name": "GOLD,999.9,RACTANGULAR INGOT,10.0 GM,
Response
F1AU10110339 : FINAL DESIGN,DOMESTIC MINTING
DESIGN,GOLD,999.9,RACTANGULAR INGOT,10.0 GM,MMTC PAMP INDIA PVT.
LTD.,BY MPIPL", "description": "
Method POST
Mandatory
SESSION_ID in headers
Parameters
2-VALIDATE AND CREATE REDEEM ORDER API
Overview
This API is used Validate redeem order details and create a payment order for it .
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module REDEEM
API Endpoint /redeem/ validateAndCreateRedeemOrder
"03": "Session ID Missing"
'33': "Invalid Payload"
'40': "Insufficient Balance"
'43': "Error in processing request, payload is wrong"
'06': "CustomerRef NO is invalid"
'65': "Pincode not deliverable"
Sample Error
'49': "Invalid Product"
Response
'50': "Invalid Quantity or Making charge for Product"
'99': "Error in creating order at liferay"
'48': "Multiple requests found"
'500': "An Application Error has occurred"
"74": "Duplicate transactionRefNo/clientOrderId"
"500:An Application Error has occurred (In case of system issue)"
curl --location
'https://cemuat.mmtcpamp.com/redeem/validateAndCreateRedeemOrder' \
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
Curl Request RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
{
"customerRefNo": "{{customerRefNo}}",
"transactionRefNo": "{{$randomUUID}}",
"productList": [
Mandatory {
Parameters "productId": "244790",
"quantity": "1",
"makingCharge": "510",
"skuId": "AXYyCPG.975410471234"
}
],
"billingAddressId": "{{billingAddressId}}",
"shippingAddressId": "{{shippingAddressId}}",
"totalAmount": "510",
"preTaxAmount": "432.20",
"taxAmount": "77.80"
}
Overview
This API is used to Execute a redeem order and store it in the database.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module REDEEM
API Endpoint /redeem/ executeRedeemOrder
'86':"payment order details provided are incorrect or already processed"
'23':"QuoteID or orderID invalid"
'39':"Order is already confirmed."
Sample Error '101':"OrderType is invalid"
Response '40':"Insufficient balance"
'99':"Error while updating order in liferay"
'109':"Error while updating user balance"
"500:An Application Error has occurred (In case of system issue)"
{ "quoteId": "STFPALABL21OQUT", "orderId": "STF2QZ5OM9XH7ME",
"pgOrderId": "order_LaQLlvdLFL8NaV", "key": "rzp_test_XnlOuOZNrannpU",
"balances": [ { "balQuantity": "2.0000", "currencyPair": "XAU/INR",
"blockedQuantity": "2.0000" }, { "balQuantity": "0.0000", "currencyPair":
"XAG/INR", "blockedQuantity": "0.0000" } ], "silverMakingCharges": "0.00",
"goldMakingCharges": "432.20", "silverQuantity": 0, "goldQuantity": 1,
"productList": [ { "weight": "1", "makingCharges": "510", "skuId":
"AXYyCPG.975410471234", "availableStock": "138", "maxQuantity": "138",
Sample Success
"taxPercentage": "18", "images": [ { "src":
Response
"https://commerceuat.mmtcpamp.com/o/commerce-media/accounts/-
1/images/244805?download=false", "title": "lotus_ingot_1g_gold_front.webp",
"priority": 0 } ], "deliveryInDays": "2023-04-16T07:30:50.567Z", "preTaxAmount":
"432.20", "taxAmount": "77.80", "dimension": "5mm", "shape": "Coin", "purity":
"500", "currencyPair": "XAU/INR" } ], "goldTax": "77.80", "silverTax": "0.00",
"goldPreTaxAmount": "432.20", "silverPreTaxAmount": "0.00", "redeemOrderId":
"3947964" }
curl --location
'https://cemuat.mmtcpamp.com/redeem/executeRedeemOrder' \
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
Curl Request
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
{"payIn": {"pgPaymentId": "pay_LaQP8eOmcMZYXP","pgOrderId":
Mandatory
"order_LaQLlvdLFL8NaV","pgSignature":
Parameters
"67234acc5b19acac1236280e5f40e5a66072060211f736b5feed735eba150903",
"pgProvider": "razorpay", "pgAmount": "510"},
"orderId":"STF2QZ5OM9XH7ME",
"quoteId": "STFPALABL21OQUT",
"transactionDate": "2023-04-06T07:36:32.757Z",
"transactionOrderID": "fc40bb79-35fe-4ae5-8220-da541002df46"
}
Overview
This API is used for getting the Buy Quote for a customer without passing his profile details. An RFQ
quote number is returned in response which then can be confirmed using validateQuoteAPI. The
quote returned is for 1 Gram quantity based and for CGST/SGST customer.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint / pvt/getQuoteBuy
code 39 : will be common for any required property missing in the payload: must
Sample Error
have required property 'property name'.
Response
Code 6: Invalid currencyPair.
Code 500: An Application Error has occurred
Sample Success {
Response "totalAmount": "6105.73",
"quantity": "1.0000",
"quoteValidityTime": "480000",
"taxType": "CGST/SGST",
"tax1Amt": "88.92",
"tax2Amt": "88.92",
"tax1Perc": "1.50",
"tax2Perc": "1.50",
"preTaxAmount": "5927.89",
"taxAmount": "177.84",
"quoteId": "MPLXpSCMI3gCjv8o1AInbtAia",
"type": "BUY",
"createdAt": "2023-04-04T07:58:30.039Z",
"currencyPair": "XAU/INR"
}
--header 'Cookie:
Curl Request sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDE0OTcxM30.SReDny8-
GIn8W85ZNX0DyY_J7TsXG2F59eDnf_Bs06Q'
Method POST
"customerRefNo": "STF_te23nfk599",
"currencyPair": "XAU/INR",
Mandatory
"transactionRefNo": "fed71ea9-b190-42f3-97d9-9086fd4a97b9",
Parameters
"value": "1000000", //not mandatory but used for calculation
"type":"A" // not mandatory but used for calculation
Note: The quotation is generated for 1 gram always. Partner has to calculate the total amount
(rounded up to 2 decimals), preTax(rounded up to 2 decimals), tax1(rounded up to 2 decimals),
tax2(rounded up to 2 decimals), and quantity (rounded up to 4 decimals) then call the validate quote
API. The quotation is valid for 8 min only. The process from quote generation to verifying the
payment(executeOrderAPI) must be done within 8 min of the window.
Overview
This API is used to validate the quotation in case a partner is using their own PG to BUY the digital
metal. This API will varify the validity of the quotation and pricing details and taxes and returns "Data
Validated" if everything seems good.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/validateQuotePartnerPg
03': Session id Invalid/Missing
"68": "Mismatch Present for quote. Parameter {0} "
'69': "Deal Rejected while conversion during Tax Calculation"
Sample Error
'23': "QuoteID invalid"
Response
'53': "Transaction Date Invalid"
'39': error code will be common for any required property missing in the payload:
must have required property 'property name'.
Sample Success
200 Data Validated
Response
curl --location
'https://cemuat.mmtcpamp.com/trade/validateQuotePartnerPg' \
Curl Request
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
{
"customerRefNo": "{{customerRefNo}}",
"calculationType": "Q",
"preTaxAmount": "936049.50",
"quantity": "150.0000",
Mandatory "quoteId": "PTMgyuCtlvNKjK9B1xovWic8a",
Parameters "tax1Amt": "14040.00",
"tax2Amt": "14040.00",
"transactionDate": "2023-03-24T08:51:56.469Z",
"transactionOrderID": "3c30177f-1e97-4638-b322-22d0b556dc03",
"totalAmount": "964131.00"
}
Overview
Quote validated in the validateQuotePartnerPg will be passed here. This API will validate the quote
details and execute the quote for customer and credits gold to his account.(This API is used in both
cases for buy and sell.)
How to Send Session ID in Request Headers
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ executeOrderPartnerPg
"68": "Mismatch Present for quote. Parameter {0} "
'69': "Deal Rejected while conversion during Tax Calculation"
'23': "QuoteID Invalid"
'06': "CustomerRefNo is Invalid"
'34': "Insufficient Balance"
'39': "Customer is not Active"
Sample Error
'48': "Amount is less than Minimum Transaction Amount"
Response
'53': "Transaction Date Invalid"
'71': "Quote is Currently Under Execution"
'39': error code will be common for any required property missing in the payload:
must have required property 'property name'.
500:An Application Error has occurred (In case of system issue)
03: SessionId missing
curl --location
Curl Request
'https://cemuat.mmtcpamp.com/trade/executeOrderPartnerPg' \
--header 'Content-Type: application/json' \
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
{
"customerRefNo": "{{customerRefNo}}","calculationType":
"Q","billingAddressId": "XR8hDrjrFu80-4bamQNOv","preTaxAmount":
"862312.50","quantity": "150.0000","quoteId":
Mandatory "PTMoVHy0dL9oncjtgekAgiqjO","tax1Amt": "12934.50","tax2Amt":
Parameters "12934.50","transactionDate": "2023-03-
28T08:13:20.869Z","transactionOrderID": "b2b8ed02-efc7-4211-9a19-
6d3c145cfca8",
"totalAmount": "888181.50"
}
NOTE: Quote validated in the validateQuotePartnerPg will be passed here. This API will validate the
quote details and execute the quote for customer and credits gold to his account.(This API is used in
both cases for buy and sell.)
Overview
This API is used for getting the Sell Quote for a customer without passing his profile details. An RFQ
quote number is returned back in response of executeOrder API.The quote returned is for 1 Gram
quantity based and for CGST/SGST customer
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint / pvt/getQuoteSell
code 39 : will be common for any required property missing in the payload: must
Sample Error
have required property 'property name'.
Response
Code 6: Invalid currencyPair.
Code 500: An Application Error has occurred
{
"totalAmount": "5258.06",
"quantity": "1.0000",
"quoteValidityTime": "480000",
"taxType": "CGST/SGST",
"tax1Amt": "0.00",
"tax2Amt": "0.00",
Sample Success "tax3Amt": "1025.00",
Response "tax1Perc": "0.00",
"tax2Perc": "0.00",
"preTaxAmount": "5258.06",
"taxAmount": "0.00",
"quoteId": "PTM1YBMHtlOwgC52dokNOShDg",
"type": "SELL",
"createdAt": "2023-03-27T10:42:13.071Z"
}
curl --location 'https://cemuat.mmtcpamp.com/trade/getQuoteSell'
--header 'Cookie:
Curl Request sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDE0OTcxM30.SReDny8-
GIn8W85ZNX0DyY_J7TsXG2F59eDnf_Bs06Q'
Method POST
"customerRefNo": "STF_te23nfk599",
Mandatory "currencyPair": "XAU/INR",
Parameters "transactionRefNo": "b7d241ac-24ca"
"value": "1000000", //not mandatory but used for calculation
"type":"A" // not mandatory but used for calculation
Note: The quotation is generated for 1 gram always. Partner has to calculate the total amount
(rounded up to 2 decimals), preTax(rounded up to 2 decimals), tax1(rounded up to 2 decimals),
tax2(rounded up to 2 decimals), and quantity (rounded up to 4 decimals) then call the execute order
with payout API. The quotation is valid for 8 min only.
Overview
Quote validated in the validateQuotePartnerPg will be passed here. This API will validate the quote
details and execute the quote for customer and credits gold to his account.(This API is used in both
cases for buy and sell.)
How to Send Session ID in Request Headers
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ executeOrderPartnerPg
"68": "Mismatch Present for quote. Parameter {0} "
'69': "Deal Rejected while conversion during Tax Calculation"
'23': "QuoteID Invalid"
'06': "CustomerRefNo is Invalid"
'34': "Insufficient Balance"
'39': "Customer is not Active"
Sample Error
'48': "Amount is less than Minimum Transaction Amount"
Response
'53': "Transaction Date Invalid"
'71': "Quote is Currently Under Execution"
'39': error code will be common for any required property missing in the payload:
must have required property 'property name'.
500:An Application Error has occurred (In case of system issue)
03: SessionId missing
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Curl Request Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
{
"customerRefNo": "{{customerRefNo}}","calculationType":
"Q","billingAddressId": "XR8hDrjrFu80-4bamQNOv","preTaxAmount":
"862312.50","quantity": "150.0000","quoteId":
Mandatory "PTMoVHy0dL9oncjtgekAgiqjO","tax1Amt": "12934.50","tax2Amt":
Parameters "12934.50","transactionDate": "2023-03-
28T08:13:20.869Z","transactionOrderID": "b2b8ed02-efc7-4211-9a19-
6d3c145cfca8",
"totalAmount": "888181.50"
}
NOTE: Quote validated in the validateQuotePartnerPg will be passed here. This API will validate the
quote details and execute the quote for customer and credits gold to his account.(This API is used in
both cases for buy and sell.)
TO EXECUTE THE REDEMPTION TRANSACTIONS USE BELOW API’S SEQUENCIALLY:
Overview
This API is used to get all redeemable products.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module REDEEM
API Endpoint /redeem/getRedemptionCatalog
Sample Error
99 : Product Catalog doesnt exist
Response
Method POST
Mandatory
SESSION_ID in headers
Parameters
\
Overview
This API is used Validate redeem order details .
How to Send Session ID in Request Headers
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module REDEEM
API Endpoint /redeem/validateRedeemOrderForPartnerPg
"40":"Insufficient balance"
"74":"Duplicate transactionRefNo/clientOrderId"
Sample Error '43':"Error in processing request, payload is wrong"
Response '99':"Error in creating order at liferay"
'06':"CustomerRefNo not found"
"500:An Application Error has occurred (In case of system issue)"
curl --location
'https://cemuat.mmtcpamp.com/redeem/validateRedeemOrderForPartnerP
g' \
Curl Request
--header 'Content-Type: application/json' \
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
{
"customerRefNo": "{{customerRefNo}}",
"transactionRefNo": "{{$randomUUID}}",
"productList": [
{
"productId": "244790",
"quantity": "1",
"makingCharge": "510",
Mandatory
"skuId": "AXYyCPG.975410471234"
Parameters
}
],
"billingAddressId": "{{billingAddressId}}",
"shippingAddressId": "{{shippingAddressId}}",
"totalAmount": "510",
"preTaxAmount": "432.20",
"taxAmount": "77.80"
}
Overview
Execute the redeem order after payment has been made and verified by the partner.
How to Send Session ID in Request Headers
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module REDEEM
API Endpoint /redeem/executeRedeemOrderForPartnerPg
23': "QuoteID or orderID invalid"
'39': "Order is already confirmed."
'101': "OrderType is invalid"
Sample Error
'40': "Insufficient balance"
Response
'99': "Error while updating order in liferay"
'109': "Error while updating user balance"
"500:An Application Error has occurred (In case of system issue)"
{
"billingAddressId": "es8vu76axhMau64fjYTGq",
"shippingAddressId": "es8vu76axhMau64fjYTGq",
"orderId": "STFT8JQ25M46BRK",
"makingCharges": 432.2,
"taxAmount": 77.8,
"totalAmount": 510,
"remainingBalance": [
{
Sample Success "balQuantity": "0.0000",
Response "currencyPair": "XAU/INR",
"blockedQuantity": "0.0000"
},
{
"balQuantity": "0.0000",
"currencyPair": "XAG/INR",
"blockedQuantity": "0.0000"
}
],
"createdAt": "2023-04-06T13:04:04.829Z"
}
curl --location
'https://cemuat.mmtcpamp.com/redeem/executeRedeemOrderForPartnerPg
'\
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Curl Request
Z7p1ywRa8AlBUDKTNY011X4zU' \
--data '{
"quoteId": "STF3CZ8R1AZ1DDA",
"transactionDate": "2023-04-018T12:00:00.129Z",
"transactionOrderID": "e6ebf87d-261e-4dc9-ac9d-0e187b20e45d"}'
Method POST
{
"quoteId": "STFIPJFRIL33GVK",
Mandatory
"transactionDate": "2023-04-06T07:43:43.129Z",
Parameters
"transactionOrderID": "{{$randomUUID}}"
}
Overview
This allows the transfer of the balance from the source customer account to the destination customer
account with immediate effect.
How to Send Session ID in Request Headers
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/transfer
"74": "Duplicate transactionRefNo/clientOrderId"
"04": "Source or Destination Customer not Found"
"40": "Insufficient balance at source"
'53': "Transaction Date Invalid"
'57': "Quantity can not be empty"
Sample Error '64': "Quantity should be more than zero."
Response '58': "KYC should be validated."
'59': "Currency pair invalid."
'39': error code will be common for any required property missing in the payload:
must have required property 'property name'.
500:An Application Error has occurred (In case of system issue)
03: SessionId missing
{
"orderId": "STF76JV7AQAUXVP",
"executionDateTime": "2023-03-30T07:14:54.887Z",
"totalAmount": "120.06",
Sample Success
"quantity": "2.0000",
Response
"pricePerG": "60.03",
"currencyPair": "XAG/INR",
"remainingBalance": "92.2000"
}
Method POST
{"channel": "",
"currencyPair": "",
"dstCustomerRefNo": "",
"quantity": "",
Mandatory
"srcCustomerRefNo": "",
Parameters
"transactionDate": "",
"transactionOrderID": "",
"message": ""
}
Overview
Designed to buy at the Partner Goldback account and transfer the same to the destination account
immediately. Initial validation of Transfer to destination is done, if failed the entire flow is aborted.
Validations for Buy will be applied.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/buyAndTransferPartnerPg
"04":"Source or Destination Customer not Found"
"40":"Insufficient balance at source"
'53':"Transaction Date Invalid"
'57':"Quantity can not be empty"
'64':"Quantity should be more than zero."
"68":"Mismatch Present for quote. Parameter {0}"
'69':"Deal Rejected while conversion during Tax Calculation"
Sample Error
'23':"QuoteID Invalid"
Response
'06':"CustomerRefNo is Invalid"
'34':"Quantity invalid"
'39':"Customer is not Active"
'48':"Amount is less than Minimum Transaction Amount"
'71':"Quote is Currently Under Execution"
'58':"KYC should be validated."
'500':"Duplicate request found. Request will not be processed"
{
"quantity": "10",
"transferCustomerBalance": "21.0000",
"orderId": {
"orderId": "STF8SE5KQY92OXP",
"quantity": "10",
"metal": "gold",
"date": "2023-05-02T06:55:29.863Z"
},
"netAmount": "56471.6",
Sample Success "currencyPair": "XAU/INR",
Response "tax1Amt": "84.71",
"buyCustomerRefNo": "STF_000001",
"tax2Amt": "84.71",
"executionDateTime": "2023-05-02T06:55:29.886Z",
"buyCustomerName": "Prashant kumar",
"transferCustomerName": "Ashutosh kumar",
"tax1Perc": "1.50",
"pricePerG": "5816.58",
"totalAmount": "58165.8",
"taxPercent": "1.501.50",
"billingAddress": {
"line1": "billing laxmi nagar West Delhi",
"line2": "West Delhi",
"city": "West Delhi",
"state": "DELHI",
"zip": 110041,
"country": "India",
"mobileNumber": "9718957271"
},
"tax2Perc": "1.50",
"taxAmount": "1694.1999999999998",
"taxType": "IGST"
}
curl --location
'https://cemuat.mmtcpamp.com/trade/buyAndTransferPartnerPg' \
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
Curl Request RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
{
"buyCustomerRefNo": "STF_000001",
"channel": "web",
"currencyPair": "XAU/INR",
Mandatory
"transactionDate": "2023-04-07T06:46:28.687Z",
Parameters
"transactionOrderID": "b1b06c68-5a45-4df6-8ed9-889d8f871151",
"transferCustomerRefNo": "STF_000002",
"quantity": "10",
"amount": "6334.39",
"message": "Hope you like the gift.",
"billingAddressId":"es8vu76axhMau64fjYTGq"
}
NOTE: please provide the billingAddressId (of the buy customer reference number) parameter and
make sure KYC is validated for both customers.
Overview
This allows to initiate transfer (balance in grams) from source customer account. Either quantity or
amount can be mentioned. Given quantity is debited from the customer account.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ initiateTransfer
"53":"Transaction date invalid"
'500':"Duplicate request found. Request will not be processed"
Sample Error
'06':"CustomerRefNo is Invalid"
Response
'34':"Quantity invalid"
'48':"Amount is less than Minimum Transaction Amount"
"40":"Insufficient balance at source"
'57':"Quantity can not be empty"
'64':"Quantity should be more than zero."
'67':"Destination customer ref no doesnt exist"
"74":"Duplicate transactionRefNo/clientOrderId"
'39': error code will be common for any required property missing in the payload:
must have required property 'property name'.
500:An Application Error has occurred (In case of system issue)
03: SessionId missing
{
"totalAmount": "52758.10",
"quantity": "10.0000",
"currencyPair": "XAU/INR",
Sample Success
"pricePerG": "5275.81",
Response
"srcCustomerBalance": "552.8740",
"orderId": "STFFPSOOE601R5W",
"executionDateTime": "2023-04-04T07:05:38.673Z"
}
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
Curl Request RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
{"currencyPair": "XAU/INR",
Mandatory "dstCustomerRefNo": "",
Parameters "dstMobileNumber": "8957760515",
"email": "Prashant@chauhan.com",
"isKycRequired": true,
"name": "",
"srcCustomerRefNo": "{{customerRefNo}}",
"transactionOrderID": "{{$randomUUID}}",
"channel": "web",
"transactionDate": "2023-03-30T07:40:59.087Z",
"quantity": "10.0000"}
Overview
This allows to transfer (balance in grams) from the transfer id from the Initiate Transfer API provided
to the destination customer account.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ confirmTransfer
"53":"Transaction date invalid"
'500':"Duplicate request found. Request will not be processed"
'06':"CustomerRefNo is Invalid"
Sample Error '39':"Customer is not Active"
Response '58':"KYC should be validated."
'54':"order Id is invalid."
"27":"Already confirmed"
'39': error code will be common for any required property missing in the payload:
must have required property 'property name'.
500:An Application Error has occurred (In case of system issue)
03: SessionId missing
{
"dstCustomerBalance": "20.0000",
"srcCustomerBalance": "552.8740",
Sample Success
"currencyPair": "XAU/INR",
Response
"transferId": "STFFPSOOE601R5W",
"executionDateTime": "2023-04-04T07:11:36.141Z"
}
--header 'Cookie:
Curl Request sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
Method POST
{
"transferId": "STFFPSOOE601R5W",
Mandatory "dstCustomerRefNo": "STF_te23nfk560",
Parameters "currencyPair": "XAU/INR",
"transactionDate": "2023-03-30T07:40:59.087Z"
}
ORDER/TRANSACTION DETAILS RELATED API’S
Overview
This API is used to get all the transaction of the user i.e. BUY, SELL, TRANSFER, REDEEM.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ getOrderHistory
"06":"CustomerRef NO is invalid"
'08':"Start or End Date is Invalid"
Sample Error '39': error code will be common for any required property missing in the payload:
Response must have required property 'property name'.
500:An Application Error has occurred (In case of system issue)
03: SessionId missing
[ {"transactionId": "DZYOFVBVZA34",
"orderId": "STFT8JQ25M46BRK",
"productSku": "XAU_DMM",
"customerRefNo": "3Y8HOT9F6U2E",
"status": "cancelled",
Sample Success
"type": "REDEEM",
Response
"quantity": "-1",
"totalAmount": "510.00",
"preTaxAmount": "432.20",
"couponId": null,
"createdAt": "2023-04-06T13:04:04.829Z",
"remarks": "Quality Issue"}]
Method POST
{
"customerRefNo": "{{customerRefNo}}",
Mandatory
"endDate": "2023-04-20T12:57:51.521Z",
Parameters
"startDate": "2022-10-13T11:20:00.084Z"
}
Overview
This API is used to get all the details of a specific transaction done by the user i.e. BUY, SELL,
TRANSFER, REDEEM.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ getOrderDetails
108':"Transaction id invalid"
'190':"Testing error handler"
'06':"CustomerRefNo is invalid"
Sample Error
'39': error code will be common for any required property missing in the payload:
Response
must have required property 'property name'.
500:An Application Error has occurred (In case of system issue)
03: SessionId missing
{
"transactionId": "STFyeu5kuLACv0L",
"orderId": "STFyeu5kuLACv0L",
"quantity": "1.0000",
"couponId": null,
"taxes":
"{\"tax1Amt\":\"88.44\",\"tax2Amt\":\"88.44\",\"tax3Amt\":\"0.00\"}",
"preTaxAmount": "5895.85",
"totalAmount": "6072.72",
"billingAddress": {
"id": "GgoOVEuptI2xGAhHTJNje",
Sample Success "name": "Prashant Chauhan",
Response "line1": "E1-22, Sector 14",
"line2": "Panjab University, Sector 14",
"city": "Chandigarh",
"state": "Chandigarh",
"zip": 160014,
"country": "India",
"mobileNumber": "6283763297",
"stateCode": "12",
"type": "B",
"customerRefNo": "29RLIIQ5BKVJ"
},
"couponDetails": null,
"type": "BUY",
"refundStatus": null
}
Method POST
{
Mandatory "transactionId": "STFyeu5kuLACv0L",
Parameters "type": "BUY"
}
Overview
This API is used to get all the REDEEM orders.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ getRedeemHistory
83':"Couldn't fetch liferay orders"
'39': error code will be common for any required property missing in the payload:
Sample Error
must have required property 'property name'.
Response
500:An Application Error has occurred (In case of system issue)
03: SessionId missing
[
{
"orderId": "STFRSO4C2XTHEPK",
"productDetails": [
{
"name": "Product Creation Test In UAT",
"quantity": 1,
"imageUrl": "https://commerceuat.mmtcpamp.com/o/commerce-
media/accounts/3947960/images/244805?download=false",
"weight": "1gm"
}
],
"date": "2023-04-06T12:25:35.211Z",
"makingCharges": 432.2,
"taxes": 77.8,
Sample Success
"orderStatus": "Confirmed",
Response
"type": "REDEEM",
"shippingAddress": {
"id": "EPKD2c4lUM9ybYsUF3Ukw",
"name": "Prashant kumar",
"line1": "delivery laxmi nagar West Delhi",
"line2": "West Delhi",
"city": "West Delhi",
"state": "DELHI",
"zip": 110041,
"country": "India",
"mobileNumber": "9718957271",
"stateCode": "07",
"type": "D",
"customerRefNo": "3Y8HOT9F6U2E"
},
"billingAddress": {
"id": "es8vu76axhMau64fjYTGq",
"name": "Prashant kumar",
"line1": "billing laxmi nagar West Delhi",
"line2": "West Delhi",
"city": "West Delhi",
"state": "DELHI",
"zip": 110041,
"country": "India",
"mobileNumber": "9718957271",
"stateCode": "07",
"type": "B",
"customerRefNo": "3Y8HOT9F6U2E"
},
"refundStatus": "processed",
"isCancellationPossible": true,
"isActive": true,
"totalAmount": 510
}
]
Method POST
{
Mandatory "customerRefNo": "{{customerRefNo}}",
Parameters "endDate": "2023-04-06T12:57:51.521Z",
"startDate": "2022-10-13T11:20:00.084Z"
}
Overview
This API is used to get the status of a particular REDEEM order.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ getDeliveryStatus
39': error code will be common for any required property missing in the payload:
Sample Error must have required property 'property name'.
Response 500:An Application Error has occurred (In case of system issue)
03: SessionId missing
{
"finalResult": "cancelled",
"deliveryPartner": "NA",
"trackingNumber": "NA",
"statuses": [
{
Sample Success "location": "Chandigarh",
Response "status": "Order Created",
"date": "2023-02-27T10:19:04.000Z"
},
{
"location": "Chandigarh",
"status": "Order Cancelled",
"date": "2023-04-06T10:49:58.000Z"
}
]
}
--header 'Cookie:
Curl Request
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTY4NDM4NTQ2OH0.eoh9C0A7A1i3eeFYDy
Z7p1ywRa8AlBUDKTNY011X4zU' \
--data '{"orderId":"STFAZSG10BEQGY9"}'
Method POST
{
Mandatory
"orderId":"STFAZSG10BEQGY9"
Parameters
}
Overview
This API returns the status of the given trade. Based on the status values can be unconfirmed,
confirmed, or reversed based on the Order ID. Error code of Under Execution is returned if order is
currently under processing.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module TRADE
API Endpoint /trade/ checkTradeStatus
Sample Error 56 – Order not Found (Unable to find an order with the provided clientOrderID)
Response
03 – Session Id Invalid (Session Id missing or invalid)
{ "totalAmount": "5749.63",
"quantity": "-1.0000",
"orderId": "STFl3quNHFfNAwD",
"pricePerG": "5749.63",
"tax1Amt": "0.00",
Sample Success
"tax2Amt": "0.00",
Response
"taxAmount": "0.00",
"tax2Perc": "0.00",
"tax1Perc": "0.00",
"taxType": "CGST/SGST",
"status": "confirmed"}
Method POST
{
Mandatory "clientOrderID": "e0de83f4-d2c7-40b1-b9d9-acec24eb9106",
Parameters "customerRefNo": "{{customerRefNo}}"
}
Overview
This API is used to generate the invoice PDF for BUY orders .
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint /pvt/generateBuyPdfInvoice
Sample Error
500: An Application Error has occurred (In case of system issue)
Response
Sample Success JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoQ3VzdG9tZXIgQnV5IEludm9
Response pY2UpCi9DcmVhdG9.......
Curl Request
curl --location 'https://cemuat.mmtcpamp.com/pvt/generateBuyPdfInvoice'
\
--header 'Cookie:
sessionId=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXJ0bmVyX2lkIjoiU3
RhY2tfRmluYW5jZSIsImlhdCI6MTc0NzkxNTI3Mn0.7qZ-
FZsQVya6DVQr_Fsu1aQluSTjNCHJjD51aX-cNr4' \
Method POST
{
Mandatory
"transactionId": "STFiRFKiUDXy_k1"
Parameters
}
Overview
This API is used to generate the invoice PDF for SELL orders.
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint /pvt/generateSellPdfInvoice
Sample Error
500: An Application Error has occurred (In case of system issue)
Response
Sample Success JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoQ3VzdG9tZXIgQnV5IEludm9
Response pY2UpCi9DcmVhdG9.......
Method POST
{
Mandatory
"transactionId": "STFiRFKiUDXy_k1"
Parameters
}
Overview
This API is used to generate the invoice PDF for REDEEM orders.
How to Send Session ID in Request Headers
For all protected APIs, include the session ID in the request headers using the following format:
Key: Cookie
Value: sessionId={{sessionId string returned from Login API}}
Module PVT
API Endpoint /pvt/generateRedeemPdfInvoice
Sample Error
500: An Application Error has occurred (In case of system issue)
Response
Sample Success JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSAoQ3VzdG9tZXIgQnV5IEludm9
Response pY2UpCi9DcmVhdG9.......
curl --location
'https://cemuat.mmtcpamp.com/pvt/generateRedeemPdfInvoice' \
Method POST
{
Mandatory
"transactionId": "{{order id of the order}}"
Parameters
}
Endpoint Reference
/customer/createProfile User POST Add a user in CEM database with a unique customer code
To get live price feed for Buy and Sell(Much faster compared to
/pvt/getNonExecutableQuote Buy, Sell POST
getQuoteBuy and getQuoteSell)
/price/XAU/INR Price Feed POST Get a historical price feed for gold
/price/XAG/INR Price Feed POST Get a historical price feed for silver
/trade/validateQuotePartnerPg Buy POST Validate quote details when partner is handling payments
Buy, Sell,
/trade/checkTradeStatus Redeem, POST Check the status of a given trade
Transfer
Buy, Sell,
/trade/getOrderHistory Redeem, POST Get paginated history of all customer orders
Transfer
Buy, Sell,
/trade/getOrderDetails Redeem, POST More details for a specific order
Transfer
/trade/buyAndTransferPartnerPg Transfer POST Buy some gold and transfer it to other user
/trade/getRedeemHistory Redeem POST Get the paginated history of all customer redeem orders
Execute the redeem order after payment has been made and
/redeem/executeRedeemOrderForPartnerPg Redeem POST
verified by the partner.
tarun.aggarwal@quadrafort.com
Harshit.gupta@mmtcpamp.com
Monika.fotedar@mmtcpamp.com