Agentcard’s legacy wallet API is deprecated. New integrations should use the Vault flow below instead of the old
agentcard_wallet_id integration. Vault attaches over CDP; it does not require a wallet ID on a Browser Use run.What you need
- A Browser Use API key in
BROWSER_USE_API_KEY. - An Agentcard
client_idandclient_secretfrom the Agentcard dashboard, inAGENTCARD_CLIENT_IDandAGENTCARD_CLIENT_SECRET. - A user with a stored Vault card, and their
user_idinAGENTCARD_USER_ID. See Adding a card. - Your own app function to deliver an approval link privately to that user.
Attach Vault before shopping
Install the Node packages alongside your app:cdpUrl, and attach Agentcard before the agent reaches the payment form. Browser Use supports multiple CDP connections to the same browser.
syncRegistry() loads Agentcard’s supported payment recognizers. Keep this Node process and its Playwright connection running throughout shopping and approval. This example attaches to one page: use that same tab for checkout. If your agent opens another tab, attach Agentcard to it and await attachment before allowing checkout there.
Send onApprovalUrl links through your own authenticated app or private user channel. Keep approval links, real card details, client secrets, and CDP URLs out of logs and agent task text. Only the cardholder should open the approval link.
Connect the open-source Python agent
Install the separate open-source library withpip install browser-use. Pass the session.cdpUrl above to your Python process securely as BROWSER_USE_CDP_URL. Configure llm as in the open-source quickstart.
task.
Confirm the order and stop the browser
User approval is not proof that the merchant created an order. Verify the merchant’s confirmation page or API and follow Agentcard’s purchase reconciliation guide. If the result is pending or unknown, preserve the browser for follow-up and reconcile before retrying payment.keep_alive=True leaves the browser available after the Python agent finishes. Once the order is confirmed and no follow-up is needed, stop the owned browser from your Node app: