On this page
EndpointRequest BodyExample RequestExample ResponseAutomatic Detection vs Manual ConfirmConfirm Paid
Manually confirm that a payment has been made by providing the on-chain transaction hash. This endpoint uses body-level accessSign authentication.
TIP
In most cases, HashNut automatically detects payments on-chain. Use this endpoint only when automatic detection fails or when you want to expedite confirmation.
Endpoint
POST /v4.0.0/pay/orders/confirmRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
accessKeyId | string | Yes | Your merchant Access Key ID |
payOrderId | string | Yes | HashNut order ID |
merchantOrderId | string | Yes | Your unique order identifier |
payTxId | string | Yes | The on-chain transaction hash proving payment |
chainCode | string | No | Token standard code (used for cross-chain verification; defaults to the order's chain) |
accessSign | string | Yes | HMAC-SHA256 signature of the body (excluding accessSign itself) |
Example Request
json
{
"accessKeyId": "ak_test_abc123",
"payOrderId": "PO202606210001",
"merchantOrderId": "ORDER-20260621-001",
"payTxId": "0x9876543210fedcba9876543210fedcba9876543210fedcba9876543210fedcba",
"accessSign": "BASE64_HMAC_SIGNATURE"
}Example Response
json
{
"code": 0,
"msg": "success",
"data": {
"payOrderId": "PO202606210001",
"state": 2
}
}After a successful confirm call, the order state transitions to CONFIRMING (2) while HashNut verifies block confirmations. Once confirmed, it moves to SUCCESS (3) and a webhook notification is sent.
WARNING
The payTxId must be a valid, finalized transaction on the correct chain. Submitting an invalid or unrelated transaction hash will result in an error or the order remaining in its current state.
Automatic Detection vs Manual Confirm
| Feature | Automatic | Manual Confirm |
|---|---|---|
| Trigger | HashNut monitors the blockchain | Merchant calls this endpoint |
| Transaction hash | Detected automatically | Provided by merchant |
| Use case | Default flow | Fallback when detection is delayed |
| State after call | N/A | CONFIRMING (2) |
