client_id + client_secret
— and from there you call the API on their behalf, exactly like the flow
Stripe Connect uses.
Every organization connected this way is attributed to your platform.
Platform connect requires the platform capability on your organization.
Contact us to enable it. You also need a
confidential OAuth client (Organization → Developer → Credentials) with your
return_url registered as a redirect URI — creating sessions and exchanging
codes only works with client-credentials auth, never with API keys.Instructions for your agent
Paste this into your coding agent to implement the flow.Instructions for your agent
How it works
1
Create a session
When your customer clicks Connect to Agentcard, call
POST /api/v2/platform_connect_sessions
with your return_url and a state value bound to their browser session.
Redirect them to the returned url.2
The customer connects
On the hosted page they sign in (or create an account), then pick an
existing organization they administer — or create a new one — and confirm
what your platform gets. No document checks; the whole flow is a minute.
3
Receive the redirect
We send them back to your
return_url with ?code=…&state=…. Verify
state, then exchange the code server-side with
POST /api/v2/platform_connect_sessions/{id}/exchange.
Codes are single-use and expire after 10 minutes.4
Act on the organization's behalf
The exchange returns the organization’s own
client_id + client_secret.
Mint access tokens with
POST /api/v2/oauth/token
and call the API as that organization — issue cards to its users, run
user authentication, read
transactions.Security model
- No secrets in URLs. The redirect carries only the one-time
codeand yourstate; credentials move server-to-server on the exchange. - The code is bound to your client. Only the exact OAuth client that created the session can exchange its code — a leaked code is useless to anyone else.
stateis your CSRF binding. Issue a random value per connect attempt and verify it on the redirect before exchanging.- Revocable by the customer. The credential you receive appears on the organization’s Credentials page, named after your platform; its admins can rotate or revoke it at any time.
Test mode
A sandbox client runs the entire flow in test mode: the minted credentials are sandbox-mode, no live cards or real money, andhttp://localhost return URLs
are allowed. Move to a production client when you go live.