Skip to main content
Conto Commerce lets your platform’s agents buy from online stores for your users. A purchase goes from a product URL and a task to a merchant-confirmed order under one purchase id. Your platform starts it and follows it with one organization API key. Conto shops, prepares checkout and pays with the buyer’s own card in the background. The buyer reviews every purchase and verifies their card on a Conto page. Your platform and your agents never receive card details. Test mode is open to every organization: start with the quickstart. Live purchases need Conto to enable them for your organization, and live cards need a Builder or Enterprise plan. The SDK methods here need an @conto_finance/sdk release that includes admin.purchasing.purchases. Amounts are positive integers in minor units with an uppercase currency: { amountMinor: 1200, currency: 'USD' } is $12.00. Purchases support USD only.

Credentials

Neither key can add a card, grant permission to shop or approve a purchase. Those happen on the buyer’s Conto page. An agent key also cannot create buyers or see another buyer’s purchases. A buyer’s card is paid only through purchases: conto.connectedCards.list() leaves it out and draw() refuses it.

Set up a buyer

Map one of your users to a buyer and send the buyer to the hosted setup page.
On the setup page the buyer confirms per-purchase and daily limits, adds a card in the card provider’s secure fields, and lets their agent shop with it. That creates a delegation. Read it with admin.purchasing.delegations.list(buyer.id). The buyer or your platform can revoke it. A delegation covers one card and the buyer’s limits. When the buyer changes their limits, the delegation is revoked and the buyer grants it again. Each purchase is still authorized for one merchant and one total, reviewed by the buyer and verified by the card.

Start and follow a purchase

The purchase runs as the buyer’s agent. Without payment, Conto uses the buyer’s one delegation for this kind of store: a test card for a Conto test store, a live card otherwise. When the buyer has more than one, pass payment: { methodId, delegationId } from admin.purchasing.delegations.list(buyer.id). create() returns at once. Reusing the idempotency key with the same input returns the same purchase, so it is safe to retry after a lost response. A different input with the same key is refused with IDEMPOTENCY_CONFLICT. maxCost is the most the delivered order may cost. It narrows the delegation and never widens it. When you know the exact product, pass request.items with each URL, title, quantity and options. watch() yields every event in version order until the purchase ends. It streams server-sent events, reconnects from the last version, drops a duplicate after a reconnect, and falls back to polling where streaming is unavailable. Closing your process does not stop the purchase. Start watch() again with { after: lastVersion } to resume.

From an agent’s own key

An agent that calls Conto itself, for example through the MCP server, uses its own SDK key. The purchase methods are the same:
Issue the key with admin.agents.createSdkKey(buyer.agentId, { name: 'Purchasing agent' }). It reaches that buyer’s purchases only.

Status, phase and evidence

version increases by one with every visible change. paymentEvidence reports what is known about card authorization, the merchant’s confirmation and settlement separately. Evidence that is missing is unknown, never a guess. Settlement is always unknown here: the card provider reports issuance only.

Actions

When status is awaiting_action, requiredAction says what is needed and who completes it. Answer buyer_details with the fields the action lists for its form:
The buyer sees these details on the review page and approves them with the total. An identical answer again returns the same acknowledgment. A different answer to the same action is refused with RESPONSE_CONFLICT. An expired or replaced action is refused with ACTION_EXPIRED or ACTION_NOT_OPEN. For the buyer’s actions, create a single-use link on your server and send the buyer there:
requiredAction.url points at the same Conto page. It opens only for a buyer who entered through a link your platform created, so it is safe to show.

Events and webhooks

A cursor ahead of the purchase returns CURSOR_INVALID. watch() handles it by yielding a purchase.resync event with the current purchase. Webhooks go to your organization’s webhook URL with the event type in X-Conto-Event and the event id in X-Conto-Delivery-Id. The id is the same on every retry, so deduplicate on it. Verify each delivery with the raw body:
It refuses a bad signature and a delivery older than five minutes.

Cancel

Before payment the purchase stops and cancellationOutcome is cancelled or requested. Once payment may have been submitted it is too_late and the purchase stays in reconciliation until its outcome is known. Cancelling never refunds or reverses a payment.

Errors

Refusals carry a stable code, a requestId and whether retrying the same request can succeed later.

Test purchases

Test mode is open to every organization. Create a setup link with environment: 'test'. The buyer adds a test card instead of a real one. A test card pays only Conto’s test stores and a live card never does: A test purchase runs the same limits, policies, reviews and actions as a live one, and its authorization is recorded as simulated. No card network, card provider or store is involved, and nothing is charged.