Skip to main content
Agent Portal gives an Agent Platform the account, wallet, authorization, and payment capabilities it needs to serve users. Choose the implementation that matches the experience you want to own:
  • Hosted Agent Portal: use Clink’s hosted user experience through the MCP connection. This is the fastest way to provide wallet setup, purchase authorization, and payment tools without building a portal UI or the portal data layer.
  • Customized Agent Portal: use the Agent Portal APIs to build the user experience in your own product. Your backend controls the portal UI and composes Clink’s account, wallet, authorization, credential, result, and settings APIs.

Agent Portal capabilities

Choose an implementation

Hosted Agent Portal (MCP)

Choose the hosted option when you want to provide Clink’s standard wallet and payment experience with minimal platform code. Connect each user through MCP, let the user complete wallet setup and authorization in the hosted flow, and expose the resulting Clink tools to the Agent. Start with MCP and OAuth login, then follow Browser Pay to complete a merchant payment. Use this option when Clink’s standard experience covers your product requirements.

Customized Agent Portal (API)

Choose the customized option when your platform needs its own wallet, authorization, or order-management experience. Your backend authenticates as the platform, obtains a token for one user, and calls the Agent Portal APIs to render that user’s data and run the payment flow. First register the platform client and implement the portal-token flow. Then call the account, payment-method, instruction, credential, result, and settings APIs in the user’s context. The details below describe this API-based implementation. The portal token reads account, order, refund, and authorization data, and it writes the user’s own settings: risk rules and billing address. It can also create purchase instructions with an existing card or by binding a new card, create short-lived card-binding sessions, return a Vault session id for card binding, issue a restricted card-management browser session for the platform’s own settings page, delete the user’s own payment methods, request a payment credential for an active instruction, and report the merchant payment result. It cannot issue refunds.

Portal token flow

The platform backend first uses its pre-registered client to obtain a platform client token, then requests a portal token for one user. Verify the user’s email before requesting the token, and associate the Clink customer with your platform’s stable user ID.
  • A new customer, or a customer with an active authorization for this platform, needs only email.
  • When an existing Clink customer authorizes this platform for the first time, the endpoint returns authorization_required and authorization_url. Pass the URL unchanged to that user, complete the OAuth + PKCE callback, and call the portal-token endpoint again.
  • If the user cancels or denies authorization, do not bypass the browser consent or modify the authorization URL. Start a new authorization request instead.
  • A portal token is access-only and has no refresh token. When it expires, obtain a new one with the platform client token. If the user’s authorization is no longer valid, the endpoint returns authorization_required again.
A portal token represents one Clink customer and can access only that customer’s data. Keep both the platform token and portal token on a trusted server; do not put them in browser URLs, logs, Agent input, or ordinary business messages.

How it works

The platform client is the same pre-registered client used by Agent Platform MCP Login. The portal token is a separate user token and is valid only for the portal APIs.

What you can build

Token types

The portal user token cannot call /mcp, and the MCP token cannot call /agent/platform/**. Keep the platform token on the server; do not send it to the platform’s browser or to an Agent.

Data scope

The portal token’s sub is the Clink customer_id. Clink resolves the user only from that verified token; there is no request parameter for choosing a different customer_id or email. Portal data is scoped to the user, not to an Agent:
  • Orders, refunds, and authorizations include data created by any Agent for that user.
  • The response does not filter by agent_client_id or agentInfo.clientId.
  • A customer cannot read another customer’s records; single-record endpoints return 404 when the record is not owned by the token’s user.
  • Order filtering uses a bounded scan. The order list response includes truncated when the scan limit was reached.

Prerequisites

Clink must pre-register the platform client in the target environment with:
  • A platform client_id and client_secret.
  • The exact OAuth redirect_uri used for first-time user authorization.
  • The portal audience and portal:read portal:write scopes.
  • Optional but recommended: an RSA public key registered with Clink. With a key, POST /agent/platform/credential returns the sealed key/payload envelope. Without a key, it returns plaintext card fields only when clink.cwallet.agent-platform.portal-plaintext-enabled=true in that environment and gateway response redaction is live; with the default gate off it fails closed with 71211012 (credential_public_key_not_configured).
The platform must verify the user’s email before requesting a token. The platform client cannot be created through Dynamic Client Registration.

API reference

Authentication, response format, and status codes are on the API Reference introduction page; each endpoint is in the Agent Portal group of the API Reference:

Portal token

Exchange the platform client token for a token for one user.

Portal APIs

Authentication, response format, status codes, common behavior, and the full endpoint list.