api_key and the secret as api_secret. The key picks the host: sk_sdbx_ keys go to the sandbox, which simulates every transfer, and sk_live_ keys to production. Set environment in the plugin options to override it.
Things to know before money moves:
- Two steps, not one.
quotes.createprices a transfer and locks the rate for a few minutes.transactions.createaccepts that quote and starts the transfer. Nothing moves until the second call, which is why the plugin marks the quote a write and the transaction destructive. - One amount, one side. Set the amount on the source or the destination, never both: OMS calculates the other side. The plugin rejects a call that sets both or neither before it is sent.
- Idempotency. OMS requires an
Idempotency-Keyheader on every non-auth POST. The plugin generates one per call; passidempotencyKeyin the input to reuse it, which is what makes a retried transfer the same attempt rather than a second one. - Personal data is write-only. A customer accepts
birthDate,residentialAddress,ipAddressand identifying documents, and OMS never returns them. Reads show the onboardingstatusand, when something is outstanding, ahold. - Networks are names, not numbers. Pass
polygonorethereum; OMS rejects the numeric chain ids.networks.listreports what this project can actually route. - Balances can be negative.
wallets.balancemirrors the provider, so a clawback after funds were spent reads as a negative string. - Webhooks. The plugin registers, reads, updates and deletes OMS webhook endpoints, including the one-time HMAC signing key from
webhooks.create. It does not handle inbound deliveries.
- 21 typed API operations
Setup
1
Install
2
Add the plugin
corsair.ts
multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
Store the Polygon OMS API key before the first call: More: API Key
pnpm corsair setup --plugin=polygon --tenant=acme api_key=<your-key> (leave out --tenant without multiTenancy), or pass it as key in the plugin options. With Hub, each tenant enters their own key on the connect page. See API key auth.4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List the networks this project can routeWhat’s next
API reference
Every
polygon.api.* operation with input and output types.Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.