Verify a payment against the chain
The trust boundary. The browser saying it paid is a claim; this makes it a fact by re-reading the receipt and checking every field against the signed intent. Never grant access on a browser message alone.
A rejected payment is HTTP 200 with valid: false and a code, not an error status - so check valid explicitly.
PAYMENT_CONFIRMING means the customer has probably paid. The transaction is on chain and not yet settled to the required depth. Poll the same hash; never ask for a second payment.
Expiry does not apply here. An intent whose expires_at has passed still verifies: expiry stops a payment being started, not one that already happened. An integration that discards expired intents loses the ability to verify - or refund - a real payment, permanently.
Request
- Base URL: https://api.p2flux.com
- URL: https://api.p2flux.com/v1/payments/verify
- Auth: none required
Request body
Example request
{
"tx_hash": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708"
}Response
A verdict. valid: true settles the order; valid: false carries the reason.
Example response
{
"tx_hash": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708",
"reference": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708",
"amount": "10.00",
"block_hash": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708"
}Changes
No recorded changes to this operation across all 1 revision of this API.