← Receivers

storefront:test-cards

storefront family

mcp

Set up test card payments for a workspace in one call: creates (or reuses) a test-mode Stripe account ONE fills with Stripe's test values, waits a few seconds for Stripe to switch cards on, then takes a €10 test card payment on it. Answers stage 'checking' if Stripe is still switching it on — call again. Refuses on a live key (test_mode_only). Owner-only.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
owner
The class of authority the caller must already hold, decided from the attested context with no round trip.
Cost
free
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Idempotent
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/storefront:test-cards \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": {}}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • workspace string optional Which store. NOT an authority claim — the attested caller must control it (callerControlsWorkspace). Absent = the caller's own.
  • slug string optional Alias of `workspace`.
  • country string optional Two-letter country for the test account. Only IE is run end to end today; anything else refuses with country_not_supported. Absent = IE.
  • pay boolean optional false = set the account up but take no test payment. Absent = pay once the account can take cards.

Response

What comes back from the call.

  • ok boolean
  • workspace string
  • stage checking | live | paid checking = Stripe is still switching cards on, call again · live = can take cards · paid = a test payment went through
  • accountId string
  • created boolean A new test account was made on this call.
  • replaced string | null The unfinished account this one replaced, if any.
  • payment object
  • error string forbidden · test_mode_only · country_not_supported · stripe_refused · not_live_yet · workspace_not_found · stripe_not_configured · no_db
  • detail string

Traffic

Every call to storefront:test-cards, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names storefront:test-cards, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

API route 2
  • one.ie/web/src/lib/receiver-index.generated.ts:359
  • one.ie/web/src/lib/resolvers/storefront/test-cards.ts:13
→

Answered by

storefront:test-cards one.ie/web/src/lib/resolvers/commerce.ts:959 Dispatched through POST /api/ask/storefront:test-cards, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "description": "Which store. NOT an authority claim — the attested caller must control it (callerControlsWorkspace). Absent = the caller's own.",
      "type": "string"
    },
    "slug": {
      "description": "Alias of `workspace`.",
      "type": "string"
    },
    "country": {
      "description": "Two-letter country for the test account. Only IE is run end to end today; anything else refuses with country_not_supported. Absent = IE.",
      "type": "string"
    },
    "pay": {
      "description": "false = set the account up but take no test payment. Absent = pay once the account can take cards.",
      "type": "boolean"
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "workspace": {
      "type": "string"
    },
    "stage": {
      "description": "checking = Stripe is still switching cards on, call again · live = can take cards · paid = a test payment went through",
      "type": "string",
      "enum": [
        "checking",
        "live",
        "paid"
      ]
    },
    "accountId": {
      "type": "string"
    },
    "created": {
      "description": "A new test account was made on this call.",
      "type": "boolean"
    },
    "replaced": {
      "description": "The unfinished account this one replaced, if any.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "payment": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "charge": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "amount": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        "currency": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "charge",
        "amount",
        "currency"
      ]
    },
    "error": {
      "description": "forbidden · test_mode_only · country_not_supported · stripe_refused · not_live_yet · workspace_not_found · stripe_not_configured · no_db",
      "type": "string"
    },
    "detail": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}