Skip to main content

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.

Full walkthrough

All constraints are optional except the budget:
  • budgetUsdCents: total ceiling across all draws.
  • perChargeUsdCents: max size of any single draw.
  • maxUses: max number of draws.
  • expiresInHours: self-explanatory.
Response:

2. Deliver the code to your customer’s agent

The agent fetches the public view and decides:
Then it accepts (this creates the grant, the auditable “yes” from the human side):
You’ll receive a 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.exhausted webhook,
  • over-budget draws are rejected before touching the wallet, with the exact remaining amount in the error message.

Design patterns

Set perChargeUsdCents to your unit price; draw once per billing period based on measured usage. Budget caps the customer’s worst case.
One PayLink per customer per month. expiresInHours: 720 auto-retires it; issue next month’s link at renewal.
Small budget ($1), no expiry, enough to prove value without risk.