POST
/
api
/
v2
/
order
/
fetch
curl --request POST \
  --url https://api.paytring.com/api/v2/order/fetch \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "test_123",
  "id": "<string>",
  "hash": "<string>"
}'
"{\n    \"status\": true,\n    \"order\": {\n        \"order_id\": \"1111111111111111\",\n        \"receipt_id\": \"MGI2222222222222333\",\n        \"pg_transaction_id\": \"222222222222\",\n        \"amount\": 118,\n        \"currency\": \"INR\",\n        \"pg\": \"Paytm\",\n        \"method\": \"UPI\",\n        \"order_status\": \"success\",\n        \"unmapped_status\": \"TXN_SUCCESS\",\n        \"customer\": {\n            \"name\": \"Jhon Doe\",\n            \"email\": \"Jhon@doe.com\",\n            \"phone\": \"917732887777\"\n        },\n        \"notes\": {\n            \"udf1\": \"Sync with #122\",\n            \"udf2\": \"\",\n            \"udf3\": \"\",\n            \"udf4\": \"\",\n            \"udf5\": \"\",\n            \"udf6\": \"\",\n            \"udf8\": \"\",\n            \"udf9\": \"\",\n            \"udf10\": \"\"\n        },\n        \"billing_address\": {\n            \"firstname\": \"Jhon\",\n            \"lastname\": \"LastName\",\n            \"phone\": \"917732887777\",\n            \"line1\": \"Gurugram\",\n            \"line2\": \"Gurugram\",\n            \"city\": \"Gurgaon\",\n            \"state\": \"Haryana\",\n            \"country\": \"IN\",\n            \"zipcode\": \"122005\"\n        },\n        \"shipping_address\": {\n            \"firstname\": \"Jhon\",\n            \"lastname\": \"LastName\",\n            \"phone\": \"917732887777\",\n            \"line1\": \"Gurugram\",\n            \"line2\": \"Gurugram\",\n            \"city\": \"Gurgaon\",\n            \"state\": \"Haryana\",\n            \"country\": \"IN\",\n            \"zipcode\": \"122005\"\n        },\n        \"additional_charges\": 0,\n        \"mdr\": \"\",\n        \"tpv\": [],\n        \"created_at\": \"2024-04-05 12:19:24\",\n        \"updated_at\": \"2024-04-05 12:23:24\"\n    }\n}"

This API allows you to retrieve details of a previously created order.

Request Body

{
  "key": "test_123", // Merchant API key
  "id": "string", // Order ID
  "hash": "string" // Calculated hash for request validation
}

Responses

200 OK

{
  "status": true,
  "order": {
    "order_id": "string",
    "amount": 100,
    "currency": "INR",
    "status": "success"
  }
}

400 Bad Request

{
  "status": false,
  "error": {
    "message": "Invalid request",
    "code": 400
  }
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Body

application/json
key
string
default:test_123
required

Merchant Key

id
string
required

pass order id of partying in this param.

hash
string
required

hash is calculated as provided in doc.

Response

200
text/plain
200
status
boolean
default:true
Example:

true

order
object