verify_l402_payment
Validate L402 token payment confirmation to grant resource access after receiving macaroon and preimage from payer.
Instructions
Verify an L402 token (macaroon + preimage) to confirm payment was made. Use this after receiving an L402 token from a payer to validate they paid before granting access to the resource. Requires LIGHTNING_ENABLE_API_KEY with an Agentic Commerce subscription.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"macaroon": "<macaroon>",
"preimage": "<preimage>"
},
"name": "verify_l402_payment"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| macaroon | Yes | Base64-encoded macaroon from the L402 token | |
| preimage | Yes | Hex-encoded preimage (proof of payment) |