Prices API
Prices for agents per call, session, result or subscription, and the 402 challenge each produces.
Base URL https://api.ndstill.com/v2. Send Authorization: Bearer with a key, Ndstill-Version: 2026-11-01, and an Idempotency-Key on every POST. Conventions, scopes and errors are in the API overview and Errors and decline reasons. Examples come from the mock backend; the shapes are the TypeScript types in packages/api.
Create a price#
/v2/prices- namestringrequired
- resource_patternstringrequired
- unitPriceUnitrequired
"month""call""session""result""mcp_tool_call" - amountMoneyrequired
An amount: integer minor units + asset.
Money: 2 fields
- amountnumberrequired
- assetAssetCoderequired
"USD""USDC""EUR""GBP"
- rails_acceptedRail[]required
"card""network_token""checkout_token""stablecoin""bank""ai""cloud" - descriptionstring | null
- idId
- object"price"
- org_idId
- created_atTimestamp
- updated_atTimestampoptional
- test_modebooleanoptional
True for test-mode objects (simulations, sandbox).
- seller_idId
- namestring
- resource_patternstring
- unitPriceUnit
"month""call""session""result""mcp_tool_call" - amountMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumber
- assetAssetCode
"USD""USDC""EUR""GBP"
- rails_acceptedRail[]
"card""network_token""checkout_token""stablecoin""bank""ai""cloud" - activeboolean
- challenge_previewmap of unknown
Preview of the 402 challenge this price produces.
- kindstring enumoptional
HTTP endpoint or MCP tool (MCP tools have an mcp:// resource).
"endpoint""mcp_tool" - descriptionstring | nulloptional
One line agents see in the challenge and the tool annotation.
- paid_30dnumberoptional
Paid requests in the last 30 days.
- 400invalid_request
A field is missing or invalid; fields names each one.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/prices" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Search call",
"resource_pattern": "/v1/search",
"unit": "call",
"amount": {
"amount": 10000,
"asset": "USDC"
},
"rails_accepted": [
"stablecoin"
]
}'{
"object": "error",
"type": "conflict",
"code": "conflict",
"message": "/v1/search already has an active price. Edit that one instead.",
"request_id": "req_3fe83a40e11802273e2f"
}The mock answered this sample with an error; its message says why. Adjust the request in Try it below.
Runs against the in-browser mock with a test key. Nothing leaves your browser.
List prices#
/v2/prices- activeboolean
- cursorstring
- limitnumber
1–200, default 50.
- qstring
Free-text search over names, ids and descriptors.
- sortstring
Sort field, prefix "-" for descending ("-created_at" is the default).
- created_gteTimestamp
created_at >= (ISO).
- created_lteTimestamp
created_at <= (ISO).
Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:
The same Price object as Create a price.
- 400invalid_request
A query parameter is invalid.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X GET "https://api.ndstill.com/v2/prices?limit=2" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"object": "list",
"data": [
{
"id": "price_01M0XRARV2XB92NZ04EC8Y5R5K",
"object": "price",
"org_id": "org_443B247B2FC3D2A13FAC0AEF86",
"created_at": "2026-08-27T00:43:12.610Z",
"seller_id": "sel_01M0V5Y1V29PSN366B6JQB651X",
"name": "Pro plan",
"resource_pattern": "/v1/*",
"unit": "month",
"amount": {
"amount": 9900,
"asset": "USD"
},
"rails_accepted": [
"card",
"checkout_token"
],
"active": true,
"challenge_preview": {
"status": 402,
"headers": {
"Content-Type": "application/json",
"Cache-Control": "no-store",
"WWW-Authenticate": "Payment realm=\"api.northwind.example\", methods=\"checkout\"",
"X-Ndstill-Verify": "required"
},
"body": {
"x402Version": 1,
"error": "Payment required",
"resource": "https://api.northwind.example/v1/*",
"accepts": [
{
"scheme": "checkout",
"rail": "card",
"amount": "99.00",
"currency": "USD",
"processor": "stripe",
"checkout": "https://api.northwind.example/agent-checkout"
},
{
"scheme": "checkout",
"rail": "checkout_token",
"amount": "99.00",
"currency": "USD",
"processor": "stripe",
"checkout": "https://api.northwind.example/agent-checkout"
}
],
"ndstill": {
"price_id": "price_01M0XRARV2XB92NZ04EC8Y5R5K",
"unit": "month",
"amount": "99.00",
"asset": "USD",
"verify": {
"endpoint": "https://verify.ndstill.example/v1/check",
"passport_signature": "required",
"mandate": "optional",
"min_owner_level": "email"
},
"receipt": "signed by buyer, seller and ndStill"
}
}
},
"kind": "endpoint",
"description": "Unlimited calls for a month",
"paid_30d": 15
},
{
"id": "price_01M0XRARV2VWEVEWAHJCVM3C1B",
"object": "price",
"org_id": "org_443B247B2FC3D2A13FAC0AEF86",
"created_at": "2026-09-10T00:43:12.610Z",
"seller_id": "sel_01M0V5Y1V29PSN366B6JQB651X",
"name": "MCP tool: enrich_company",
"resource_pattern": "mcp://acme-data/enrich_company",
"unit": "mcp_tool_call",
"amount": {
"amount": 50000,
"asset": "USDC"
},
"rails_accepted": [
"stablecoin"
],
"active": true,
"challenge_preview": {
"status": 402,
"headers": {
"Content-Type": "application/json",
"Cache-Control": "no-store",
"WWW-Authenticate": "Payment realm=\"api.northwind.example\", methods=\"x402\"",
"X-Ndstill-Verify": "required"
},
"body": {
"x402Version": 1,
"error": "Payment required",
"resource": "mcp://acme-data/enrich_company",
"accepts": [
{
"scheme": "exact",
"network": "base",
"asset": "USDC",
"maxAmountRequired": "50000",
"payTo": "0xaa9c53d45ae3406dd0b8740c9f7c0035c05cece4",
"resource": "mcp://acme-data/enrich_company",
"description": "Company profile from a domain",
"mimeType": "application/json",
"maxTimeoutSeconds": 60
}
],
"ndstill": {
"price_id": "price_01M0XRARV2VWEVEWAHJCVM3C1B",
"unit": "mcp_tool_call",
"amount": "0.050000",
"asset": "USDC",
"verify": {
"endpoint": "https://verify.ndstill.example/v1/check",
"passport_signature": "required",
"mandate": "optional",
"min_owner_level": "email"
},
"receipt": "signed by buyer, seller and ndStill"
}
}
},
"kind": "mcp_tool",
"description": "Company profile from a domain",
"paid_30d": 23
}
],
"has_more": true,
"next_cursor": "Mg==",
"total": 5
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Retrieve a price#
/v2/prices/{id}- idIdrequired
A prefixed ID from this org.
The same Price object as Create a price.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 404not_found
No object with that id in this org.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X GET "https://api.ndstill.com/v2/prices/price_01M0XRARV2XB92NZ04EC8Y5R5K" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01"{
"id": "price_01M0XRARV2XB92NZ04EC8Y5R5K",
"object": "price",
"org_id": "org_443B247B2FC3D2A13FAC0AEF86",
"created_at": "2026-08-27T00:43:12.610Z",
"seller_id": "sel_01M0V5Y1V29PSN366B6JQB651X",
"name": "Pro plan",
"resource_pattern": "/v1/*",
"unit": "month",
"amount": {
"amount": 9900,
"asset": "USD"
},
"rails_accepted": [
"card",
"checkout_token"
],
"active": true,
"challenge_preview": {
"status": 402,
"headers": {
"Content-Type": "application/json",
"Cache-Control": "no-store",
"WWW-Authenticate": "Payment realm=\"api.northwind.example\", methods=\"checkout\"",
"X-Ndstill-Verify": "required"
},
"body": {
"x402Version": 1,
"error": "Payment required",
"resource": "https://api.northwind.example/v1/*",
"accepts": [
{
"scheme": "checkout",
"rail": "card",
"amount": "99.00",
"currency": "USD",
"processor": "stripe",
"checkout": "https://api.northwind.example/agent-checkout"
},
{
"scheme": "checkout",
"rail": "checkout_token",
"amount": "99.00",
"currency": "USD",
"processor": "stripe",
"checkout": "https://api.northwind.example/agent-checkout"
}
],
"ndstill": {
"price_id": "price_01M0XRARV2XB92NZ04EC8Y5R5K",
"unit": "month",
"amount": "99.00",
"asset": "USD",
"verify": {
"endpoint": "https://verify.ndstill.example/v1/check",
"passport_signature": "required",
"mandate": "optional",
"min_owner_level": "email"
},
"receipt": "signed by buyer, seller and ndStill"
}
}
},
"kind": "endpoint",
"description": "Unlimited calls for a month",
"paid_30d": 15
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Update a price#
/v2/prices/{id}- idIdrequired
A prefixed ID from this org.
- namestring
- resource_patternstring
- unitstring enum
"month""call""session""result""mcp_tool_call" - amountMoney
An amount: integer minor units + asset.
Money: 2 fields
- amountnumberrequired
- assetAssetCoderequired
"USD""USDC""EUR""GBP"
- rails_acceptedRail[]
"card""network_token""checkout_token""stablecoin""bank""ai""cloud" - descriptionstring | null
- activeboolean
The same Price object as Create a price.
- 400invalid_request
A field is missing or invalid; fields names each one.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 404not_found
No object with that id in this org.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X PATCH "https://api.ndstill.com/v2/prices/price_01M0XRARV2XB92NZ04EC8Y5R5K" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Content-Type: application/json" \
-d '{
"amount": {
"amount": 4200,
"asset": "USD"
}
}'{
"id": "price_01M0XRARV2XB92NZ04EC8Y5R5K",
"object": "price",
"org_id": "org_443B247B2FC3D2A13FAC0AEF86",
"created_at": "2026-08-27T00:43:12.610Z",
"seller_id": "sel_01M0V5Y1V29PSN366B6JQB651X",
"name": "Pro plan",
"resource_pattern": "/v1/*",
"unit": "month",
"amount": {
"amount": 4200,
"asset": "USD"
},
"rails_accepted": [
"card",
"checkout_token"
],
"active": true,
"challenge_preview": {
"status": 402,
"headers": {
"Content-Type": "application/json",
"Cache-Control": "no-store",
"WWW-Authenticate": "Payment realm=\"api.northwind.example\", methods=\"checkout\"",
"X-Ndstill-Verify": "required"
},
"body": {
"x402Version": 1,
"error": "Payment required",
"resource": "https://api.northwind.example/v1/*",
"accepts": [
{
"scheme": "checkout",
"rail": "card",
"amount": "42.00",
"currency": "USD",
"processor": "stripe",
"checkout": "https://api.northwind.example/agent-checkout"
},
{
"scheme": "checkout",
"rail": "checkout_token",
"amount": "42.00",
"currency": "USD",
"processor": "stripe",
"checkout": "https://api.northwind.example/agent-checkout"
}
],
"ndstill": {
"price_id": "price_01M0XRARV2XB92NZ04EC8Y5R5K",
"unit": "month",
"amount": "42.00",
"asset": "USD",
"verify": {
"endpoint": "https://verify.ndstill.example/v1/check",
"passport_signature": "required",
"mandate": "optional",
"min_owner_level": "email"
},
"receipt": "signed by buyer, seller and ndStill"
}
}
},
"kind": "endpoint",
"description": "Unlimited calls for a month",
"paid_30d": 15,
"updated_at": "2026-11-23T00:43:13.491Z"
}Runs against the in-browser mock with a test key. Nothing leaves your browser.
Preview a price's 402 challenge#
/v2/prices/previewThe HTTP 402 response, MCP tool annotation and discovery entry a draft price produces.
- namestringrequired
- resource_patternstringrequired
- unitPriceUnitrequired
"month""call""session""result""mcp_tool_call" - amountMoneyrequired
An amount: integer minor units + asset.
Money: 2 fields
- amountnumberrequired
- assetAssetCoderequired
"USD""USDC""EUR""GBP"
- rails_acceptedRail[]required
"card""network_token""checkout_token""stablecoin""bank""ai""cloud" - descriptionstring | null
- object"price_preview"
- httpobject
The HTTP 402 response: status, headers and JSON body.
3 fields
- status402
- headersmap of string
- bodymap of unknown
- mcpmap of unknown | null
MCP tool annotation (MCP tools only).
- discoverymap of unknown
The entry in the seller's discovery file (/.well-known/agent-pricing.json).
- 400invalid_request
A field is missing or invalid; fields names each one.
- 401authentication
The key or token is missing, expired or revoked.
- 403permission
The key's scopes or the person's role don't allow this.
- 409conflict
The object changed or already exists, or the Idempotency-Key was reused with a different body.
- 429rate_limited
Slow down; retry after the Retry-After header.
curl -X POST "https://api.ndstill.com/v2/prices/preview" \
-H "Authorization: Bearer $NDSTILL_API_KEY" \
-H "Ndstill-Version: 2026-11-01" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Search call",
"resource_pattern": "/v1/search",
"unit": "call",
"amount": {
"amount": 10000,
"asset": "USDC"
},
"rails_accepted": [
"stablecoin"
]
}'{
"object": "price_preview",
"http": {
"status": 402,
"headers": {
"Content-Type": "application/json",
"Cache-Control": "no-store",
"WWW-Authenticate": "Payment realm=\"api.northwind.example\", methods=\"x402\"",
"X-Ndstill-Verify": "required"
},
"body": {
"x402Version": 1,
"error": "Payment required",
"resource": "https://api.northwind.example/v1/search",
"accepts": [
{
"scheme": "exact",
"network": "base",
"asset": "USDC",
"maxAmountRequired": "10000",
"payTo": "0xaa9c53d45ae3406dd0b8740c9f7c0035c05cece4",
"resource": "https://api.northwind.example/v1/search",
"description": "Search call",
"mimeType": "application/json",
"maxTimeoutSeconds": 60
}
],
"ndstill": {
"price_id": "price_draft",
"unit": "call",
"amount": "0.010000",
"asset": "USDC",
"verify": {
"endpoint": "https://verify.ndstill.example/v1/check",
"passport_signature": "required",
"mandate": "optional",
"min_owner_level": "email"
},
"receipt": "signed by buyer, seller and ndStill"
}
}
},
"mcp": null,
"discovery": {
"resource": "https://api.northwind.example/v1/search",
"name": "Search call",
"unit": "call",
"price": {
"amount": "0.010000",
"asset": "USDC"
},
"rails": [
"stablecoin"
],
"description": null
}
}Runs against the in-browser mock with a test key. Nothing leaves your browser.