Skip to main content

Orders

Orders

Two read-only endpoints cover the orders domain:

  • List Orders — page through the payin orders (Payment Link and Invoice payments) created by your merchant account.
  • Get Order — fetch the full detail of a single order by its platform_order_id.

All requests must be authenticated with your API Key. The gateway resolves your merchant identity from the API Key, so you do not send merchant_id in the query — it is ignored if present.

Base URL

https://pay-openapi.morph.network/pro/merchant/payin/v1

Endpoint paths in this page are relative to that base URL.

Response envelope

Every response is wrapped in a common envelope:

{
"error_code": 0,
"msg": "success",
"data": {},
"trace": "..."
}
note

Business success or failure is determined by error_code (error_code == 0 means success), not by the HTTP status code alone. See the Error Codes reference for the full list.

List Orders

GET /orders

Returns your payin orders in reverse-chronological order by default, with cursor-based pagination.

Query parameters

ParameterTypeRequiredDescription
statusstringNoFilter by order status. One of pending, success, expired, failed.
source_typestringNoFilter by the source that created the order. One of PAYMENT_LINK, INVOICE.
source_idstringNoFilter by the id of the source above (e.g. a specific payment link id). Max 64 characters.
startstringNoRange start, Unix milliseconds or RFC3339. Max 32 characters.
endstringNoRange end, Unix milliseconds or RFC3339. Max 32 characters.
sort_bystringNoSort field. One of created_at (default), paid_at, amount.
orderstringNoSort direction. One of asc, desc (default).
cursorstringNoPagination cursor; omit for the first page. Max 512 characters.
limitintegerNoPage size. 1100, default 20 when omitted.
note

Any value outside the ranges/enums above is rejected with error_code: 90000 before the request reaches order-service — you will not get a partial or best-effort match.

Request example

GET /pro/merchant/payin/v1/orders?status=success&limit=20

Success response

{
"error_code": 0,
"msg": "success",
"data": {
"items": [
{
"platform_order_id": "ord_f7d9152dc6624bb08e4844b5a7fae845",
"amount": "1.00000000",
"status": "success",
"pay_network": "matic",
"pay_token": "USDT",
"receiving_network": "morph",
"receiving_token_symbol": "USDT",
"receiving_address": "0x65c17d0410e1a7c038ce7f44964174e8611b3631",
"payment_txn_id": "P29240812885523456",
"tx_hash": "0x...",
"source_type": "PAYMENT_LINK",
"source_id": "plink_fc88559c73d6464681f2f5ebefaa1b12",
"refund_status": "unrefunded",
"created_at": 1784717583460,
"paid_at": 1784717600000
}
],
"next_cursor": "eyJ0Ijoib3JkZXIiLCJzIjoi..."
},
"trace": "..."
}

To fetch the next page, pass the returned next_cursor on the next request. An empty or missing next_cursor means there are no more results.

note

The fields shown above are the stable query-side fields. Each items[] entry may carry additional order detail fields; treat the order record itself as the source of truth for those.

Get Order

GET /orders/detail

Returns the full detail of a single order. The response shape is identical to a List Orders items[] entry (same fields, no next_cursor).

Query parameters

ParameterTypeRequiredDescription
platform_order_idstringYesThe order id returned by List Orders or when the order was created.

Omitting platform_order_id is rejected with error_code: 90000.

Request example

GET /pro/merchant/payin/v1/orders/detail?platform_order_id=ord_f7d9152dc6624bb08e4844b5a7fae845

Success response

{
"error_code": 0,
"msg": "success",
"data": {
"platform_order_id": "ord_f7d9152dc6624bb08e4844b5a7fae845",
"amount": "1.00000000",
"status": "success",
"pay_network": "matic",
"pay_token": "USDT",
"receiving_network": "morph",
"receiving_token_symbol": "USDT",
"receiving_address": "0x65c17d0410e1a7c038ce7f44964174e8611b3631",
"payment_txn_id": "P29240812885523456",
"tx_hash": "0x...",
"source_type": "PAYMENT_LINK",
"source_id": "plink_fc88559c73d6464681f2f5ebefaa1b12",
"refund_status": "unrefunded",
"created_at": 1784717583460,
"paid_at": 1784717600000
},
"trace": "..."
}

Errors

error_codeMeaningDescription
0Success
90000Invalid parametersA query parameter is out of its allowed enum/range (e.g. status=bogus, limit=500), or platform_order_id is missing on Get Order.
90001UnauthorizedAuthentication failed or merchant identity is missing.
8000080099System errorThe service is temporarily unavailable or hit an internal error; treat as a retryable system error.

See the Error Codes reference for details.