Manage Payment
Fetch Order
Fetch order details including status, payment method, transaction history, and PSP references.
Fetch Order
API Version: 3.0.0
Fetch order details at any time. Use this to get the order status and sync with your system.
Navigate to Developers → API Keys → Add new API key → Select Hosted Solution in the Channel Dropdown to generate your API credentials.
Endpoint
| Method | URL |
|---|---|
| GET | https://api.payorc.com/orders/v1/transaction-details |
Please use the test credentials for sandbox testing.
Headers
| Header | Type | Required | Description |
|---|---|---|---|
merchant-key | String | Yes | Your merchant API key (e.g., live-D111PIS13YK) |
merchant-secret | String | Yes | Your merchant API secret (e.g., sec-JI11G0P13Z0) |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
p_order_id | String | Yes | PayOrc order ID returned when the order was created |
Only p_order_id is accepted as a lookup key for this endpoint.
Code Examples
curl --location --globoff 'https://api.payorc.com/orders/v1/transaction-details?p_order_id=1000015385' \
--header 'merchant-key: {merchant-key}' \
--header 'merchant-secret: {merchant-secret}'Response — Success (200)
{
"data": {
"m_order_id": "123456",
"p_order_id": 1000015385,
"p_request_id": "1000011100",
"psp_ref_id": "040035486407",
"psp_txn_id": "040035486407",
"transaction_id": 1000012306,
"status": "CAPTURED",
"reason": "",
"transaction_date": "17-01-2025 05:43:40",
"amount": "100.00",
"amount_caputred": "100.00",
"currency": "AED",
"m_customer_id": "1234",
"psp": "TLR",
"payment_method": "DEBIT CARD",
"channel": "HOSTED",
"channel_id": "1",
"payment_method_data": {
"scheme": "VISA",
"card_country": "POLAND",
"card_type": "DEBIT",
"masked_pan": "4111****1111"
},
"m_payment_token": "Q3JtelUxT1h2SXhhYXRQMjlobVgxUT09",
"apm_name": "",
"apm_identifier": "",
"sub_merchant_identifier": "0000001185",
"transaction_history": [
{
"order_id": "123456",
"transaction_id": 1000012306,
"type": "AUTH",
"status": "AUTHORISED",
"created_at": "17-01-2025 05:43:35"
},
{
"order_id": "123456",
"transaction_id": 1000012307,
"type": "CAPTURE",
"status": "CAPTURED",
"created_at": "17-01-2025 05:43:40"
}
],
"parameters": [
{"alpha": ""},
{"beta": ""},
{"gamma": ""},
{"delta": ""},
{"epsilon": ""}
],
"custom_data": [
{"alpha": ""},
{"beta": ""},
{"gamma": ""},
{"delta": ""},
{"epsilon": ""}
]
},
"message": "Successfully fetched transaction details",
"status": "success",
"code": "00"
}Response Fields
| Field | Type | Description |
|---|---|---|
m_order_id | String | Order ID provided by the merchant |
p_order_id | Integer | Order ID created by PayOrc |
p_request_id | String | Request ID created by PayOrc |
psp_ref_id | String | Reference ID associated with the PSP submission |
psp_txn_id | String | Transaction ID associated with the PSP submission |
transaction_id | Integer | PayOrc transaction / payment ID |
status | String | Current order status |
reason | String | Failure reason when status is failed |
transaction_date | String | Transaction timestamp (e.g., 17-01-2025 05:43:40) |
amount | String | Transaction amount |
amount_caputred | String | Amount captured so far (field name as returned by API) |
currency | String | Currency of the transaction |
m_customer_id | String | Merchant customer ID |
psp | String | Payment service provider code |
payment_method | String | Payment method used (e.g., DEBIT CARD) |
channel | String | Order origin / channel |
channel_id | String | Channel identifier |
m_payment_token | String | Payment token — use this for Pay by Token |
apm_name | String | Alternative Payment Method name |
apm_identifier | String | APM identifier (email or phone) |
sub_merchant_identifier | String | Sub-merchant identifier |
Payment Method Data
| Field | Type | Description |
|---|---|---|
scheme | String | Card scheme (e.g., VISA, MASTERCARD) |
card_country | String | Country where the card was issued |
card_type | String | Card type (e.g., CREDIT, DEBIT) |
masked_pan | String | Masked card number |
Transaction History
| Field | Type | Description |
|---|---|---|
order_id | String | Order ID |
transaction_id | Integer | Transaction ID |
type | String | Transaction type (AUTH, CAPTURE, VOID, REFUND) |
status | String | Transaction status |
created_at | String | Transaction timestamp |
Response — Error (4xx)
{
"message": "Invalid p_order_id",
"status": "fail",
"code": "E0044"
}