Execute one recurring charge
Collect one billing period. Call it from your own renewal job - P2Flux schedules nothing.
Safe to retry. The contract allows one charge per period, so a repeat call after a timeout or a crash returns ALREADY_CHARGED rather than charging again. Treat that as success.
CONFIRMING is not a failure. The transaction is on chain and not yet settled: leave the period open, change nothing, and ask again in a few seconds about the same transaction. Its action is WAIT, and it is the one result that must never be shown to a customer as an error - they have paid.
Every other outcome carries an action telling you what to do; the retry SCHEDULE (an hour, a day, a dunning email) is your business policy, not ours.
Request
- Base URL: https://api.p2flux.com
- URL: https://api.p2flux.com/v1/charges
- Auth: none required
Request body
Response
The charge outcome.
Example response
{
"tx_hash": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708",
"subscription_id": "0x2d6bbc112885a6976289e599f71003f7d310e7152ebd662c6221dffd3e0da708",
"amount": "10.00"
}Changes
No recorded changes to this operation across all 1 revision of this API.