Create a one-time payment intent
Signs an intent for one payment to one recipient. The intent is the whole record - P2Flux stores nothing and learns nothing later that the token itself does not carry.
The reference is generated here and never accepted from the caller, deliberately: 32 random bytes carry no meaning, so a shop cannot push an order id, a customer id or an email into P2Flux by putting it in the reference. Keep your own order -> reference mapping.
Store the intent. It is what verifies the payment later, and what recovers it if the callback is lost. An intent whose expiry has passed still verifies and still refunds - see /v1/payments/verify. Minimum amount: 0.01 USDC. Smaller amounts are refused as AMOUNT_OUT_OF_BOUNDS before an intent is created - the hosted verification pipeline cannot be run profitably below one cent. The splitter contract itself has no such floor; the minimum is a hosted-service boundary, applied only when an intent is issued.
Request
- Base URL: https://api.p2flux.com
- URL: https://api.p2flux.com/v1/payments
- Auth: none required
Request body
Example request
{
"recipient": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
"amount": "10.00"
}Response
The signed intent and everything the checkout needs to build the transaction.
Example response
{
"intent": "p2f1.k1.eyJ2IjoxfQ.c2lnbmF0dXJl",
"reference": "0x4c2958875c223c9880b5b6262b0c069ad6727461c6443475ca2690b872e411ad",
"amount": "10.000000",
"expires_at": 1787139462,
"pay": {
"chain_id": 8453,
"splitter": "0x5a3bd0945cd0c80b124870881de49a717d20e0d0",
"token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"recipient": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
"amount_units": "10000000",
"reference": "0x4c2958875c223c9880b5b6262b0c069ad6727461c6443475ca2690b872e411ad"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.