Quickstart
Take a payment that settles straight to your own wallet. One request to create it, a checkout for the buyer, and one call to prove it landed.
1. What you need
There is no signup step and no API key, because the API has no authentication in v1. A payment is secured by the customer’s signature and by the contract, not by knowing who called.
- A recipient address you control — an ordinary EVM address. P2Flux only reads it as a destination.
- A backend that can POST JSON, to create the payment and to verify it afterwards.
- The API and checkout URLs of the P2Flux environment you are integrating with. Both are hosted by P2Flux; you do not deploy anything of ours.
- Testnet USDC on Base Sepolia in a buyer wallet, to try it end to end.
If you are looking for where to paste an API key: there is nowhere. Anything that says otherwise is describing a product P2Flux is not yet.
2. Point at your API
The API and the checkout are hosted by P2Flux — there is nothing to install and no backend of ours to run. What you need are the two URLs for the environment you are integrating against, which are issued to you rather than discovered. There is no public sandbox and no self-service signup today, so the values below are placeholders.
You cannot follow this guide end to end without those two URLs, and nothing here points at an endpoint you can call today without them. Ask through integration enquiries.
3. Create a payment
Two fields, both required: the address that receives the money and the amount as a decimal string. Amounts are USDC and accept up to six decimal places.
The response carries the signed intent plus everything a checkout needs to build the transaction:
The reference is 32 random bytes minted by P2Flux — you cannot supply your own. Store it against your order; it is how you tie a confirmed transaction back to what was sold. Order ids, customer ids and emails never reach P2Flux.
The intent expires one hour after it is created by default, so create it when the buyer is ready to pay rather than when the cart is built.
4. Present the payment
Open the hosted checkout with the intent in the URL fragment — the part after the #. Browsers do not include a fragment in the HTTP request or in the Referer header, so it does not reach a server or its logs. It is still visible to anything running in the page, so keep it out of client-side analytics and error reporting.
The checkout resolves the intent server-side before it shows anything, so a tampered token fails before the buyer is asked to sign. The buyer signs one transaction: it pays your recipient address and the fee wallet together.
5. Verify it landed
The browser message is a hint, not proof. Verify server-side with the intent and the transaction hash — this is the call that decides whether you fulfil.
A successful verification means all of this held: the receipt exists, the transaction succeeded, the settlement id matches this exact intent, the recipient and token are the ones signed for, the amount and the 1% fee add up, the USDC transfers actually happened, and the transaction is three confirmations deep.
This call answers HTTP 200 whether or not the payment is proven — either the success object below, or { "valid": false, "code": … }. Branch on valid, never on the status code.
Everything else comes back as valid: false with a code. The one to handle deliberately is PAYMENT_CONFIRMING, which means the payment cannot yet be proved — either it is not deep enough, or no receipt has been seen for that hash at all. It is not a statement that the money moved, and not a statement that it did not.
6. Mark the order paid
P2Flux answers one question — did this payment settle — and holds no opinion about your order. Key your own state on the reference you stored in step 3, and make the transition idempotent: a verify can be repeated safely, and it will be.
Store the intent and reference against the order before the buyer leaves for the checkout. There are no webhooks and no lookup by reference, so if the browser callback is lost those two values are what let you reconcile at all — see lost callbacks.