On this pageEndpointRequest BodyExample RequestExample ResponseAutomatic Detection vs Manual Confirm

Confirm 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/confirm

Request Body ​

FieldTypeRequiredDescription
accessKeyIdstringYesYour merchant Access Key ID
payOrderIdstringYesHashNut order ID
merchantOrderIdstringYesYour unique order identifier
payTxIdstringYesThe on-chain transaction hash proving payment
chainCodestringNoToken standard code (used for cross-chain verification; defaults to the order's chain)
accessSignstringYesHMAC-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 ​

FeatureAutomaticManual Confirm
TriggerHashNut monitors the blockchainMerchant calls this endpoint
Transaction hashDetected automaticallyProvided by merchant
Use caseDefault flowFallback when detection is delayed
State after callN/ACONFIRMING (2)