Recurring billing with PayLinks
Cards have “save this card and charge monthly”. Agents have something better: PayLinks are budgets that a human approves once, that you draw against as value is delivered.When to use a PayLink vs plain charges
Full walkthrough
1. Create the link
budgetUsdCents: total ceiling across all draws.perChargeUsdCents: max size of any single draw.maxUses: max number of draws.expiresInHours: self-explanatory.
2. Deliver the code to your customer’s agent
The agent fetches the public view and decides:paylink.accepted webhook with the grant id and the agent’s identity.
3. Charge whenever you deliver value
4. Handle exhaustion
When the remaining budget hits zero:- further draws return
{ "error": "paylink_exhausted" }, - you receive a final
budget.exhaustedwebhook, - over-budget draws are rejected before touching the wallet, with the exact remaining amount in the error message.
Design patterns
Metered usage
Metered usage
Set
perChargeUsdCents to your unit price; draw once per billing period based on measured usage. Budget caps the customer’s worst case.Seat plans
Seat plans
One PayLink per customer per month.
expiresInHours: 720 auto-retires it; issue next month’s link at renewal.Trials
Trials
Small budget ($1), no expiry, enough to prove value without risk.