Skip to content

Admin API

The Admin API provides operational endpoints for monitoring and managing the payment system. It is intended for use by an admin dashboard or operations tooling.

Base path: /api/v1/admin
Authentication: Ocrch-Admin-Authorization: {admin_secret} header

All list endpoints support pagination with limit (default 20, max 200) and offset (default 0, max 100,000) query parameters.


List orders with optional filters.

Query parameters:

ParameterTypeDefaultDescription
limitinteger20Maximum results to return (max 200).
offsetinteger0Results to skip for pagination.
statusstringFilter by order status: pending, paid, expired, cancelled.
merchant_order_idstringFilter by your merchant order ID (exact match).

Response — 200 OK:

[
{
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_order_id": "your-order-123",
"amount": "19.99",
"status": "paid",
"created_at": 1711900800,
"webhook_url": "https://your-app.example.com/webhooks/ocrch",
"webhook_retry_count": 0,
"webhook_success_at": 1711901000,
"webhook_last_tried_at": 1711900900
}
]
FieldTypeDescription
order_idUUID stringInternal order ID
merchant_order_idstringYour merchant order identifier
amountdecimal stringPayment amount
statusstringCurrent order status
created_atintegerUnix timestamp of creation
webhook_urlstringConfigured webhook URL for this order
webhook_retry_countintegerNumber of webhook delivery attempts
webhook_success_atinteger | nullUnix timestamp of first successful delivery
webhook_last_tried_atinteger | nullUnix timestamp of most recent attempt

Force-mark an order as paid, bypassing on-chain verification. Use with caution — intended for manual reconciliation.

Path parameter: order_id — the Ocrch order UUID.

No request body.

Response — 200 OK on success.

Error responses:

StatusBodyCause
404 Not Foundresource not foundOrder does not exist

Manually trigger a webhook delivery for an order. Useful when the initial delivery failed and the retry schedule has been exhausted.

Path parameter: order_id — the Ocrch order UUID.

No request body.

Response — 200 OK on success.

Error responses:

StatusBodyCause
404 Not Foundresource not foundOrder does not exist
500 Internal Server Errorinternal server errorEvent channel error

List pending deposits with optional filters. A pending deposit represents an unconfirmed payment the system is watching for.

Query parameters:

ParameterTypeDefaultDescription
limitinteger20Maximum results to return (max 200).
offsetinteger0Results to skip for pagination.
order_idUUID stringFilter by order ID.
blockchainstringFilter by chain (e.g. "eth").
tokenstringFilter by stablecoin (e.g. "USDT").

Response — 200 OK:

[
{
"id": 42,
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"blockchain": "eth",
"token": "USDT",
"user_address": null,
"wallet_address": "0xYourEthereumWalletAddress",
"value": "19.99",
"started_at": 1711900800,
"last_scanned_at": 1711900860
}
]
FieldTypeDescription
idintegerInternal deposit ID
order_idUUID stringAssociated order
blockchainstringChain being watched
tokenstringStablecoin expected
user_addressstring | nullExpected sender address, if restricted
wallet_addressstringReceiving wallet address
valuedecimal stringExpected payment amount
started_atintegerUnix timestamp when scanning started
last_scanned_atintegerUnix timestamp of most recent blockchain scan

List all transfers observed for a specific wallet address.

Path parameter: address — the wallet address (as configured in ocrch-config.toml).

Query parameters:

ParameterTypeDefaultDescription
limitinteger20Maximum results to return (max 200).
offsetinteger0Results to skip for pagination.
statusstringFilter by transfer status (see below).
blockchainstringFilter by chain.
tokenstringFilter by stablecoin.

Transfer status values:

ValueMeaning
waiting_for_confirmationDetected on-chain; not yet confirmed
failed_to_confirmCould not reach required confirmation depth
waiting_for_matchConfirmed; not yet matched to a deposit
no_matched_depositConfirmed; no matching deposit found
matchedConfirmed and matched to a pending deposit

Response — 200 OK:

[
{
"id": 123,
"blockchain": "eth",
"token": "USDT",
"from_address": "0xSenderAddress",
"to_address": "0xYourEthereumWalletAddress",
"txn_hash": "0xabc123...",
"value": "19.99",
"block_number": 19000000,
"block_timestamp": 1711900700,
"blockchain_confirmed": true,
"created_at": 1711900750,
"status": "matched",
"fulfillment_id": 7
}
]
FieldTypeDescription
idintegerInternal transfer ID
blockchainstringChain
tokenstringStablecoin
from_addressstringSender address
to_addressstringRecipient address (your wallet)
txn_hashstringTransaction hash
valuedecimal stringTransfer amount
block_numberintegerBlock containing the transaction
block_timestampintegerUnix timestamp of the block
blockchain_confirmedbooleanWhether required confirmations were reached
created_atintegerUnix timestamp when this record was created
statusstringCurrent transfer status
fulfillment_idinteger | nullID of the fulfillment record if matched

POST /transfers/{transfer_id}/resend-webhook

Section titled “POST /transfers/{transfer_id}/resend-webhook”

Manually trigger delivery of the unknown-transfer webhook for a specific transfer.

Path parameter: transfer_id — the internal transfer ID.

No request body.

Response — 200 OK on success.


Return all configured wallets and their enabled stablecoins, as defined in ocrch-config.toml.

No query parameters. No request body.

Response — 200 OK:

[
{
"blockchain": "eth",
"address": "0xYourEthereumWalletAddress",
"enabled_coins": ["USDT", "USDC"]
},
{
"blockchain": "tron",
"address": "TYourTronWalletAddress",
"enabled_coins": ["USDT"]
}
]
FieldTypeDescription
blockchainstringChain identifier
addressstringWallet address
enabled_coinsarray of stringsStablecoins enabled for this wallet

General health check endpoint. No authentication required.

Response — 200 OK:

{"status": "ok", "version": "0.1.0"}

StatusBodyCause
401 Unauthorizedmissing Ocrch-Admin-Authorization headerHeader absent
400 Bad Requestinvalid authorization headerHeader not valid UTF-8
401 Unauthorizedinvalid admin secretSecret mismatch
404 Not Foundresource not foundRequested resource does not exist
500 Internal Server Errorinternal server errorDatabase or internal error