checkout
Generate a Stripe payment session for a product, returning a browser URL the user opens to complete payment. Credits provision automatically once payment succeeds.
Instructions
Create a Stripe checkout session for purchasing a product.
Returns a ``checkout_url`` — the user must open it in a browser to
complete payment. After payment, credits are provisioned automatically
via webhook.
If the agent has a USDC wallet, skip this entirely — just call
``generate`` and the x402 protocol handles payment on-chain.
Args:
product_id: Product ID from ``get_products``.
email: Account email (for Basic auth during onboarding).
password: Account password (for Basic auth during onboarding).
Returns:
Dict with ``checkout_url``. On failure, an ``isError`` result — e.g.
``error: "email_not_verified"`` until the user clicks the
verification link, or ``"auth"`` / ``"failed"``.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | |||
| password | No | ||
| product_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||