Browser Tokens
Give agents and headless browsers format-preserving tokens, and reveal plaintext only over the wire
Browser Tokens let you use sensitive data in browser automation workflows without exposing that data to your application code, your agent, or your browser infrastructure. They're designed for agentic workflows and headless browser automations that need to enter payment cards, passwords, account credentials, API keys, or other sensitive values into third-party websites.
You send sensitive values to Evervault and receive format-preserving token values along with proxy credentials. Only those tokens are passed to your agent or browser. When the browser submits a request through Evervault's browser proxy, Evervault replaces the token values with the original plaintext over the wire.
Why use Browser Tokens
Browser automations increasingly act on behalf of customers in real websites by logging into accounts, buying products, filling forms, and completing workflows. These flows often need sensitive data, which leaves three unappealing options.
Give the sensitive data to the agent
Your application, prompt context, model provider, and browser automation code all become part of the sensitive data handling path.
Give the sensitive data to the browser platform
Headless browser providers are strong at browser infrastructure, but they're rarely designed to handle PCI, credentials, or other regulated data.
Use network or issuer-specific agentic payment tokens
These carry issuer, country, and card brand availability constraints. Each one needs its own integration and user experience.
Browser Tokens are a compatibility layer instead. They work with any browser platform, and with any site where the sensitive value is ultimately submitted over the network. For payment flows, that value is usually a card number or CVV. For account access flows, it can be a password, recovery code, API key, or any other credential that shouldn't reach your agent, browser platform, logs, or automation code.
Comparison to alternatives
| Approach | How it works | Trade-offs |
|---|---|---|
| Raw card data in the agent or browser | The agent or browser automation receives the card number and CVV directly, and enters them into the site. | Simple, but it expands PCI scope to the agent, browser scripts, browser platform, logs, and surrounding infrastructure. Most model providers and browser automation platforms aren't PCI compliant, so this isn't a practical option. |
| Browser platform secret vault | The browser provider stores or injects sensitive values into the session. | Reduces prompt exposure, but puts the browser infrastructure provider in the sensitive data path. Values can still leak to the agent or automation scripts through the Chrome DevTools Protocol (CDP). |
| Issuer or network agentic payment token | A card network or issuer creates a payment-specific token for supported transactions. | Strong where available, but coverage depends on issuer, card brand, geography, and merchant acceptance. Each card brand needs a separate integration, and behavior varies between them. |
| Evervault Browser Tokens | Evervault returns format-preserving tokens, and reveals plaintext only through the browser proxy to allowed hostnames. | Works with existing browser platforms and merchant checkout flows, while keeping the agent and browser platform out of plaintext cardholder data handling. |
How Browser Tokens work
Your service hands token values to the browser agent. The agent fills them into the page, and Evervault's browser proxy swaps them for plaintext on the way to an allowed hostname.
Collect and encrypt sensitive data
Use Card Collection, a client-side or server-side SDK, or Relay to collect and encrypt sensitive values. Encrypted values are non-sensitive, so you can store them in your existing database. You can also provide plaintext values directly when that suits your integration.
Create Browser Tokens
Send the sensitive values to
POST /browser-tokenswith policies that define where the values can be revealed, and optional egress configuration.Pass token values to your browser automation
Evervault returns format-preserving tokens that look like the original data, so card tokens are Luhn-valid and preserve the original BIN.
Launch your browser through Evervault's proxy
Route the session through the browser proxy using the returned credentials. This works with platforms such as Browserbase, Browserless, Kernel, and Steel, as well as local Chromium and Playwright flows.
Evervault replaces tokens over the wire
Your browser enters token values into the page. Evervault scans requests sent through the proxy and replaces tokens with the original plaintext, but only for allowed destinations.
Evervault doesn't control, inspect, or interfere with the browser session itself beyond the proxy boundary.
Security model
Browser Tokens are designed so that sensitive data never needs to be exposed to:
- your application logic after token creation
- your agent
- your prompt context
- your browser automation script
- your browser platform
This applies to credentials as well as card data. The browser automation can fill a password token into a login form. The agent, model provider, browser platform, and workflow logs only ever see the token value.
Evervault never stores the plaintext or a server-side token mapping. Instead, the encrypted payload is embedded in a time-bound JSON Web Encryption (JWE) token, which is used as the authentication value for the browser proxy. The proxy uses the JWE to determine:
- which token values exist for the session
- what plaintext values they map to
- which hostnames can receive decrypted values
- when the token expires
- what egress configuration to use
If a request is sent to a hostname that isn't allowed by policy, the proxy behaves like a normal forward proxy and doesn't reveal the sensitive value.
PCI scope reduction
When implemented correctly, Browser Tokens can keep your browser automation platform, agent, and backend automation infrastructure out of PCI scope. Those systems never transmit, process, or store cardholder data.
In this flow, cardholder data is collected and encrypted using Evervault-controlled collection surfaces before it reaches your automation stack. Your backend creates short-lived Browser Tokens from encrypted card data, receives format-preserving token values, and passes only those tokens to the agent or browser automation platform. The important boundary is that the systems driving the browser only ever handle tokens.
Your agent
Sees and reasons over token values, not the card number or CVV.
Your browser automation code
Fills token values into the page, not cardholder data.
Your browser automation platform
Renders, stores, logs, and transmits token values through the browser session, not plaintext cardholder data.
Your backend infrastructure
Stores encrypted values and creates scoped tokens. It doesn't need to store, log, or transmit plaintext cardholder data as part of the browser workflow.
Plaintext cardholder data is revealed only inside Evervault's browser proxy, and only when a request is sent to a destination hostname allowed by policy. The merchant or PSP receives the original cardholder data over the network. The agent, browser platform, and automation backend stay outside the cardholder data environment because they never touch the plaintext value.
To preserve this scope reduction, production integrations should:
- Collect card data with Card Collection, an Evervault SDK, or Relay.
- Store only Evervault-encrypted card data in your systems.
- Create short-lived Browser Tokens immediately before the automation session.
- Pass only token values to the agent, browser runtime, logs, queues, and workflow systems.
- Route the browser session through Evervault's browser proxy using the returned proxy credentials.
- Scope reveal policies to the exact merchant or PSP hostnames the workflow needs.
- Avoid logging, persisting, screenshotting, or otherwise exposing plaintext cardholder data anywhere in the automation stack.
Create Browser Tokens
Create Browser Tokens just in time for a specific browser automation session.
Request body
The sensitive values to convert into browser-safe token values. Values can be Evervault-encrypted or plaintext.
The semantic type of the value, such as
card.number,card.cvv,credential.password.The sensitive value. Use Evervault-encrypted values for production integrations.
The identifier for the data being tokenized. Used to correlate tokens within your system, and reflected in the Evervault logs.
The rules that define where token values can be revealed as plaintext. See Permissions.
The action to allow. Use
decrypt.The hostname that can receive the plaintext value. Use an exact hostname such as
checkout.example.com, or a subdomain wildcard such as*.example.comto match every subdomain ofexample.com. Use*to support open egress. We recommend restricting hostnames wherever possible to prevent data leakage. See Targets.
How long the tokens and proxy credentials remain valid, in seconds. Must be at least
1.The egress proxy configuration for the session. See Egress configuration.
The type of egress proxy. Use
customto bring your own egress proxy.Either
httporhttps. Usehttpsif your egress proxy supports CONNECT-over-TLS, otherwise usehttp.The username for basic auth with the CONNECT proxy. Can't be blank, and can be up to 256 characters.
The password for basic auth with the CONNECT proxy. Can't be blank, and can be up to 256 characters.
The hostname or IP address of the CONNECT proxy for all egress calls. Don't include a scheme or port.
The port of the CONNECT proxy for all egress calls.
The response contains a token for each value you sent, along with the proxy credentials for the session.
The proxyConfiguration.password is a time-bound encrypted JWE. Evervault doesn't store the mapping between token values and plaintext values.
Token formats
Browser Tokens are format-preserving where applicable, so they pass browser and merchant-side validation.
| Data type | Token format |
|---|---|
| Card number | Luhn-valid, and preserves the original card length and BIN where applicable. |
| Card CVV | Preserves digit length, including three-digit and four-digit CVVs. |
| Expiry date | Usually doesn't need tokenization. The expiry month and year can typically be passed through as non-sensitive values. |
| Password | Preserves a browser-compatible string shape. |
Permissions
Permissions define where token values can be revealed as plaintext. Scope each policy as tightly as possible.
- A token is revealed only when the browser request is routed through Evervault's browser proxy, and the destination hostname matches an allowed policy.
- Multiple policies allow multiple destinations. Treat them as an allowlist.
- If a merchant checkout posts card data to a PSP, gateway, or embedded payment iframe, include the hostnames that actually receive the cardholder data.
- If the browser navigates or redirects to a hostname that isn't allowed, Evervault doesn't reveal the plaintext value to that hostname.
- Keep policies environment-specific. For example, use separate hostnames for sandbox and production payment flows.
Targets
A target can take one of three forms. Matching ignores case.
| Target | Matches | Example |
|---|---|---|
| Exact hostname | That exact hostname, and nothing else. Subdomains of it aren't matched. |
|
| Subdomain wildcard | Any subdomain, at any depth. For |
|
| Wildcard | Every hostname. | * matches any hostname the browser connects to. |
Only a leading *. is treated as a wildcard. A * anywhere else in the target, such as checkout.*.example.com or *.*.example.com, never matches a hostname, so Evervault rejects it when you create the tokens. The same applies to targets that include a scheme, port, or path, such as https://checkout.example.com or checkout.example.com:443. A subdomain wildcard also needs at least two labels after *., so *.com is rejected.
If any target in the request is invalid, POST /browser-tokens returns a 400 and no tokens are created.
Subdomain wildcards are useful when a payment provider spreads card capture across several hosts. For example, a checkout might post card data to checkout.pci.payments.example.com in one region and vault.payments.example.com in another. A single *.payments.example.com target covers both, without allowing the parent domain.
Avoid the wildcard target
The * wildcard is supported, but it removes the hostname check entirely. Evervault reveals plaintext to every hostname that receives a token value, not just the merchant or payment provider. If a page also sends form input to analytics, session recording, or other third-party scripts, those services receive the plaintext value too. Use * only when the destination genuinely can't be known in advance, and prefer exact hostnames or subdomain wildcards for production workflows.
Avoid broad policy rules. The intended production posture is to reveal only to the exact merchant, PSP, or gateway endpoints the workflow needs.
Token lifecycle
Token values are useful only with the matching proxy credentials and policy context. After expiry, the proxy credentials can no longer be used to reveal the underlying plaintext.
- Store the underlying sensitive value as Evervault-encrypted data.
- Create Browser Tokens immediately before launching or attaching to the browser session.
- Pass token values and proxy credentials only to the systems that need them for that session.
- Use the shortest
ttlthat gives the automation enough time to complete. - Discard token values and proxy credentials once the workflow finishes or the
ttlexpires.
A workflow can take longer than expected because of login, multi-factor authentication (MFA), queueing, or human takeover. Set the ttl to cover that expected session duration rather than creating long-lived reusable tokens.
Browser proxy
Browser Tokens use Evervault's browser proxy, which is exposed as an HTTP CONNECT proxy.
When launching your browser, configure the platform's proxy settings with the credentials returned by the Browser Tokens API.
Trust the Evervault CA
Because the browser proxy replaces token values with plaintext over the wire, the browser session must trust Evervault's certificate authority. Download the Evervault CA certificate from https://ca.evervault.com, then install it as a trusted root CA in the browser runtime before routing traffic through the proxy. The exact setup depends on the browser provider.
- For local Chromium or Playwright, add the CA certificate to the operating system or browser trust store used by the automation runtime.
- For hosted browser platforms, configure the session to trust the Evervault CA if the platform supports custom root certificates.
- If the platform doesn't support custom root certificates, confirm whether it offers an equivalent certificate trust or proxy configuration path.
Don't bypass certificate errors
Without the Evervault CA in the browser's trust store, HTTPS pages can show certificate errors or block requests routed through the proxy. Configure CA trust explicitly instead of disabling certificate verification.
Launch a browser session
The safest production pattern splits collection, token creation, and browser automation into separate steps. Your database stores encrypted card data, and your backend creates short-lived tokens. The agent and browser see only token values, so Evervault reveals plaintext to the allowed payment hostname alone.
Hosted browser platforms
Most browser platforms let you provide proxy configuration when creating or connecting to a session. The exact launch configuration depends on your platform.
For example, using Browserbase the integration would look like this:
Connect your automation to the session, then use the token values returned by Evervault in your browser steps.
Credential and account access flows
Browser Tokens aren't limited to payment data. The same pattern works anywhere a browser automation needs to submit a secret to a third-party website without exposing that secret to the agent or browser platform. Common credential use cases include:
- logging into a customer account with a password
- entering a recovery code or one-time backup code
- submitting an API key into a developer portal
- filling tax IDs, identity numbers, or other sensitive form fields
- completing internal admin workflows that need privileged credentials
The flow is the same as a payment flow. Collect or store the credential as an Evervault-encrypted value, then create a short-lived Browser Token scoped to the destination hostname. Give the agent and browser automation only the token value, and route the browser session through the browser proxy. Evervault reveals the plaintext credential over the wire to the allowed hostname.
For example, if an automation needs to log into accounts.example.com, the agent can navigate the site and fill a password token into the password field. The browser platform sees a browser-compatible token string, and Evervault reveals the original password only when the login request is sent through the proxy to the allowed hostname. This keeps credentials out of prompts, traces, screenshots, session recordings, browser-provider logs, and application logs, provided those systems only receive token values.
Egress configuration
By default, the browser proxy sends traffic to destination hostnames from Evervault's own IP addresses. To route a session through your own egress proxy instead, set the proxySettings object when creating tokens. Evervault then tunnels the session's egress through your proxy.
Browser Tokens only handle network egress. If your browser automation also needs timezone, locale, viewport, or geolocation alignment, configure those settings in your browser platform.
Test from your own IP address
To test a sandbox flow from your own IP address instead of Evervault's, we've built a Tailscale based proxy you can run on your machine. Run the Browser Tokens sandbox proxy and use it as your session's proxySettings. It's for sandbox apps only.
Anti-bot compatibility
Evervault's proxy is designed to preserve compatibility with real browser traffic. It uses TLS and HTTP client impersonation techniques, so network fingerprints such as JA4 match expected browser behavior.
Evervault doesn't attempt to solve browser-level automation challenges such as CAPTCHAs, MFA, 3D Secure, or human-in-the-loop flows. Browser platforms often provide session takeover or human intervention features for those cases.
Limitations
Browser Tokens are a network-layer compatibility layer. They don't replace browser automation, fraud controls, or checkout orchestration.
Client-side encryption can require site-specific handling
Some sites encrypt sensitive values in the browser before sending them over the network. Browser Tokens still work where the site accepts raw values, but some PSP-specific flows need shims, which Evervault manages on your behalf.
3D Secure and MFA remain application and browser concerns
Frictionless 3D Secure works normally, but challenge flows usually require user interruption or browser-platform session takeover.
Spending controls aren't enforced at the network layer
Browser Tokens can restrict where values are revealed, but transaction authorization stays with the issuer or payment processor.
Tokens are time-bound rather than single-use
A token can be used more than once within its
ttl, so keep thettlas short as the workflow allows.The browser session is outside Evervault's security boundary
Evervault doesn't drive or inspect the browser session beyond proxying network traffic. Policies still ensure that sensitive data is never decrypted and revealed to a hostname you haven't explicitly allowed.
Recommended integration pattern
Use this checklist before taking a Browser Token integration to production.
Use Card Collection, an Evervault SDK, or Relay.
Your database should only ever hold Evervault-encrypted values.
Create short-lived Browser Tokens when starting a browser automation session.
Allow only the exact hostnames the workflow needs.
Give your automation enough time to complete, and no more.
Configure the browser session with Evervault's proxy credentials.
The browser automation and agent should never receive plaintext.
After the session completes, log which token categories were revealed and to which destinations.