Session for restoring the allowance one subscription needs
INSUFFICIENT_ALLOWANCE is not a dead subscription. The authorization the customer signed is intact and the seller can still collect; what ran short is the ERC-20 allowance, and the fix is one approve() from the customer's own wallet - no new signature, no new subscription.
This exchanges the capability for the narrowest browser-facing token P2Flux issues: the payer, the spender (the recurring contract), the token and how much the next charge will pull. It carries no authorization struct and no signature, so it cannot be turned into a capability, cannot build revoke() and cannot prepare a refund. Hand it to the customer at <checkout>/#/approve/<approve_token>.
Short-lived by design - it only has to survive the walk from your account page to a wallet confirmation.
Request
- Base URL: https://api.p2flux.com
- URL: https://api.p2flux.com/v1/allowances/restore/session
- Auth: none required
Request body
Response
The session, and who must send the approval.
Example response
{
"payer": "0xb4e43f3fBa5Add75395adAD366627E7d74141Fa9",
"subscription_id": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708"
}Changes
No recorded changes to this operation across all 1 revision of this API.