Skip to main content
This takes about fifteen minutes. Everything happens in sandbox, so no email gets sent, no money moves, and the verification code is always 111111. Before you start, open the dashboard and go to Settings → Developers → Credentials. That’s where your sandbox client_id and client_secret live; if you don’t have a client yet, Implement Agentcard in the same menu creates one.
1

Authenticate your server

Exchange your credentials for a bearer token. The request is form-encoded, per OAuth.
You get back an access_token. Use it as Authorization: Bearer on every call below.
2

Connect a test user

Start a connection. In sandbox nothing is actually sent, so any email works.
Verify with the sandbox code:
The response includes the user’s user_id and a connection token. Save both. This also fires your first webhook, connection.created.Then record the user’s authorization. This is the consent step: it registers that the user agreed to let your product and their agent use their wallet, and wallet links can’t be created for them until it’s on file. In your product the wallet shows the user a consent screen; in this tutorial you record it directly:
3

Create a wallet link

The response includes a url. This is what you hand to the wallet in the next step. The same link works on any platform.
4

Open the wallet

Put this on any page:
The wallet opens as a sheet. Add a card with the test number 4242 4242 4242 4242, any future expiry, any CVC. onSuccess fires with card_attached, and the connected_card.updated webhook goes out.
5

Make the first payment

Open the wallet again, this time asking for a payment:
The user approves, and onSuccess fires with payment_completed. And that’s it. You connected a user, they added a card, and a payment went through.
6

See what happened

Open the dashboard and check Webhooks → Deliveries. Every event from this tutorial is in there, with its payload: connection.created, connected_card.updated, and the payment events.

Where next

In production your server should be listening for those events instead of reading them in the dashboard. The Webhooks page shows how. To put the wallet in your actual product, go to Choose your platform. And when you want your agent to actually buy things, that’s the Purchase API.