/v2/pay/{id}/submitSubmit a transaction hash
Links a USDT transaction to the intent's open USDT quote. Required for every USDT payment: all USDT quotes on a store share its wallet address, so the transaction hash is the only way to tell which intent a transfer pays. A USDT payment whose hash is never submitted is not detected. No API key needed.
Submit the hash as soon as you have it, before broadcasting the transaction if your wallet allows it. Submitting the same hash again returns 200. A different hash replaces the first one until a payment is detected.
Not used for BTC, which is detected by its address.
Returns 200 with an empty body.
Path Parameters
idstringrequiredID of the payment intent
Request Body
cryptostringrequiredCrypto of the quote being paid. Not case-sensitive.
txhashstringrequiredHash of the transaction that pays the quote. On a test-mode store, TestUSDTTxid_ simulates a payment of that amount.
Responses
idpath · stringrequiredID of the payment intent
cryptobody · stringrequiredCrypto of the quote being paid. Not case-sensitive.
txhashbody · stringrequiredHash of the transaction that pays the quote. On a test-mode store, `TestUSDTTxid_<base units>_<unique suffix>` simulates a payment of that amount.
Response will appear here
Request
curl -X POST \
"https://www.blockonomics.co/api/v2/pay/pi_5GfD5m1b8khzFSLza91VR6/submit" \
-H "Content-Type: application/json" \
-d '{
"crypto": "USDT",
"txhash": "0x9b1c7f3e2a4d5b6c8e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d"
}'const response = await fetch('https://www.blockonomics.co/api/v2/pay/pi_5GfD5m1b8khzFSLza91VR6/submit', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"crypto": "USDT",
"txhash": "0x9b1c7f3e2a4d5b6c8e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d"
})
})
const data = await response.json()
console.log(data)import requests
headers = {}
response = requests.post(
"https://www.blockonomics.co/api/v2/pay/pi_5GfD5m1b8khzFSLza91VR6/submit",
headers=headers,
json={
"crypto": "USDT",
"txhash": "0x9b1c7f3e2a4d5b6c8e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d"
}
)
print(response.json())