codespar_checkout
Sell-side merchant checkout — as a merchant, create and process a checkout for a shopper to pay you. Routes to Stripe ACP, Asaas, or x402 by payment method. Call via session.execute().
codespar_checkout
Meta-tool
codespar_checkout is the sell-side primitive: as a merchant, you create and process a checkout for a shopper to pay you. It handles cart, pricing, tax, and payment, and routes to the right rail from paymentMethod. Use codespar_shop when the agent is the buyer shopping a store. Use codespar_charge for a bare inbound charge, and codespar_pay for an outbound transfer.
Rails
The rail is selected from paymentMethod:
paymentMethod | Routes to | Notes |
|---|---|---|
card | Stripe ACP | Agentic Commerce Protocol hosted checkout |
pix | Asaas | BRL, instant settlement |
boleto | Asaas | BR bank slip |
usdc | x402 | On-chain micropayment settlement |
Direct execute
There is no typed wrapper for codespar_checkout yet — call via session.execute().
const order = await session.execute("codespar_checkout", {
items: [{ name: "Tênis Masculino", quantity: 1 }],
paymentMethod: "pix",
currency: "BRL",
recipient: "shopper@example.com",
});
console.log(order.tool_call_id, order.status);order = session.execute("codespar_checkout", {
"items": [{"name": "Tênis Masculino", "quantity": 1}],
"paymentMethod": "pix",
"currency": "BRL",
"recipient": "shopper@example.com",
})
print(order["tool_call_id"], order["status"])Args shape
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | Items in the checkout |
paymentMethod | string | No | card | pix | boleto | usdc |
currency | string | No | Currency code (e.g. BRL, USD) |
recipient | string | No | Shopper identifier (who pays the merchant) |
Result
Returns a tool_call_id plus the resolved payment rail. Card and Pix
settle asynchronously — correlate completion with
session.paymentStatus()
just like codespar_charge.
See also
- codespar_shop — buy-side: the agent is the shopper buying from a store
- codespar_charge — collect a bare inbound payment as the merchant
- codespar_pay — bare outbound transfer
- E-Commerce Checkout cookbook — cart → checkout → fulfillment
- Tools & meta-tools — full meta-tool list
codespar_charge
Inbound charges — buyer pays merchant. 19 provider rails — Pix/boleto/card/wallet across BR, MX, PE, CO, CL, AR + USD. Async settlement, uniform payload.
codespar_shop
Buy-side shopping — act as the shopper to search a store's catalog and buy a product, minting the store's real Pix. VTEX guest checkout and Mercado Livre. Call via session.execute().