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

Seller refunds API

Refund requests from buyers, and your response.

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

List seller refunds#

GET/v2/seller-refunds
Query parameters all optional
  • statusstring enum
    "requested""approved""declined""refunded"
  • 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 SellerRefund

Returns a list envelope: object "list", data[], has_more, next_cursor (pass it back as cursor) and total when cheap to count. Items:

  • idId
  • object"seller_refund"
  • org_idId
  • created_atTimestamp
  • updated_atTimestampoptional
  • test_modebooleanoptional

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

  • receipt_idId
  • checkout_idId | null
  • buyerobject
    2 fields
    • org_namestring
    • agent_namestring
  • amountMoney

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
  • reasonstring
  • statusstring enum
    "requested""approved""declined""refunded"
  • dispute_idId | null
  • respond_byTimestamp | null
  • kindstring enumoptional

    A refund request from the buyer, or a dispute opened through ndStill.

    "refund""dispute"
  • railstring enumoptional
    null"card""network_token""checkout_token""stablecoin""bank""ai""cloud"
  • messagesobject[]optional
    3 fields
    • atTimestamp
    • fromstring enum
      "seller""buyer""ndstill"
    • bodystring
  • evidenceobject[]optional

    Evidence the seller attached with the response.

    2 fields
    • kindSellerEvidenceKind
      "mandate""receipt""hashes""verify_log""delivery_log"
    • labelstring
  • refunded_viastring | nulloptional

    How the refund went out (the seller's own provider or wallet).

  • refund_amountMoney | nulloptional

    An amount: integer minor units + asset.

    Money: 2 fields
    • amountnumber
    • assetAssetCode
      "USD""USDC""EUR""GBP"
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/seller-refunds?limit=2" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "object": "list",
  "data": [
    {
      "id": "sref_01M84HAZYMPZJ4XQ5WK0P235TA",
      "object": "seller_refund",
      "org_id": "org_443B247B2FC3D2A13FAC0AEF86",
      "created_at": "2026-11-22T23:43:12.610Z",
      "receipt_id": "rcpt_01M81Z03HM7KC9PR4G9DERE8F6",
      "checkout_id": "chk_01M81YY8YMTZY2WCXZTGBNH9FS",
      "buyer": {
        "org_name": "Atlas Research",
        "agent_name": "Market scout"
      },
      "amount": {
        "amount": 20000,
        "asset": "USDC"
      },
      "reason": "The report was empty",
      "status": "requested",
      "dispute_id": null,
      "respond_by": "2026-11-27T00:43:12.610Z",
      "kind": "refund",
      "rail": "stablecoin",
      "messages": [
        {
          "at": "2026-11-22T23:43:12.610Z",
          "from": "buyer",
          "body": "The report was empty. Please refund 0.02 USDC."
        }
      ],
      "evidence": [],
      "refunded_via": null,
      "refund_amount": null
    },
    {
      "id": "sref_01M8465H7PJQZG8GW1PBJ5HF8J",
      "object": "seller_refund",
      "org_id": "org_443B247B2FC3D2A13FAC0AEF86",
      "created_at": "2026-11-22T23:43:12.610Z",
      "receipt_id": "rcpt_01M81KTMTP77T3B3715MRB03JD",
      "checkout_id": "chk_01M81KRT7P8X7W548JH0RP4CH5",
      "buyer": {
        "org_name": "Pine & Co. Accounting",
        "agent_name": "Close assistant"
      },
      "amount": {
        "amount": 20000,
        "asset": "USDC"
      },
      "reason": "Charged twice for one session",
      "status": "refunded",
      "dispute_id": null,
      "respond_by": null,
      "kind": "refund",
      "rail": "stablecoin",
      "messages": [
        {
          "at": "2026-11-22T23:43:12.610Z",
          "from": "buyer",
          "body": "Charged twice for one session. Please refund 0.02 USDC."
        },
        {
          "at": "2026-11-23T02:43:12.610Z",
          "from": "seller",
          "body": "Refunded. Sorry about that."
        }
      ],
      "evidence": [],
      "refunded_via": "Base wallet 0xaa9c…4017",
      "refund_amount": {
        "amount": 20000,
        "asset": "USDC"
      }
    }
  ],
  "has_more": true,
  "next_cursor": "Mg==",
  "total": 5
}
Try it

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

Retrieve a seller refund#

GET/v2/seller-refunds/{id}
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Response SellerRefund

The same SellerRefund object as List seller refunds.

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/seller-refunds/sref_01M84HAZYMPZJ4XQ5WK0P235TA" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01"
Response 200
{
  "id": "sref_01M84HAZYMPZJ4XQ5WK0P235TA",
  "object": "seller_refund",
  "org_id": "org_443B247B2FC3D2A13FAC0AEF86",
  "created_at": "2026-11-22T23:43:12.610Z",
  "receipt_id": "rcpt_01M81Z03HM7KC9PR4G9DERE8F6",
  "checkout_id": "chk_01M81YY8YMTZY2WCXZTGBNH9FS",
  "buyer": {
    "org_name": "Atlas Research",
    "agent_name": "Market scout"
  },
  "amount": {
    "amount": 20000,
    "asset": "USDC"
  },
  "reason": "The report was empty",
  "status": "requested",
  "dispute_id": null,
  "respond_by": "2026-11-27T00:43:12.610Z",
  "kind": "refund",
  "rail": "stablecoin",
  "messages": [
    {
      "at": "2026-11-22T23:43:12.610Z",
      "from": "buyer",
      "body": "The report was empty. Please refund 0.02 USDC."
    }
  ],
  "evidence": [],
  "refunded_via": null,
  "refund_amount": null
}
Try it

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

Respond to a refund request#

POST/v2/seller-refunds/{id}/respond
Path parameters
  • idIdrequired

    A prefixed ID from this org.

Request body JSON
  • decisionstring enumrequired
    "refund""decline"
  • notestring
Response SellerRefund

The same SellerRefund object as List seller refunds.

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/seller-refunds/sref_01M84HAZYMPZJ4XQ5WK0P235TA/respond" \
  -H "Authorization: Bearer $NDSTILL_API_KEY" \
  -H "Ndstill-Version: 2026-11-01" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "decision": "refund",
    "note": "Refunded from the docs example"
  }'
Response 400
{
  "object": "error",
  "type": "invalid_request",
  "code": "invalid_request",
  "message": "Pick where the refund goes out from: your payment provider or your wallet.",
  "request_id": "req_b2a6ca508d38fa0780a8",
  "fields": {
    "refund_via": "Required"
  }
}

The mock answered this sample with an error; its message says why. Adjust the request in Try it below.

Try it

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