PayOrc
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

MethodURL
GEThttps://api.payorc.com/orders/v1/transaction-details

Please use the test credentials for sandbox testing.

Headers

HeaderTypeRequiredDescription
merchant-keyStringYesYour merchant API key (e.g., live-D111PIS13YK)
merchant-secretStringYesYour merchant API secret (e.g., sec-JI11G0P13Z0)

Query Parameters

ParameterTypeRequiredDescription
p_order_idStringYesPayOrc 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

FieldTypeDescription
m_order_idStringOrder ID provided by the merchant
p_order_idIntegerOrder ID created by PayOrc
p_request_idStringRequest ID created by PayOrc
psp_ref_idStringReference ID associated with the PSP submission
psp_txn_idStringTransaction ID associated with the PSP submission
transaction_idIntegerPayOrc transaction / payment ID
statusStringCurrent order status
reasonStringFailure reason when status is failed
transaction_dateStringTransaction timestamp (e.g., 17-01-2025 05:43:40)
amountStringTransaction amount
amount_caputredStringAmount captured so far (field name as returned by API)
currencyStringCurrency of the transaction
m_customer_idStringMerchant customer ID
pspStringPayment service provider code
payment_methodStringPayment method used (e.g., DEBIT CARD)
channelStringOrder origin / channel
channel_idStringChannel identifier
m_payment_tokenStringPayment token — use this for Pay by Token
apm_nameStringAlternative Payment Method name
apm_identifierStringAPM identifier (email or phone)
sub_merchant_identifierStringSub-merchant identifier

Payment Method Data

FieldTypeDescription
schemeStringCard scheme (e.g., VISA, MASTERCARD)
card_countryStringCountry where the card was issued
card_typeStringCard type (e.g., CREDIT, DEBIT)
masked_panStringMasked card number

Transaction History

FieldTypeDescription
order_idStringOrder ID
transaction_idIntegerTransaction ID
typeStringTransaction type (AUTH, CAPTURE, VOID, REFUND)
statusStringTransaction status
created_atStringTransaction timestamp

Response — Error (4xx)

{
    "message": "Invalid p_order_id",
    "status": "fail",
    "code": "E0044"
}

On this page