Skip to main content
This walkthrough goes from nothing to an executed agent-drafted payment. It assumes an onboarded customer with a funded non-custodial wallet and an API key.
Alpha — the agentic surface is in early access. Run this walkthrough against the sandbox.

1. Create a hosted payment agent

The agent gets its own signer key, managed by Dakota. That signer is the identity everything else binds to: mandates bind it, scheduled payments fire under it.
Keep signer_public_key — it is what you grant wallet access to next.

2. Grant the agent wallet access

The agent’s signer must be recognized on the funding wallet before anything it drafts can fire. Recognition is signer-group membership, and there are two ways to grant it: Option A — add the agent to a signer group already attached to the wallet (recommended). A plain API call, no endorsement required — and the agent operates under whatever policy constraints that group already carries:
member_key is the agent’s signer_public_key from step 1. Option B — attach a signer group containing the agent’s signer to the wallet. Changing which groups govern a wallet is a wallet-state mutation, so it must be signed by the wallet’s existing signers — an endorsed request. wallet_ids on the agent reflects the wallets that currently recognize it.

3. Draft a plan from a prompt

The reply contains conversational text plus zero or more proposals — each a summary and a concrete action series:
Nothing has been created yet — a proposal is a draft your application shows the customer for review. The conversation is stateless on the platform side — the agent keeps no memory between calls. To refine a draft with a follow-up (“make it 12 USDC”, “start in August”), resend the whole conversation so far in messages, in order, with the new turn appended (a prompt alone works only for the first turn, or as shorthand for the latest user message alongside messages). You can also attach an invoice (PDF or image, up to 8 MiB) and ask the agent to draft from it.

4. Accept — turn proposals into real objects

Send the reviewed proposals back verbatim:
Actuation creates the recipient, destination, scheduled payments — and the mandate, in status pending. A failure mid-way rolls back the instruction’s objects (no orphan payees). The response returns each drafted mandate in full wire shape (identical to GET /mandates/{mandate_id}), so your application can put it in front of the customer to sign immediately — no follow-up fetch or polling. GET /instructions/{instruction_id} remains available to audit what an instruction created.

5. The customer signs the mandate

You already hold the pending mandate from step 4’s response. It activates only when a recognized signer other than the agent’s signs its canonical payload — this is the dual-control step that keeps spending authority with the customer:
How to construct signature — the exact payload bytes, canonicalization, and passkey support — is covered in Mandate signing.

6. Payments fire on their dates

From here the platform does the rest. On each scheduled date the payment is re-checked against the active mandate (caps, target, asset, validity) and sent through the standard money path. Watch progress either way:
  • Poll: GET /scheduled-payments?status=scheduled,executed,failed — each row carries its status, and once executed, the covering mandate_id and wallet_transaction_id for audit.
  • Webhooks: a success emits the standard wallet.transaction.created; a failure emits scheduled_payment.failed with a machine-readable failure_code. See Agentic webhooks.

Where this leaves you

One signed mandate now covers the whole monthly series — no re-signing per payment, and the agent still cannot exceed 10 USDC per transaction, once per month, to Alice alone. To grant more, draft more and sign again; to end it, POST /mandates/{mandate_id}/cancel or revoke the agent.