Skip to content
ndStill is in development. These docs describe the v2 API as designed; the SDKs and the hosted MCP server are previews and not generally available.
Docs

Payment intents API

An agent's pay() call: one request to pay a counterparty, decided by the pipeline and then routed to a rail.

5 endpointsGenerated from the typed registry

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 payment intent#

POST/v2/payment-intents

The agent's pay() call. Runs the full decision pipeline and returns the payment with status approved, held (with an approval_id) or declined (with reasons). Send an Idempotency-Key so a retry never pays twice.

Request body PaymentIntentCreate
  • agent_idIdrequired
  • amountMoneyrequired

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumberrequired
    • assetAssetCoderequired
      "USD""USDC""EUR""GBP"
  • counterpartystringrequired
  • purposestring
  • rail_preferenceRail[]
    "card""network_token""checkout_token""stablecoin""bank""ai""cloud"
  • mandate_idId | null
  • idempotency_keystring
  • payee_idId

    Bank transfers: who is paid (a payee, pye_…).

  • bank_networkstring enum

    Bank transfers: ach (the default), rtp, or book (between your own accounts at the bank).

    "ach""rtp""book"
Response PaymentIntent
  • idId
  • object"payment_intent"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

    True for test-mode objects (simulations, sandbox).

  • agentRef

    Small reference used for denormalized names in lists (no N+1 lookups in tables).

    Ref: 2 fields
    • idId
    • namestring
  • tree_rootRef | null

    Root of the agent's tree (for "agent or tree" filters).

    Ref: 2 fields
    • idId
    • namestring
  • teamRef | null

    Small reference used for denormalized names in lists (no N+1 lookups in tables).

    Ref: 2 fields
    • idId
    • namestring
  • amountMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • settled_amountMoney | null

    Final settled amount when it differs (tips, FX, partial capture).

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • counterpartyobject
    4 fields
    • idId
    • namestring
    • categorystring
    • descriptorstring
  • purposestring
  • railRail
    "card""network_token""checkout_token""stablecoin""bank""ai""cloud"
  • rail_preferenceRail[]
    "card""network_token""checkout_token""stablecoin""bank""ai""cloud"
  • statusPaymentStatus
    "requested""expired""frozen""held""approved""declined""authorized""settled""refunded""disputed""failed"
  • funding_sourceRef

    Small reference used for denormalized names in lists (no N+1 lookups in tables).

    Ref: 2 fields
    • idId
    • namestring
  • connectionRef | null

    Small reference used for denormalized names in lists (no N+1 lookups in tables).

    Ref: 2 fields
    • idId
    • namestring
  • mandate_idId | null
  • decision_idId | null
  • approval_idId | null
  • attempt_idId | null
  • credential_idId | null
  • dispute_idId | null
  • receipt_idId | null
  • gatesGateMark[]

    Compact gate strip for rows: one mark per stage. Full trace is on the decision.

    GateMark: 2 fields
    • stageStageId
      "freeze""approval""policy""mandate""authenticate""entitlement""funding""counterparty""risk""budget""record"
    • resultGateResult
      "hold""pass""block""skip""not_reached"
  • reason_summarystring | null

    First reason it was held or declined, in plain language (full list on the decision).

  • idempotency_keystring
  • dimsobject

    Attribution dimensions (Books).

    3 fields
    • customerstringoptional
    • taskstringoptional
    • projectstringoptional
Errors
  • 400invalid_request

    A field is missing or invalid; fields names each one.

  • 401authentication

    The key or token is missing, expired or revoked.

  • 402declined

    The pipeline declined the payment; decline_reasons[] says why.

  • 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.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/payment-intents" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agt_01KYW6M8REDTGCTQ2ZK0CMDADJ",
    "amount": {
      "amount": 4200,
      "asset": "USD"
    },
    "counterparty": "Delta Air Lines",
    "purpose": "Flight SFO to JFK for the offsite",
    "idempotency_key": "docs-example-0001"
  }'
Response 200
{
  "id": "pi_01M82XPRNF89TFZB3MJVVT4NCF",
  "object": "payment_intent",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-23T00:43:13.455Z",
  "updated_at": "2026-11-23T00:43:13.515Z",
  "agent": {
    "id": "agt_01KYW6M8REDTGCTQ2ZK0CMDADJ",
    "name": "Cloud cost guard"
  },
  "tree_root": {
    "id": "agt_01KYW6M8REDTGCTQ2ZK0CMDADJ",
    "name": "Cloud cost guard"
  },
  "team": {
    "id": "team_01K8HHWYMEW49G6SJBNWRTEJCX",
    "name": "Platform"
  },
  "amount": {
    "amount": 4200,
    "asset": "USD"
  },
  "settled_amount": null,
  "counterparty": {
    "id": "cpy_01JZVEZAMED5J5FK7SGCRECEET",
    "name": "Delta Air Lines",
    "category": "Airlines",
    "descriptor": "DELTA AIR 0062"
  },
  "purpose": "Flight SFO to JFK for the offsite",
  "rail": "network_token",
  "rail_preference": [
    "network_token"
  ],
  "status": "held",
  "funding_source": {
    "id": "fs_01KFYEF2ME7CHTSE5WKHECPTR7",
    "name": "Operating (ndStill account)"
  },
  "connection": null,
  "mandate_id": null,
  "decision_id": "dec_01M82XPRQ16YEJ7MHD6VHE179E",
  "approval_id": "apr_01M82XPRQZK3A5VJ11YJGQM8FP",
  "attempt_id": null,
  "credential_id": null,
  "dispute_id": null,
  "receipt_id": null,
  "gates": [
    {
      "stage": "authenticate",
      "result": "pass"
    },
    {
      "stage": "entitlement",
      "result": "pass"
    },
    {
      "stage": "freeze",
      "result": "pass"
    },
    {
      "stage": "funding",
      "result": "pass"
    },
    {
      "stage": "counterparty",
      "result": "pass"
    },
    {
      "stage": "mandate",
      "result": "pass"
    },
    {
      "stage": "policy",
      "result": "pass"
    },
    {
      "stage": "risk",
      "result": "pass"
    },
    {
      "stage": "budget",
      "result": "hold"
    },
    {
      "stage": "approval",
      "result": "pass"
    },
    {
      "stage": "record",
      "result": "pass"
    }
  ],
  "reason_summary": "This would use the last of Cloud cost guard's monthly budget.",
  "idempotency_key": "idem_af3eb963c326f05d",
  "dims": {
    "customer": "Stark Freight",
    "project": "Offsite"
  }
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

List payment intents#

GET/v2/payment-intents

Payments, newest first. Filter by status, rail, agent, tree, team, counterparty, funding source or amount.

Query parameters all optional
  • status"requested" | "expired" | "frozen" | "held" | "approved" | "declined" | "authorized" | "settled" | "refunded" | "disputed" | "failed" | PaymentStatus[]
    "requested""expired""frozen""held""approved""declined""authorized""settled""refunded""disputed""failed"
  • rail"card" | "network_token" | "checkout_token" | "stablecoin" | "bank" | "ai" | "cloud" | Rail[]
    "card""network_token""checkout_token""stablecoin""bank""ai""cloud"
  • agent_idId
  • tree_root_idId
  • team_idId
  • counterparty_idId
  • funding_source_idId
  • amount_gtenumber
  • amount_ltenumber
  • assetstring
  • amount_usd_gtenumber

    Amount range in USD cents across assets (USDC counts at par).

  • amount_usd_ltenumber
  • 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).

Response list of PaymentIntent

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 PaymentIntent object as Create a payment intent.

Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/payment-intents?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "pi_01M82WARCEDTKCJ2CT2YM49A8M",
      "object": "payment_intent",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-11-23T00:19:11.374Z",
      "updated_at": "2026-11-23T00:19:11.434Z",
      "agent": {
        "id": "agt_01KS34A3MEM01QVS3BG8X852NK",
        "name": "Compute broker"
      },
      "tree_root": {
        "id": "agt_01KQ667RMEP9Y30VHM3RCA9HZN",
        "name": "Research orchestrator"
      },
      "team": {
        "id": "team_01K8CD3GMECKJ31CYMQH7B9XZP",
        "name": "Research"
      },
      "amount": {
        "amount": 8947,
        "asset": "USD"
      },
      "settled_amount": null,
      "counterparty": {
        "id": "cpy_01JZVEZAME598YRF79G77PKSVF",
        "name": "Amazon Web Services",
        "category": "Cloud",
        "descriptor": "AWS EMEA"
      },
      "purpose": "Staging cluster",
      "rail": "cloud",
      "rail_preference": [
        "cloud"
      ],
      "status": "authorized",
      "funding_source": {
        "id": "fs_01KZMHZ7MEWAF1941KT52ZRXK0",
        "name": "AWS (billing)"
      },
      "connection": {
        "id": "con_01KZMHZ7MEQ9KST6799SP0GF4G",
        "name": "AWS billing"
      },
      "mandate_id": null,
      "decision_id": "dec_01M82WARE0NY0VM98XNSRKH44E",
      "approval_id": null,
      "attempt_id": "pa_01M82WARJPDKXFWYSB5FC84TXX",
      "credential_id": null,
      "dispute_id": null,
      "receipt_id": null,
      "gates": [
        {
          "stage": "authenticate",
          "result": "pass"
        },
        {
          "stage": "entitlement",
          "result": "pass"
        },
        {
          "stage": "freeze",
          "result": "pass"
        },
        {
          "stage": "funding",
          "result": "pass"
        },
        {
          "stage": "counterparty",
          "result": "pass"
        },
        {
          "stage": "mandate",
          "result": "skip"
        },
        {
          "stage": "policy",
          "result": "pass"
        },
        {
          "stage": "risk",
          "result": "pass"
        },
        {
          "stage": "budget",
          "result": "pass"
        },
        {
          "stage": "approval",
          "result": "pass"
        },
        {
          "stage": "record",
          "result": "pass"
        }
      ],
      "reason_summary": null,
      "idempotency_key": "idem_e5eaeac3f64cb0ed",
      "dims": {}
    },
    {
      "id": "pi_01M82VJYNEJFCMY9VHY5PS5W12",
      "object": "payment_intent",
      "org_id": "org_A99F918124609C9DAAACB209D8",
      "created_at": "2026-11-23T00:06:11.374Z",
      "updated_at": "2026-11-23T00:42:11.374Z",
      "agent": {
        "id": "agt_01KS34A3MEM01QVS3BG8X852NK",
        "name": "Compute broker"
      },
      "tree_root": {
        "id": "agt_01KQ667RMEP9Y30VHM3RCA9HZN",
        "name": "Research orchestrator"
      },
      "team": {
        "id": "team_01K8CD3GMECKJ31CYMQH7B9XZP",
        "name": "Research"
      },
      "amount": {
        "amount": 166617,
        "asset": "USD"
      },
      "settled_amount": null,
      "counterparty": {
        "id": "cpy_01JZVEZAMEV3FV30AHR5VHAHYT",
        "name": "Lambda Cloud",
        "category": "Compute",
        "descriptor": "lambdalabs.com"
      },
      "purpose": "Fine-tuning run",
      "rail": "card",
      "rail_preference": [
        "card"
      ],
      "status": "settled",
      "funding_source": {
        "id": "fs_01KHHYDEME7D9A5AA3XYHBJD5E",
        "name": "Agent spend (ndStill account)"
      },
      "connection": {
        "id": "con_01KMRYA6ME05ZXF7TQQQSF14VK",
        "name": "ndStill card program"
      },
      "mandate_id": "mdt_01M7XRX8MEJR4FGW2K387WKW2S",
      "decision_id": "dec_01M82VJYQ00GW6B6D70WZ0R58T",
      "approval_id": null,
      "attempt_id": "pa_01M82VJYVPDN2SY7S4760M59NW",
      "credential_id": "cred_01KR2GKNMEF61XSZ58E8NZ7X4Q",
      "dispute_id": null,
      "receipt_id": "rcpt_01M82VJYNEJFCMY9VHY5PS5W12",
      "gates": [
        {
          "stage": "authenticate",
          "result": "pass"
        },
        {
          "stage": "entitlement",
          "result": "pass"
        },
        {
          "stage": "freeze",
          "result": "pass"
        },
        {
          "stage": "funding",
          "result": "pass"
        },
        {
          "stage": "counterparty",
          "result": "pass"
        },
        {
          "stage": "mandate",
          "result": "pass"
        },
        {
          "stage": "policy",
          "result": "pass"
        },
        {
          "stage": "risk",
          "result": "pass"
        },
        {
          "stage": "budget",
          "result": "pass"
        },
        {
          "stage": "approval",
          "result": "pass"
        },
        {
          "stage": "record",
          "result": "pass"
        }
      ],
      "reason_summary": null,
      "idempotency_key": "idem_4e7ff7dbae132759",
      "dims": {
        "task": "compute-ad-hoc",
        "project": "Offsite"
      }
    }
  ],
  "has_more": true,
  "next_cursor": "Mg==",
  "total": 2000
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Retrieve a payment intent#

GET/v2/payment-intents/{id}

One payment with its latest decision, attempt and gate marks.

Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response PaymentIntent

The same PaymentIntent object as Create a payment intent.

Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/payment-intents/pi_01M82WARCEDTKCJ2CT2YM49A8M" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "id": "pi_01M82WARCEDTKCJ2CT2YM49A8M",
  "object": "payment_intent",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-23T00:19:11.374Z",
  "updated_at": "2026-11-23T00:19:11.434Z",
  "agent": {
    "id": "agt_01KS34A3MEM01QVS3BG8X852NK",
    "name": "Compute broker"
  },
  "tree_root": {
    "id": "agt_01KQ667RMEP9Y30VHM3RCA9HZN",
    "name": "Research orchestrator"
  },
  "team": {
    "id": "team_01K8CD3GMECKJ31CYMQH7B9XZP",
    "name": "Research"
  },
  "amount": {
    "amount": 8947,
    "asset": "USD"
  },
  "settled_amount": null,
  "counterparty": {
    "id": "cpy_01JZVEZAME598YRF79G77PKSVF",
    "name": "Amazon Web Services",
    "category": "Cloud",
    "descriptor": "AWS EMEA"
  },
  "purpose": "Staging cluster",
  "rail": "cloud",
  "rail_preference": [
    "cloud"
  ],
  "status": "authorized",
  "funding_source": {
    "id": "fs_01KZMHZ7MEWAF1941KT52ZRXK0",
    "name": "AWS (billing)"
  },
  "connection": {
    "id": "con_01KZMHZ7MEQ9KST6799SP0GF4G",
    "name": "AWS billing"
  },
  "mandate_id": null,
  "decision_id": "dec_01M82WARE0NY0VM98XNSRKH44E",
  "approval_id": null,
  "attempt_id": "pa_01M82WARJPDKXFWYSB5FC84TXX",
  "credential_id": null,
  "dispute_id": null,
  "receipt_id": null,
  "gates": [
    {
      "stage": "authenticate",
      "result": "pass"
    },
    {
      "stage": "entitlement",
      "result": "pass"
    },
    {
      "stage": "freeze",
      "result": "pass"
    },
    {
      "stage": "funding",
      "result": "pass"
    },
    {
      "stage": "counterparty",
      "result": "pass"
    },
    {
      "stage": "mandate",
      "result": "skip"
    },
    {
      "stage": "policy",
      "result": "pass"
    },
    {
      "stage": "risk",
      "result": "pass"
    },
    {
      "stage": "budget",
      "result": "pass"
    },
    {
      "stage": "approval",
      "result": "pass"
    },
    {
      "stage": "record",
      "result": "pass"
    }
  ],
  "reason_summary": null,
  "idempotency_key": "idem_e5eaeac3f64cb0ed",
  "dims": {}
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Get a payment's timeline#

GET/v2/payment-intents/{id}/timeline
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response Timeline
  • object"timeline"
  • intent_idId
  • eventsTimelineEvent[]
    TimelineEvent: 10 fields
    • idId
    • object"timeline_event"
    • typeTimelineEventType
      "freeze""approval""refund""credential""mandate""decision""dispute""settlement""authorization""receipt""request""capture"
    • atTimestamp
    • titlestring
    • detailstring | null
    • actorobject | object | object | object | null
      One of 4 shapes
      • kind"user"
      • idId
      • namestring
      • kind"agent"
      • idId
      • namestring
      • kind"system"
      • idIdoptional
      • namestring
      • kind"api_key"
      • idId
      • namestring
    • refobject | null

      The resource this row is about (decision, approval, credential, receipt …).

      2 fields
      • objectstring
      • idId
    • verifiedVerifiedFlags | null

      Verification flags for anything backed by evidence (backend plan §12).

      VerifiedFlags: 8 fields
      • signatureboolean

        Event signature checks out against the published key.

      • chainboolean

        prev_hash links continuously to the previous event.

      • anchorboolean | null

        Included in an anchored Merkle root; null while the hourly anchor is pending.

      • evidence_event_idIdoptional
      • kidstringoptional
      • event_hashstringoptional
      • anchor_idId | nulloptional
      • anchored_atTimestamp | nulloptional
    • datamap of stringoptional

      Extra key–values for the expanded row.

Errors
  • 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.

Example from the mock backend
Request
curl -X GET "https://api.ndstill.com/v2/payment-intents/pi_01M82WARCEDTKCJ2CT2YM49A8M/timeline" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "timeline",
  "intent_id": "pi_01M82WARCEDTKCJ2CT2YM49A8M",
  "events": [
    {
      "id": "tle_dd46be915947f795be3e",
      "object": "timeline_event",
      "type": "request",
      "at": "2026-11-23T00:19:11.374Z",
      "title": "Compute broker asked to pay $89.47 to Amazon Web Services",
      "detail": "Staging cluster",
      "actor": {
        "kind": "agent",
        "id": "agt_01KS34A3MEM01QVS3BG8X852NK",
        "name": "Compute broker"
      },
      "ref": {
        "object": "payment_intent",
        "id": "pi_01M82WARCEDTKCJ2CT2YM49A8M"
      },
      "verified": {
        "signature": true,
        "chain": true,
        "anchor": null,
        "evidence_event_id": "evt_01M82WARCEBZ117F0GYM3BMA6Q",
        "kid": "ndstill-us1-evidence-2026-10",
        "event_hash": "c7f53da0bea205f32625fc96b8a82d118b4a12a4b118ff8f72fb4caaad08994d",
        "anchor_id": null,
        "anchored_at": null
      },
      "data": {
        "Rail": "cloud",
        "Idempotency key": "idem_e5eaeac3f64cb0ed"
      }
    },
    {
      "id": "tle_dc46bcfef9601e4359a0",
      "object": "timeline_event",
      "type": "decision",
      "at": "2026-11-23T00:19:11.486Z",
      "title": "Allowed by policy",
      "detail": "Passed every check in 72 ms",
      "actor": {
        "kind": "system",
        "name": "ndStill decision service"
      },
      "ref": {
        "object": "decision",
        "id": "dec_01M82WARE0NY0VM98XNSRKH44E"
      },
      "verified": {
        "signature": true,
        "chain": true,
        "anchor": null,
        "evidence_event_id": "evt_01M82WARFY4J0F9SZ51MSEKQ5Z",
        "kid": "ndstill-us1-evidence-2026-10",
        "event_hash": "946b5768b09bf8af458134ee9f7d91518bd0ad7c2a6aca8b816249121135c59d",
        "anchor_id": null,
        "anchored_at": null
      },
      "data": {
        "Policy version": "sha256:8a07c9fbdf68",
        "Latency": "72 ms",
        "Risk score": "0.02"
      }
    },
    {
      "id": "tle_db46bb6b83f9ad0d7f5e",
      "object": "timeline_event",
      "type": "credential",
      "at": "2026-11-23T00:19:12.345Z",
      "title": "Credential issued: Single-use card",
      "detail": "Scoped to Amazon Web Services, up to $89.47",
      "actor": {
        "kind": "system",
        "name": "ndStill credentials"
      },
      "ref": null,
      "verified": {
        "signature": true,
        "chain": true,
        "anchor": null,
        "evidence_event_id": "evt_01M82WASASBWR7G3SVP7N5BPN4",
        "kid": "ndstill-us1-evidence-2026-10",
        "event_hash": "6716cf0370861de5141366433bc03c058ff27e036879ba256d7a3ec3f2ef8745",
        "anchor_id": null,
        "anchored_at": null
      }
    }
  ]
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.

Request a refund#

POST/v2/payment-intents/{id}/refund
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body JSON
  • reasonstringrequired
  • amountobject
    2 fields
    • amountnumberrequired
    • assetstringrequired
Response PaymentIntent

The same PaymentIntent object as Create a payment intent.

Errors
  • 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.

  • 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.

Example from the mock backend
Request
curl -X POST "https://api.ndstill.com/v2/payment-intents/pi_01M82VJYNEJFCMY9VHY5PS5W12/refund" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Checking the API from the docs",
    "amount": {
      "amount": 4200,
      "asset": "USD"
    }
  }'
Response 200
{
  "id": "pi_01M82VJYNEJFCMY9VHY5PS5W12",
  "object": "payment_intent",
  "org_id": "org_A99F918124609C9DAAACB209D8",
  "created_at": "2026-11-23T00:06:11.374Z",
  "updated_at": "2026-11-23T00:43:13.546Z",
  "agent": {
    "id": "agt_01KS34A3MEM01QVS3BG8X852NK",
    "name": "Compute broker"
  },
  "tree_root": {
    "id": "agt_01KQ667RMEP9Y30VHM3RCA9HZN",
    "name": "Research orchestrator"
  },
  "team": {
    "id": "team_01K8CD3GMECKJ31CYMQH7B9XZP",
    "name": "Research"
  },
  "amount": {
    "amount": 166617,
    "asset": "USD"
  },
  "settled_amount": null,
  "counterparty": {
    "id": "cpy_01JZVEZAMEV3FV30AHR5VHAHYT",
    "name": "Lambda Cloud",
    "category": "Compute",
    "descriptor": "lambdalabs.com"
  },
  "purpose": "Fine-tuning run",
  "rail": "card",
  "rail_preference": [
    "card"
  ],
  "status": "refunded",
  "funding_source": {
    "id": "fs_01KHHYDEME7D9A5AA3XYHBJD5E",
    "name": "Agent spend (ndStill account)"
  },
  "connection": {
    "id": "con_01KMRYA6ME05ZXF7TQQQSF14VK",
    "name": "ndStill card program"
  },
  "mandate_id": "mdt_01M7XRX8MEJR4FGW2K387WKW2S",
  "decision_id": "dec_01M82VJYQ00GW6B6D70WZ0R58T",
  "approval_id": null,
  "attempt_id": "pa_01M82VJYVPDN2SY7S4760M59NW",
  "credential_id": "cred_01KR2GKNMEF61XSZ58E8NZ7X4Q",
  "dispute_id": null,
  "receipt_id": "rcpt_01M82VJYNEJFCMY9VHY5PS5W12",
  "gates": [
    {
      "stage": "authenticate",
      "result": "pass"
    },
    {
      "stage": "entitlement",
      "result": "pass"
    },
    {
      "stage": "freeze",
      "result": "pass"
    },
    {
      "stage": "funding",
      "result": "pass"
    },
    {
      "stage": "counterparty",
      "result": "pass"
    },
    {
      "stage": "mandate",
      "result": "pass"
    },
    {
      "stage": "policy",
      "result": "pass"
    },
    {
      "stage": "risk",
      "result": "pass"
    },
    {
      "stage": "budget",
      "result": "pass"
    },
    {
      "stage": "approval",
      "result": "pass"
    },
    {
      "stage": "record",
      "result": "pass"
    }
  ],
  "reason_summary": null,
  "idempotency_key": "idem_4e7ff7dbae132759",
  "dims": {
    "task": "compute-ad-hoc",
    "project": "Offsite"
  }
}
Try it

Runs against the in-browser mock with a test key. Nothing leaves your browser.