Find a payment whose transaction hash was lost
For when the checkout window dies between the wallet returning a hash and your server recording it: the money moved, the order looks unpaid, and there is nothing to reconcile against. Give this the intent and it finds the settling transaction on chain.
You supply no hash and no hint. The match is bound to the exact payment the intent describes, so it can never return somebody else's transaction. Pure reads and idempotent - safe to call on a schedule for any order in doubt, and it works long after the intent expired.
found: false with PAYMENT_NOT_FOUND is a statement about one block height, never a permanent verdict. The contract does not enforce your intent's expiry, so a slow wallet can still settle afterwards and a later call will find it. Stop polling on your own business rules - never on the strength of one not-found.
Request
- Base URL: https://api.p2flux.com
- URL: https://api.p2flux.com/v1/payments/recover
- Auth: none required
Request body
Response
Either the located transaction, or a not-found that names the block it was true at.
Example response
{
"tx_hash": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708",
"reference": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708",
"amount": "10.00",
"settled_outside_intent_contract": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
"block_hash": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708"
}Changes
No recorded changes to this operation across all 1 revision of this API.