Base URL https://api.intents.fi. The OpenAPI document is at
/openapi.json — everything on this page, every sample on it and the TypeScript
SDK are generated from that file, so it is the thing to trust.
authorization : Bearer ik_test_…
A secret key (ik_) reaches everything its account owns. A publishable key (pk_) is
browser-safe and reaches almost nothing: it cannot read invoices or create a custom one. The
prefix also decides the mode — _test_ or _live_ — and no key of either kind can change a
settlement address (why ).
The public checkout endpoints are the exception. They take the invoice’s client secret instead,
because they run in a customer’s browser:
x-client-secret : inv_3QkR7mVt9zLpXdB2hJn6Yw_secret_…
That secret reaches one invoice’s public endpoints, nothing else, and expires with the invoice.
The public view deliberately omits the merchant’s settlement address and net amount.
{ "error" : { "code" : "INVOICE_EXPIRED" , "message" : "This invoice has expired" } }
Switch on code. Each one has a page under /errors .
Prices (amount) are decimal strings in the invoice currency: "49.00". Everything else —
amountExpected, amountNet, amountIn, fee.amount — is an integer string in the asset’s
base units . Use BigInt, never a float. Assets are CAIP-19 IDs and chains are CAIP-2, so
eip155:8453/erc20:0x8335… is USDC on Base.
An endpoint whose contract is published but whose implementation has not landed answers
501 NOT_IMPLEMENTED . The shape in this reference is what it will
return.
POST /v0/invoices
Creates an invoice priced in USD. The customer may pay in any routable token on any routable chain; the merchant receives one settlement asset at its own address (§0).
Settlement is in a USD stablecoin (USDC on base, USDC on arbitrum, USDC on ethereum, USDC on solana, USDC on polygon, USDT on tron, USDT on ethereum, USDT on arbitrum, USDT on bsc), 1:1 with amount, or in BTC. A BTC invoice’s amountExpected is locked from live quotes when it is created (priceLock, §5.2); if no reliable price can be had the invoice is refused with 503 PRICE_UNAVAILABLE.
Re-sending a reference in the same mode returns 200 with the invoice that already exists, so a retried create never charges twice. References are scoped by mode: the same reference under a test key and a live key makes two separate invoices.
Parameter
In
Required
Notes
x-intents-affiliate
header
no
Store plugins: the Affiliate ID from the plugin settings. Links a merchant that nobody referred yet and that has no live payment (affiliate rules); never overwrites and never changes the fee.
Field
Type
Required
Notes
amount
string
yes
Price in the invoice currency, e.g. “49.00”
currency
USD
no
settlement
object
no
Choose between the merchant’s registered settlement targets. API keys cannot introduce a new address (§8.3).
settlement.asset
string
yes
settlement.address
string
yes
reference
string
no
The merchant’s own ID. Unique per merchant and mode, and the idempotency key.
description
string
no
customerEmail
string
no
successUrl
string
no
cancelUrl
string
no
expiresInSec
integer
no
metadata
object
no
curl https://api.intents.fi/v0/invoices \
-H 'authorization: Bearer $INTENTS_SECRET_KEY' \
-H 'x-intents-affiliate: <x-intents-affiliate>' \
-H 'content-type: application/json' \
"asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"address": "0x6A3fB91c7D8e45A2b0C1fE97D3a8B52c4e7F10dA"
"reference": "order_1042",
"description": "Pro plan — 1 month",
"customerEmail": "ana@example.com",
"successUrl": "https://northwood.example/thanks"
const response = await fetch ( "https://api.intents.fi/v0/invoices" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
"content-type" : "application/json" ,
"asset" : "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" ,
"address" : "0x6A3fB91c7D8e45A2b0C1fE97D3a8B52c4e7F10dA"
"reference" : "order_1042" ,
"description" : "Pro plan — 1 month" ,
"customerEmail" : "ana@example.com" ,
"successUrl" : "https://northwood.example/thanks"
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/invoices" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
"asset" : "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" ,
"address" : "0x6A3fB91c7D8e45A2b0C1fE97D3a8B52c4e7F10dA"
"reference" : "order_1042" ,
"description" : "Pro plan — 1 month" ,
"customerEmail" : "ana@example.com" ,
"successUrl" : "https://northwood.example/thanks"
response.raise_for_status()
Status
Means
200
An invoice with this reference already exists in this mode; it is returned unchanged
201
Invoice created. clientSecret is shown only here.
GET /v0/invoices
Parameter
In
Required
Notes
status
query
no
limit
query
no
startingAfter
query
no
The last id of the previous page
curl https://api.intents.fi/v0/invoices?status=paid &limit = 25 \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/invoices?status=paid&limit=25" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/invoices?status=paid&limit=25" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Invoices for this key’s merchant and mode, newest first
GET /v0/invoices/{id}
Parameter
In
Required
Notes
id
path
yes
curl https://api.intents.fi/v0/invoices/inv_3QkR7mVt9zLpXdB2hJn6Yw \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/invoices/inv_3QkR7mVt9zLpXdB2hJn6Yw" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/invoices/inv_3QkR7mVt9zLpXdB2hJn6Yw" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
The invoice, with its payment attempts
POST /v0/invoices/{id}/cancel
Only while open or underpaid. An invoice with a payment in flight is never canceled, so no customer pays an invoice we have written off.
Parameter
In
Required
Notes
id
path
yes
curl https://api.intents.fi/v0/invoices/inv_3QkR7mVt9zLpXdB2hJn6Yw/cancel \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/invoices/inv_3QkR7mVt9zLpXdB2hJn6Yw/cancel" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/invoices/inv_3QkR7mVt9zLpXdB2hJn6Yw/cancel" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
The canceled invoice
GET /v0/merchant
curl https://api.intents.fi/v0/merchant \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/merchant" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/merchant" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Profile, branding and the settlement targets in effect
PATCH /v0/merchant
Branding, display name and absorbRouteCost (§5.1) only. Settlement addresses cannot be changed with an API key: a stolen key must never be able to redirect a payout (§8.3). Change them in the dashboard, where it takes fresh email OTP and 24 hours.
Field
Type
Required
Notes
name
string
no
branding
object
no
absorbRouteCost
boolean
no
§5.1: absorb the route cost on stablecoin payments, up to 1% of the invoice. Applies to invoices created after the change.
curl https://api.intents.fi/v0/merchant \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/merchant" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/merchant" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
The updated profile
GET /v0/links/{id}
Parameter
In
Required
Notes
id
path
yes
curl https://api.intents.fi/v0/links/plink_Vb3kT9qLmZ2xR8wNc4HfJpYs6dGa1uEo
const response = await fetch ( "https://api.intents.fi/v0/links/plink_Vb3kT9qLmZ2xR8wNc4HfJpYs6dGa1uEo" , {
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/links/plink_Vb3kT9qLmZ2xR8wNc4HfJpYs6dGa1uEo" ,
response.raise_for_status()
Status
Means
200
The link
404
Unknown or off
POST /v0/links/{id}/invoices
Takes the merchant’s publishable key (pk_), or no key: the link ID is its capability, and a link can only create the invoice the merchant priced, or, on a custom link, one at an amount the customer chose inside the merchant’s bounds. A key must match the link’s account and mode. Body (optional JSON, schema PaymentLinkInvoiceRequest): quantity, amount (custom links, required there), customerEmail.
Parameter
In
Required
Notes
id
path
yes
curl https://api.intents.fi/v0/links/plink_Vb3kT9qLmZ2xR8wNc4HfJpYs6dGa1uEo/invoices \
const response = await fetch ( "https://api.intents.fi/v0/links/plink_Vb3kT9qLmZ2xR8wNc4HfJpYs6dGa1uEo/invoices" , {
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/links/plink_Vb3kT9qLmZ2xR8wNc4HfJpYs6dGa1uEo/invoices" ,
response.raise_for_status()
Status
Means
201
Created; send the customer to url
400
A bad quantity or amount, or a key from the other mode
404
Unknown or off
422
AMOUNT_OUT_OF_RANGE: outside the link’s minimum and maximum
429
Too many from this IP, or on this custom-amount link
GET /v0/checkout/domains/{host}
Which merchant a verified custom checkout domain (pay.merchant.com) belongs to. The hosted page calls it for any host that is not its own, and serves only that merchant’s invoices there. 404 for anything that is not a verified checkout domain, including one still waiting on DNS.
Parameter
In
Required
Notes
host
path
yes
curl https://api.intents.fi/v0/checkout/domains/<host> \
-H 'x-client-secret: $CLIENT_SECRET'
const response = await fetch ( "https://api.intents.fi/v0/checkout/domains/<host>" , {
"x-client-secret" : clientSecret,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/checkout/domains/<host>" ,
headers = { "x-client-secret" : client_secret},
response.raise_for_status()
Status
Means
200
A verified checkout domain
GET /v0/checkout/{invoiceId}
What the payer is shown: the price, the merchant’s name and theme, the status and the active attempt. Readable with the invoice ID alone, which carries 22+ characters of randomness, so it never returns the merchant’s settlement address or net amount.
Parameter
In
Required
Notes
invoiceId
path
yes
curl https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw \
-H 'x-client-secret: $CLIENT_SECRET'
const response = await fetch ( "https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw" , {
"x-client-secret" : clientSecret,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw" ,
headers = { "x-client-secret" : client_secret},
response.raise_for_status()
Status
Means
200
The public view of the invoice
GET /v0/checkout/{invoiceId}/options
The ranked “pay with” list. Each row is quoted exact-output through the core aggregator, so amountIn is all-in: the invoice plus the cost of delivering it, as one number the customer reads. Route cost is never broken out as gas, bridging or slippage (§5.1).
Assets whose provider minimum exceeds the invoice amount are left out (§5.4), and modes lists transfer only where a provider returns a deposit address for that asset.
With no payer the list is ten popular assets. With a payer, what that address holds of any payable asset on its own network joins them (up to 10 more), each with its balance; a row whose balance is below amountIn has covers: false and is listed after the ones the payer can afford. A balance that cannot be read within 800 ms is left out, never waited for (§6.4).
?assets= quotes up to 3 named assets on demand instead: the one a customer picked from GET …/assets. Those rows are never recommended. A payable asset no provider will quote right now comes back in unavailable; an asset that cannot pay this invoice at all (outside GET …/assets: a Bitcoin or NEAR token, a Mayan-only asset, the settlement asset) is refused with 422 NO_ROUTE_FOR_ASSET before anything is quoted, as POST …/attempts refuses it. Cache misses count against a per-invoice hourly limit (429 RATE_LIMITED).
Quotes are indicative and cached per invoice and asset for ttlSec; the binding amount comes from POST /attempts.
Parameter
In
Required
Notes
invoiceId
path
yes
payer
query
no
The payer’s address. Balances are read from it on its own VM (§6.4).
chains
query
no
Comma-separated CAIP-2 chain IDs, to narrow the list
assets
query
no
Up to 3 comma-separated CAIP-19 asset IDs to quote on demand: the asset a customer picked from search, or a short result set (§11.35). Only these are quoted. Cache misses count against a per-invoice hourly limit (429 RATE_LIMITED).
curl https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/options \
-H 'x-client-secret: $CLIENT_SECRET'
const response = await fetch ( "https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/options" , {
"x-client-secret" : clientSecret,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/options" ,
headers = { "x-client-secret" : client_secret},
response.raise_for_status()
Status
Means
200
Ranked payment options, newest quote first
GET /v0/checkout/{invoiceId}/assets
Searches every payable asset in the registry, not just the default list, by symbol, token name, network or contract address. Every word of q must match (“usdc base”).
Only assets that a provider can route exact-output to the invoice’s settlement asset are listed (§11.3). On Bitcoin and NEAR only the native coin is listed.
Search never quotes a long list. When the whole result set is 3 assets or fewer, each match carries its option (or null: nothing routes it right now). Otherwise price the one the customer picks with GET …/options?assets=.
Limited per invoice: 240 searches an hour (429 RATE_LIMITED).
Parameter
In
Required
Notes
invoiceId
path
yes
q
query
yes
What the customer typed: a symbol, a token name, a network, or a contract address. Every word must match.
limit
query
no
cursor
query
no
nextCursor from the previous page
payer
query
no
The payer’s address, so an inline quote can read their balance (§6.4)
curl https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/assets?q=usdc%20base &limit = 10 \
-H 'x-client-secret: $CLIENT_SECRET'
const response = await fetch ( "https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/assets?q=usdc%20base&limit=10" , {
"x-client-secret" : clientSecret,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/assets?q=usdc %20b ase&limit=10" ,
headers = { "x-client-secret" : client_secret},
response.raise_for_status()
Status
Means
200
Matching assets, best match first
POST /v0/checkout/{invoiceId}/attempts
Picks one asset and turns it into a core order: an exact-output quote for the invoice’s net amount (amountExpected less the checkout fee), paying the merchant’s settlement address, with the fee charged in route on top (§5.1, §11.53).
refundTo is required in transfer mode and defaults to payer in wallet mode (§11.2). It must be valid on the origin chain, because a failed payment is returned there and nowhere else.
Creating an attempt supersedes the invoice’s previous active one. The superseded deposit address can still be paid, and if it is, the money still reaches the merchant and is handled as a late payment (§3.2) — which is why the UI shows only the newest address.
Parameter
In
Required
Notes
invoiceId
path
yes
x-client-secret
header
no
The invoice’s clientSecret, from POST /v0/invoices
curl https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts \
-H 'x-client-secret: $CLIENT_SECRET' \
-H 'content-type: application/json' \
"asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payer": "0xB47c2Ae95D0f1836cA9E7b240F5dC83a61E09b7D",
"refundTo": "TRdG7wK2aXpL9oYcB5nVzQ4jMhF3sEuT6b"
const response = await fetch ( "https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts" , {
"x-client-secret" : clientSecret,
"content-type" : "application/json" ,
"asset" : "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" ,
"payer" : "0xB47c2Ae95D0f1836cA9E7b240F5dC83a61E09b7D" ,
"refundTo" : "TRdG7wK2aXpL9oYcB5nVzQ4jMhF3sEuT6b"
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts" ,
headers = { "x-client-secret" : client_secret},
"asset" : "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" ,
"payer" : "0xB47c2Ae95D0f1836cA9E7b240F5dC83a61E09b7D" ,
"refundTo" : "TRdG7wK2aXpL9oYcB5nVzQ4jMhF3sEuT6b"
response.raise_for_status()
Status
Means
201
The attempt, with the steps that pay it
POST /v0/checkout/{invoiceId}/agent
For software that pays on someone’s behalf (§12 C3). Call it with no body and it answers 402 Payment Required, x402-style: the invoice, and in accepts[] every asset it can be paid with and the indicative all-in amount for each. Nothing is created.
Call it again with { "asset", "mode": "transfer", "refundTo" } and it creates a payment attempt, exactly like POST …/attempts, tagged channel: "agent". The response carries the deposit address and the binding amount in display. Send exactly that amount, then poll GET …/attempts/{id} until invoiceStatus is paid. The merchant gets the same webhooks as for any other payment.
No client secret is needed: the invoice ID is the capability, as it is for the hosted page (§11.10), and the same per-invoice and per-IP attempt limits apply.
Parameter
In
Required
Notes
invoiceId
path
yes
curl https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/agent \
-H 'x-client-secret: $CLIENT_SECRET' \
-H 'content-type: application/json' \
"asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payer": "0xB47c2Ae95D0f1836cA9E7b240F5dC83a61E09b7D",
"refundTo": "TRdG7wK2aXpL9oYcB5nVzQ4jMhF3sEuT6b"
const response = await fetch ( "https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/agent" , {
"x-client-secret" : clientSecret,
"content-type" : "application/json" ,
"asset" : "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" ,
"payer" : "0xB47c2Ae95D0f1836cA9E7b240F5dC83a61E09b7D" ,
"refundTo" : "TRdG7wK2aXpL9oYcB5nVzQ4jMhF3sEuT6b"
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/agent" ,
headers = { "x-client-secret" : client_secret},
"asset" : "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" ,
"payer" : "0xB47c2Ae95D0f1836cA9E7b240F5dC83a61E09b7D" ,
"refundTo" : "TRdG7wK2aXpL9oYcB5nVzQ4jMhF3sEuT6b"
response.raise_for_status()
Status
Means
201
The attempt, with the deposit address (transfer) or the steps (wallet)
402
Payment required: the invoice and what it accepts
POST /v0/checkout/{invoiceId}/attempts/{id}/submit
Required by the providers that settle from a signature, and a shortcut everywhere else: telling us the hash finds the payment sooner than watching for it.
Parameter
In
Required
Notes
invoiceId
path
yes
id
path
yes
x-client-secret
header
no
The invoice’s clientSecret, from POST /v0/invoices
Field
Type
Required
Notes
txHash
string
no
signature
string
no
chain
string
no
curl https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts/inv_3QkR7mVt9zLpXdB2hJn6Yw/submit \
-H 'x-client-secret: $CLIENT_SECRET' \
-H 'content-type: application/json' \
"txHash": "0x7c1e4f93a2bd58e06c4a7f2319db8e5a4c0f6b27d9138ae5c2f74b081d6a93e4"
const response = await fetch ( "https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts/inv_3QkR7mVt9zLpXdB2hJn6Yw/submit" , {
"x-client-secret" : clientSecret,
"content-type" : "application/json" ,
"txHash" : "0x7c1e4f93a2bd58e06c4a7f2319db8e5a4c0f6b27d9138ae5c2f74b081d6a93e4"
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts/inv_3QkR7mVt9zLpXdB2hJn6Yw/submit" ,
headers = { "x-client-secret" : client_secret},
"txHash" : "0x7c1e4f93a2bd58e06c4a7f2319db8e5a4c0f6b27d9138ae5c2f74b081d6a93e4"
response.raise_for_status()
Status
Means
200
The attempt, with the submission recorded
GET /v0/checkout/{invoiceId}/attempts/{id}
Refreshed from the provider when stale, like core GET /v0/orders/{id}. Poll it every 2 s while the page is visible, backing off to 10 s after 5 minutes (§4.5). It carries invoiceStatus too, so one poll drives the whole screen.
Parameter
In
Required
Notes
invoiceId
path
yes
id
path
yes
curl https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts/inv_3QkR7mVt9zLpXdB2hJn6Yw \
-H 'x-client-secret: $CLIENT_SECRET'
const response = await fetch ( "https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts/inv_3QkR7mVt9zLpXdB2hJn6Yw" , {
"x-client-secret" : clientSecret,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/checkout/inv_3QkR7mVt9zLpXdB2hJn6Yw/attempts/inv_3QkR7mVt9zLpXdB2hJn6Yw" ,
headers = { "x-client-secret" : client_secret},
response.raise_for_status()
Status
Means
200
The attempt and the invoice status it implies
POST /v0/quotes
Field
Type
Required
Notes
tradeType
EXACT_INPUT | EXACT_OUTPUT
no
from
object
yes
from.asset
string
yes
from.amount
string
no
to
object
yes
to.asset
string
yes
to.amount
string
no
sender
string
yes
recipient
string
yes
refundTo
string
no
slippageBps
object
no
providers
array
no
excludeProviders
array
no
rank
output | speed | balanced
no
executionModes
array
no
timeoutMs
integer
no
curl https://api.intents.fi/v0/quotes \
-H 'authorization: Bearer $INTENTS_SECRET_KEY' \
-H 'content-type: application/json' \
"asset": "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
"sender": "0x15AAB9098125C5A728CA818B31620a902C25f764",
"recipient": "0x9b3c1f4A6D2E5b70CA18F4D3e9B2A7C641FD8E05",
"refundTo": "0x15AAB9098125C5A728CA818B31620a902C25f764"
const response = await fetch ( "https://api.intents.fi/v0/quotes" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
"content-type" : "application/json" ,
"asset" : "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831" ,
"asset" : "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
"sender" : "0x15AAB9098125C5A728CA818B31620a902C25f764" ,
"recipient" : "0x9b3c1f4A6D2E5b70CA18F4D3e9B2A7C641FD8E05" ,
"refundTo" : "0x15AAB9098125C5A728CA818B31620a902C25f764"
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/quotes" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
"asset" : "eip155:42161/erc20:0xaf88d065e77c8cC2239327C5EDb3A432268e5831" ,
"asset" : "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
"sender" : "0x15AAB9098125C5A728CA818B31620a902C25f764" ,
"recipient" : "0x9b3c1f4A6D2E5b70CA18F4D3e9B2A7C641FD8E05" ,
"refundTo" : "0x15AAB9098125C5A728CA818B31620a902C25f764"
response.raise_for_status()
Status
Means
200
Ranked quotes from every provider that answered in time
GET /v0/chains
curl https://api.intents.fi/v0/chains \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/chains" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/chains" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Supported chains
GET /v0/assets
Parameter
In
Required
Notes
chain
query
no
q
query
no
limit
query
no
curl https://api.intents.fi/v0/assets?limit= 25 \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/assets?limit=25" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/assets?limit=25" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Assets routable by at least one provider. Look up by address; symbols are display-only.
POST /v0/orders
Field
Type
Required
Notes
quoteId
string
yes
driftToleranceBps
integer
no
curl https://api.intents.fi/v0/orders \
-H 'authorization: Bearer $INTENTS_SECRET_KEY' \
-H 'content-type: application/json' \
const response = await fetch ( "https://api.intents.fi/v0/orders" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
"content-type" : "application/json" ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/orders" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Existing order for this quote
201
Order created
POST /v0/orders/{id}/submit
Parameter
In
Required
Notes
id
path
yes
Field
Type
Required
Notes
txHash
string
no
signature
string
no
chain
string
no
curl https://api.intents.fi/v0/orders/inv_3QkR7mVt9zLpXdB2hJn6Yw/submit \
-H 'authorization: Bearer $INTENTS_SECRET_KEY' \
-H 'content-type: application/json' \
"txHash": "0x7c1e4f93a2bd58e06c4a7f2319db8e5a4c0f6b27d9138ae5c2f74b081d6a93e4"
const response = await fetch ( "https://api.intents.fi/v0/orders/inv_3QkR7mVt9zLpXdB2hJn6Yw/submit" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
"content-type" : "application/json" ,
"txHash" : "0x7c1e4f93a2bd58e06c4a7f2319db8e5a4c0f6b27d9138ae5c2f74b081d6a93e4"
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/orders/inv_3QkR7mVt9zLpXdB2hJn6Yw/submit" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
"txHash" : "0x7c1e4f93a2bd58e06c4a7f2319db8e5a4c0f6b27d9138ae5c2f74b081d6a93e4"
response.raise_for_status()
Status
Means
200
Submission recorded
GET /v0/orders/{id}
Parameter
In
Required
Notes
id
path
yes
curl https://api.intents.fi/v0/orders/inv_3QkR7mVt9zLpXdB2hJn6Yw \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/orders/inv_3QkR7mVt9zLpXdB2hJn6Yw" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/orders/inv_3QkR7mVt9zLpXdB2hJn6Yw" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Order status (refreshed from the provider when stale)
POST /v0/connect/check
Validates what a plugin sent to dashboard.intents.fi/connect: a known platform, https URLs, a return_url on the same origin as site_url, a state and an S256 code_challenge. A refused request is never shown and the browser is never sent to its return_url. Needs no authentication and reads nothing.
Field
Type
Required
Notes
platform
string
yes
One of woocommerce, whmcs, prestashop, opencart, magento
site_url
string
yes
The store, e.g. https://shop.example.com
return_url
string
yes
Where the browser goes back to. Must share site_url’s origin.
state
string
yes
The plugin’s own random value, echoed back
code_challenge
string
yes
base64url(SHA-256(code_verifier))
code_challenge_method
S256
no
mode
test | live
no
Default test
partner
string
no
Agency Partner ID, when present
curl https://api.intents.fi/v0/connect/check \
-H 'authorization: Bearer $INTENTS_SECRET_KEY' \
-H 'content-type: application/json' \
"platform": "woocommerce",
"site_url": "https://shop.northwood.example",
"return_url": "https://shop.northwood.example/wp-admin/admin-post.php?action=intentsfi_connect_return",
"state": "Vb3k9QxR2mT7LpZ4cW8nYaKd",
"code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
const response = await fetch ( "https://api.intents.fi/v0/connect/check" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
"content-type" : "application/json" ,
"platform" : "woocommerce" ,
"site_url" : "https://shop.northwood.example" ,
"return_url" : "https://shop.northwood.example/wp-admin/admin-post.php?action=intentsfi_connect_return" ,
"state" : "Vb3k9QxR2mT7LpZ4cW8nYaKd" ,
"code_challenge" : "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM" ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/connect/check" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
"platform" : "woocommerce" ,
"site_url" : "https://shop.northwood.example" ,
"return_url" : "https://shop.northwood.example/wp-admin/admin-post.php?action=intentsfi_connect_return" ,
"state" : "Vb3k9QxR2mT7LpZ4cW8nYaKd" ,
"code_challenge" : "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM" ,
response.raise_for_status()
Status
Means
200
A request the consent screen may show
400
INVALID_REQUEST, with details.field
POST /v0/connect/authorize
Dashboard session only. Re-checks the request, then issues a single-use code (5 minutes) bound to the site, the return URL and the challenge. mode: live is LIVE_MODE_LOCKED until the go-live checklist is done. Choose the account with x-account-id.
Field
Type
Required
Notes
platform
string
yes
One of woocommerce, whmcs, prestashop, opencart, magento
site_url
string
yes
The store, e.g. https://shop.example.com
return_url
string
yes
Where the browser goes back to. Must share site_url’s origin.
state
string
yes
The plugin’s own random value, echoed back
code_challenge
string
yes
base64url(SHA-256(code_verifier))
code_challenge_method
S256
no
mode
test | live
no
Default test
partner
string
no
Agency Partner ID, when present
curl https://api.intents.fi/v0/connect/authorize \
-H 'authorization: Bearer $INTENTS_SECRET_KEY' \
-H 'content-type: application/json' \
"platform": "woocommerce",
"site_url": "https://shop.northwood.example",
"return_url": "https://shop.northwood.example/wp-admin/admin-post.php?action=intentsfi_connect_return",
"state": "Vb3k9QxR2mT7LpZ4cW8nYaKd",
"code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
const response = await fetch ( "https://api.intents.fi/v0/connect/authorize" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
"content-type" : "application/json" ,
"platform" : "woocommerce" ,
"site_url" : "https://shop.northwood.example" ,
"return_url" : "https://shop.northwood.example/wp-admin/admin-post.php?action=intentsfi_connect_return" ,
"state" : "Vb3k9QxR2mT7LpZ4cW8nYaKd" ,
"code_challenge" : "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM" ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/connect/authorize" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
"platform" : "woocommerce" ,
"site_url" : "https://shop.northwood.example" ,
"return_url" : "https://shop.northwood.example/wp-admin/admin-post.php?action=intentsfi_connect_return" ,
"state" : "Vb3k9QxR2mT7LpZ4cW8nYaKd" ,
"code_challenge" : "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM" ,
response.raise_for_status()
Status
Means
200
Approved
400
INVALID_REQUEST
401
No valid dashboard session
403
SESSION_REQUIRED for an API key; FORBIDDEN below the role needed
POST /v0/connect/token
Called by the plugin’s server, never a browser. The code is spent by the first attempt, right or wrong; presenting a spent code again revokes the connection it made. Returns a secret key named for the site and scoped to the merchant, which can create invoices and register webhooks but never change where the merchant is paid. Test-mode keys unless the code was approved for live after go-live.
Field
Type
Required
Notes
code
string
yes
code_verifier
string
yes
site_url
string
yes
The same site_url the request named
curl https://api.intents.fi/v0/connect/token \
-H 'authorization: Bearer $INTENTS_SECRET_KEY' \
-H 'content-type: application/json' \
"code": "<the code from return_url>",
"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk",
"site_url": "https://shop.northwood.example"
const response = await fetch ( "https://api.intents.fi/v0/connect/token" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
"content-type" : "application/json" ,
"code" : "<the code from return_url>" ,
"code_verifier" : "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk" ,
"site_url" : "https://shop.northwood.example"
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/connect/token" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
"code" : "<the code from return_url>" ,
"code_verifier" : "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk" ,
"site_url" : "https://shop.northwood.example"
response.raise_for_status()
Status
Means
200
Connected
400
CONNECT_CODE_INVALID: unknown, expired, used, wrong verifier or site
403
LIVE_MODE_LOCKED or MERCHANT_RESTRICTED
POST /v0/connect/revoke
Authenticated with the connection’s own secret key. Revokes its keys and the webhooks they registered, at once.
curl https://api.intents.fi/v0/connect/revoke \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/connect/revoke" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/connect/revoke" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Revoked
401
Missing or invalid API key
404
The key is not a Connect key
POST /v0/affiliate/signup
curl https://api.intents.fi/v0/affiliate/signup \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/signup" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/signup" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
201
Created
400
INVALID_REQUEST, with details.field
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
409
AFFILIATE_EXISTS: this user already has a profile
GET /v0/affiliate/me
curl https://api.intents.fi/v0/affiliate/me \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/me" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/me" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Profile
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
PATCH /v0/affiliate/me
curl https://api.intents.fi/v0/affiliate/me \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/me" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/me" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Saved
400
INVALID_REQUEST, with details.field
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
409
AFFILIATE_CODE_TAKEN, or AFFILIATE_CODE_LOCKED after one change
POST /v0/affiliate/me/close
Sets status to closed (a status, not a delete: the audit trail and the code stay reserved). Refused with AFFILIATE_CLOSE_BLOCKED while any commission is pending, payable or held, or a payout is pending. Added by Agent B (orchestrator decision, 2026-11-26).
curl https://api.intents.fi/v0/affiliate/me/close \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/me/close" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/me/close" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Closed
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
409
AFFILIATE_CLOSE_BLOCKED: commission is still pending, payable or held
GET /v0/affiliate/overview
Parameter
In
Required
Notes
range
query
no
Default 30d; the funnel and series
curl https://api.intents.fi/v0/affiliate/overview \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/overview" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/overview" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Overview
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
GET /v0/affiliate/merchants
Parameter
In
Required
Notes
status
query
no
source
query
no
format
query
no
csv for a download
curl https://api.intents.fi/v0/affiliate/merchants?status=signed_up \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/merchants?status=signed_up" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/merchants?status=signed_up" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Merchants
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
GET /v0/affiliate/commissions
Parameter
In
Required
Notes
status
query
no
month
query
no
Payment month, YYYY-MM
merchant
query
no
A merchantRef from /v0/affiliate/merchants
format
query
no
csv for a download
curl https://api.intents.fi/v0/affiliate/commissions?status=paid \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/commissions?status=paid" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/commissions?status=paid" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Commissions
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
GET /v0/affiliate/links
curl https://api.intents.fi/v0/affiliate/links \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/links" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/links" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Links
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
POST /v0/affiliate/links
curl https://api.intents.fi/v0/affiliate/links \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/links" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/links" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
201
Created
400
INVALID_REQUEST, with details.field
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
409
AFFILIATE_LINK_EXISTS: that sub-ID is already one of your links
DELETE /v0/affiliate/links/{id}
Parameter
In
Required
Notes
id
path
yes
curl https://api.intents.fi/v0/affiliate/links/inv_3QkR7mVt9zLpXdB2hJn6Yw \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/links/inv_3QkR7mVt9zLpXdB2hJn6Yw" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/links/inv_3QkR7mVt9zLpXdB2hJn6Yw" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
204
Removed
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
PUT /v0/affiliate/payout-wallet
The first wallet takes effect at once. Every later change needs stepUpCode (purpose affiliate_payout_wallet). A wallet changed less than 24 hours before a payout run is skipped that month.
curl https://api.intents.fi/v0/affiliate/payout-wallet \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/payout-wallet" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/payout-wallet" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Saved
400
INVALID_REQUEST: bad checksum, unsupported chain or a known exchange address
401
No valid dashboard session
403
SESSION_REQUIRED, STEP_UP_REQUIRED, AFFILIATE_SUSPENDED or AFFILIATE_CLOSED
404
AFFILIATE_REQUIRED: this user has no affiliate profile
POST /v0/affiliate/step-up
Works without an account (an affiliate is a user’s). POST /v0/dashboard/step-up with purpose: affiliate_payout_wallet issues the same code for a user who is an account member. Send the code as stepUpCode on PUT /v0/affiliate/payout-wallet. Added by Agent B (2026-11-26).
curl https://api.intents.fi/v0/affiliate/step-up \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/step-up" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/step-up" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
A code was emailed to the signed-in user
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
429
RATE_LIMITED: too many codes this hour
GET /v0/affiliate/payouts
curl https://api.intents.fi/v0/affiliate/payouts \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/affiliate/payouts" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/affiliate/payouts" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Payouts
401
No valid dashboard session
403
SESSION_REQUIRED for an API key
404
AFFILIATE_REQUIRED: this user has no affiliate profile
GET /v0/ref/resolve
Parameter
In
Required
Notes
code
query
yes
curl https://api.intents.fi/v0/ref/resolve?code=%3Ccode%3E \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/ref/resolve?code=%3Ccode%3E" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/ref/resolve?code=%3Ccode %3E " ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Cached for 5 minutes
GET /v0/status
Per-protocol success and quote-error rates, the median improvement of intents.fi’s best quote over NEAR Intents alone, recent failover events, and each protocol’s state for each of the last 90 UTC days. Public, aggregates only, test mode excluded, recomputed at most once a minute.
Parameter
In
Required
Notes
window
query
no
How far back the figures reach
curl https://api.intents.fi/v0/status \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/status" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/status" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
The route status for the window
GET /health
curl https://api.intents.fi/health \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/health" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/health" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Service is up
GET /health/migrations
curl https://api.intents.fi/health/migrations \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/health/migrations" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/health/migrations" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
The database has applied every migration this deploy expects
503
Migrations are pending, or the migration history can’t be read
GET /health/config
curl https://api.intents.fi/health/config \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/health/config" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/health/config" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Every secret production needs is set
503
A production secret is missing; missing names it
POST /v0/webhooks
Field
Type
Required
Notes
url
string
yes
events
array
no
Event types to deliver. Checkout merchants subscribe to invoice.*; they never receive order.updated for a payment attempt’s order (SPEC-checkout §4.4).
curl https://api.intents.fi/v0/webhooks \
-H 'authorization: Bearer $INTENTS_SECRET_KEY' \
-H 'content-type: application/json' \
"url": "https://northwood.example/hooks/intents"
const response = await fetch ( "https://api.intents.fi/v0/webhooks" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
"content-type" : "application/json" ,
"url" : "https://northwood.example/hooks/intents"
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/webhooks" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
"url" : "https://northwood.example/hooks/intents"
response.raise_for_status()
Status
Means
201
Webhook registered. The signing secret is returned only here.
GET /v0/webhooks
curl https://api.intents.fi/v0/webhooks \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/webhooks" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/webhooks" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Active webhooks
POST /v0/webhooks/{id}/test
Delivers one test event, signed with the endpoint’s real secret, outside the retry queue. type picks the event (default invoice.paid): its data is a sample test-mode invoice that does not exist, and the envelope carries sample: true. webhook.test sends a ping with no invoice. Test (ik_test_) keys only: a live key gets TEST_MODE_ONLY. The response carries the request body and the endpoint’s answer (truncated to 2 KB), whatever it was.
Parameter
In
Required
Notes
id
path
yes
Field
Type
Required
Notes
type
webhook.test | invoice.processing | invoice.underpaid | invoice.paid | invoice.expired | invoice.canceled | invoice.needs_review
no
Default invoice.paid.
curl https://api.intents.fi/v0/webhooks/inv_3QkR7mVt9zLpXdB2hJn6Yw/test \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/webhooks/inv_3QkR7mVt9zLpXdB2hJn6Yw/test" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/webhooks/inv_3QkR7mVt9zLpXdB2hJn6Yw/test" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Sent, whether or not the endpoint accepted it: see delivered.
DELETE /v0/webhooks/{id}
Parameter
In
Required
Notes
id
path
yes
curl https://api.intents.fi/v0/webhooks/inv_3QkR7mVt9zLpXdB2hJn6Yw \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/webhooks/inv_3QkR7mVt9zLpXdB2hJn6Yw" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/webhooks/inv_3QkR7mVt9zLpXdB2hJn6Yw" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
GET /v0/fees/balance
curl https://api.intents.fi/v0/fees/balance \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/fees/balance" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/fees/balance" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Partner fee balance: accrued partner share minus payouts sent
GET /v0/fees/statement
Parameter
In
Required
Notes
month
query
yes
format
query
no
curl https://api.intents.fi/v0/fees/statement?month=2026-10 \
-H 'authorization: Bearer $INTENTS_SECRET_KEY'
const response = await fetch ( "https://api.intents.fi/v0/fees/statement?month=2026-10" , {
authorization: `Bearer ${ process . env . INTENTS_SECRET_KEY }` ,
const { error } = await response. json ();
throw new Error ( `${ error . code }: ${ error . message }` );
const data = await response. json ();
"https://api.intents.fi/v0/fees/statement?month=2026-10" ,
headers = { "authorization" : f "Bearer { os.environ[ 'INTENTS_SECRET_KEY' ] } " },
response.raise_for_status()
Status
Means
200
Per-order fee lines for a month, with totals (JSON, or CSV with format=csv)