How to charge for API access
Charge for an API with WavePay by selling plans through checkout, issuing a licence key on payment, and gating requests on the key — settlement arrives by signed webhook so access can be granted automatically.
Updated · by T3raTech · Free: 25 payments per 30 days, $0; Basic: 250 payments per 30 days for $9/month; Pro: 2,500 payments per 30 days for $29/month
The flow
- Sell: a checkout per plan with POST /v2/checkouts.
- Issue: the paid checkout emails the licence key; activation returns a signed entitlement.
- Gate: your API checks the entitlement or key before serving a request.
- Automate: register a webhook with POST /v2/internal/sites/webhook; the HMAC secret is returned once.
Questions
How does my API learn that someone paid?
Through a signed webhook, or by polling checkout status.
Is the webhook authentic?
Settlements are signed with the HMAC secret returned when you registered the webhook.