Skip to main content
Give your coding agent a flower-delivery task with Browse CLI and Link CLI. Browse CLI operates the merchant’s website on Browserbase. Link CLI connects your wallet and requests your approval before the agent pays. This guide uses a small Floral Embrace bouquet from 1-800-Flowers, delivered on the next available date within a $100 total budget.

1. Install the CLIs and skills

Use Node.js 22.18 or newer:
Install the skills for your coding agent. Set BROWSERBASE_API_KEY in your environment to your Browserbase API key:
Check whether Link is already connected:
If it isn’t, start the login flow:
Open the verification URL that Link returns, sign in, and approve the connection. Wait for authentication to finish before requesting a payment.
Add a payment method in Link if needed.

3. Give your agent the flower-delivery task

Give your coding agent this flower-delivery task:
For a rehearsal, ask your agent to create the spend request with Link’s --test flag. Link returns test credentials without charging your payment method. The merchant can reject them before the final order step. Review the complete order and total in Link before approving it. The agent must wait for approved before retrieving a credential. If the order changes, it needs fresh approval. Keep the request ID while approval is pending. For requires_action, follow Link’s instructions; retry automatically only for auto_resume.

5. Complete checkout and verify the order

For a standard card form, the agent retrieves the approved virtual card into a temporary file outside the repository:
The browser automation should read the credential file directly and fill the merchant’s payment fields. If Link returns an incomplete billing address, use the billing address you supplied. Keep card details out of model prompts, chat, screenshots, and logs. Submit once and verify the merchant’s confirmation. If the result is unclear, inspect it before retrying. Delete the credential file and close the named browser session when finished:
To add payments to an application you build, follow the Stagehand guide.