generated: '2026-09-15' method: derived source: >- Derived from openapi/p2flux-api-openapi.json operations and schemas plus the SDK method reference at https://p2flux.com/docs/sdks.html. api: P2Flux API summary: >- P2Flux has no stored records (no accounts, orders or balances — those live in the merchant's own database). The "entities" are the protocol objects a payment needs, each addressed by an opaque signed capability rather than a server-side id. Money and state live on-chain; the API mints and verifies capabilities against it. entities: - name: PaymentIntent capability_prefix: p2f1. key_fields: [recipient, amount, reference, expiry] note: One-time payment terms; verified by transaction hash + settlement receipt. - name: Subscription capability_prefix: p2s2. key_fields: [recipient, amount, period, reference] note: EIP-712-authorized recurring authorization; charged once per billing period. - name: SetupToken capability_prefix: p2setup2. note: Short-lived (24h) token carrying subscription terms to be signed by the payer. - name: Charge key_fields: [reference, periodIndex] note: One collected billing period of a Subscription. - name: Refund capability_prefix: p2refund1. key_fields: [original_settlement, amountUnits] note: Terms locked from an original one-time settlement; sent from the merchant wallet. - name: CancelToken capability_prefix: p2cancel1. note: Browser-safe token (15-min window) to cancel a subscription or restore allowance. - name: Capabilities note: Deployment capability descriptor — chain_id, network, tokens[], gas_payment_modes. relationships: - from: Subscription to: SetupToken type: has_one via: setup_token - from: Subscription to: Charge type: has_many via: reference - from: Refund to: PaymentIntent type: belongs_to via: original_settlement - from: CancelToken to: Subscription type: belongs_to via: reference id_scheme: style: opaque signed capability (bearer secret), prefixed by object type reference: >- The `reference` is generated by P2Flux and never accepted from a caller, so a merchant cannot leak an order id or email into it. Merchants keep their own order->reference map.