Quickstart
Quickstart
This walkthrough creates a paid HTTP capability and calls it through the Lipafy gateway.
All examples use the Lipafy API base URL:
1. Sign in
Open the dashboard and sign in with one of the supported login methods:
- EVM wallet sign-in
The dashboard session is used for account setup. Agents and scripts should use an API key or OAuth token.
2. Top up your wallet
In the dashboard, open Overview and choose Top up.
Lipafy starts an M-Pesa top-up through the configured payment provider. Complete the prompt on your phone, and the balance updates once the payment confirms.
3. Create an API key
Create an API key from the dashboard, or call the account API with a dashboard bearer token:
The response includes plaintext. Store it immediately; Lipafy only returns the full API key once.
4. Register a capability
A capability is a paid HTTP endpoint.
This creates demo.echo, priced at 100 KES per request.
5. Call the capability
On a successful call, Lipafy:
- Resolves the capability and price.
- Checks the grant, wallet balance, and spending controls.
- Places a hold for the price.
- Forwards the request upstream.
- Settles the hold if the upstream call succeeds.
- Releases the hold if the upstream call fails.
Successful responses include payment status headers such as:
6. Connect an MCP agent
For clients that support HTTP MCP, add:
If the client supports MCP OAuth discovery, it can start the Lipafy OAuth flow. If it does not, use the client’s bearer-token configuration.
Once connected, agents can read wallet/capability state and execute paid capabilities. Lipafy does not ask for confirmation on every ordinary in-policy payment; it pauses when balance, controls, approval rules, or mandate rules require it.
