One-time payments

Authoritative terms for a checkout to display

What the buyer is about to pay, stated by the server rather than decoded in the browser. A tampered intent fails here, before anyone is shown - or asked to sign - anything.

This is the only endpoint that enforces expiry. It also asks the contract whether the payment already settled, so a buyer is never sent to their wallet for a transaction that would revert.

post/v1/payments/resolve

Request

  • Base URL: https://api.p2flux.com
  • URL: https://api.p2flux.com/v1/payments/resolve
  • Auth: none required

Request body

intentstring required

A signed P2Flux capability: payment intent (p2f1.), setup token (p2setup2.), subscription capability (p2s2.), cancel token (p2cancel1.) or refund token (p2refund1.). Opaque to the caller and unforgeable - the signature is what authorises the call. Treat it as a bearer secret: keep it server-side, never in a URL query or a log.

Response

Terms to display and pay against.

recipientstring

An EVM address.

amountstring

A USDC amount as a decimal string, up to 6 decimal places. Never a JSON number: binary floating point cannot represent most decimal prices exactly, and this is money.

amount_unitsstring

An integer count of micro-USDC (6 decimals), as a string. 2500000 is 2.50 USDC. Used wherever a decimal would invite a rounding error - notably refund amounts.

tokenstring

An EVM address.

splitterstring

An EVM address.

chain_idinteger
referencestring

A 32-byte hex value, lowercase. Transaction hashes and references.

expires_atinteger
confirmations_requiredinteger nullable

How many confirmations the server's finality policy requires before /v1/payments/verify answers valid. Advisory: a client may wait this depth out on its own RPC and then verify once, instead of polling verify while blocks accumulate. Null when the policy is tag-based (safe) - then poll verify as before. The server always applies the policy itself regardless of what the client does with this number.

Example response

{
  "recipient": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
  "amount": "10.00",
  "amount_units": "2500000",
  "token": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
  "splitter": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
  "reference": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708"
}

Changes

No recorded changes to this operation across all 1 revision of this API.