record_intent
Declare what you are buying and why before any payment, sealing the intent in your company's book for audit and limit checks.
Instructions
Call this first, whenever you are about to pay for anything (an x402 request, an API, data, compute, a card or Stripe payment): declare what you are buying and why, before paying. Sealed in your company's book. Amounts are integers in the currency's minor unit (cents; 6 decimals for USDC).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rail | No | ||
| product | No | Optional: what is being bought, such as an API plan, a dataset or a SKU | |
| purpose | Yes | Why you are paying, in one sentence. This is what an auditor reads. | |
| currency | No | ||
| expires_in | No | ISO 8601 duration (PT1H, P3D) | |
| counterparty | No | ||
| max_amount_minor | No | The most you may pay | |
| expected_amount_minor | No |