Skip to main content
POST
/
api
/
v2
/
order
/
fetch
Fetch by Order ID
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>"
}
'
"{\"status\":true,\"order\":{\"order_id\":\"1111111111111111\",\"receipt_id\":\"MGI2222222222222333\",\"pg_transaction_id\":\"222222222222\",\"amount\":118,\"currency\":\"INR\",\"pg\":\"Paytm\",\"method\":\"UPI\",\"order_status\":\"success\",\"unmapped_status\":\"TXN_SUCCESS\",\"card_last_4\":\"6005\",\"card_issuer\":\"amex\",\"customer\":{\"name\":\"Jhon Doe\",\"email\":\"Jhon@doe.com\",\"phone\":\"917732887777\"},\"notes\":{\"udf1\":\"Sync with #122\",\"udf2\":\"\",\"udf3\":\"\",\"udf4\":\"\",\"udf5\":\"\",\"udf6\":\"\",\"udf8\":\"\",\"udf9\":\"\",\"udf10\":\"\"},\"billing_address\":{\"firstname\":\"Jhon\",\"lastname\":\"LastName\",\"phone\":\"917732887777\",\"line1\":\"Gurugram\",\"line2\":\"Gurugram\",\"city\":\"Gurgaon\",\"state\":\"Haryana\",\"country\":\"IN\",\"zipcode\":\"122005\"},\"shipping_address\":{\"firstname\":\"Jhon\",\"lastname\":\"LastName\",\"phone\":\"917732887777\",\"line1\":\"Gurugram\",\"line2\":\"Gurugram\",\"city\":\"Gurgaon\",\"state\":\"Haryana\",\"country\":\"IN\",\"zipcode\":\"122005\"},\"additional_charges\":0,\"mdr\":\"\",\"tpv\":[],\"created_at\":\"2024-04-05 12:19:24\",\"updated_at\":\"2024-04-05 12:23:24\"}}"
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",
    "card_last_4": "6005",
    "card_issuer": "amex"
  }
}

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

status
boolean
default:true
Example:

true

order
object