Steps 1 and 4 can answer
503 with problem type check-unavailable when a status or address-screening check can’t run at that moment. Nothing was created: retry with backoff and the same idempotency key.Beta — 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.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). The agent operates under whatever policy constraints that group already carries. The call below is unsigned, which works while your team does not have governance enforcement on and the group has no governance settings and governs no other group. Otherwise the addition must be signed by the group’s governance: sendsignatures and signer_group_version too, as in Add Signers to Group.
member_key is the agent’s signer_public_key from step 1.
We plan to make governance enforcement the default for all clients. Today it is off unless Dakota turns it on for your team, so build and test your integration as if it is on. In practice: collect signatures from signer group members for signer group, policy and wallet changes; manage API keys and users from a signed-in session, not with an API key; give your servers Operate keys that pass along those signed changes; and handle
insufficient_endorsements and retry 503 responses, such as check_unavailable.400 endorsement_required, or 403 for an Operate key).
Two more things change under enforcement:
- The agent’s key never signs governance. Agent and other Dakota-provisioned keys don’t count towards a group’s quorum, even when they are members, so only your customer’s own keys can approve changes to the group.
- Adding the agent can raise the group’s default quorum. With enforcement on and no explicit
governance_threshold, a group of three or more members needs 2 signatures for governance changes. Adding the agent to a two-person group makes it three members, so later changes to that group need both people’s signatures. Checkeffective_governance_thresholdon the group after the change.
signatures array. A group whose quorum no one can meet, such as one whose only members are agent keys, can’t be attached.
wallet_ids on the agent reflects the wallets that currently recognize it.
3. Draft a plan from a prompt
proposals — each a summary and a concrete action series:
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: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:signature — the exact payload bytes, canonicalization, and passkey support — is covered in Mandate signing. A passkey approval must come from a real sign-in (navigator.credentials.get() with the user present); otherwise it is a 400.
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— rows come back underdata, each carrying its status and, once executed, the coveringmandate_idandwallet_transaction_idfor audit. Omittinglimitreturns every match; see paging if you want pages and a total. - Webhooks: a success emits the standard
wallet.transaction.created; a failure emitsscheduled_payment.failedwith a machine-readablefailure_code. See Agentic webhooks.
scheduled, no event is sent, and it fires on a later run once the check works. A held payment can therefore go out later than its date.
Where this leaves you
One signed mandate now covers the whole monthly series — no re-signing per payment, and the agent still cannot exceed10 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.
