ONE pay:create
← Receivers

pay:create

pay family

mcp

Ask someone to pay you a custom amount: mints a payment request and one link they pay by card on your workspace's own Stripe account. The amount is fixed on the request, never on the link. Crypto is not on this link; a crypto request stays on wallet:invoice.

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.
Settles
offchain
Moves real value off chain — a balance changes.
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/pay:create \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "amountCents": 2500, "memo": "Logo design" }}'

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 The payee workspace; defaults to the attested caller's own. The caller must control it (refused not_your_workspace)
  • amountCents number required Integer US cents, 50 to 1000000 ($0.50 to $10,000). A float is refused amount_not_integer, never rounded
  • currency string optional Only 'usd' (the default); anything else is refused currency_unsupported
  • memo string optional What it is for, shown to the payer as the line ("Logo design"); 200 characters at most
  • actorId string optional The CRM contact this request is for; attributed only when the caller controls that contact's group (refused contact_not_found / contact_not_yours)
  • expiresInDays number optional Days the link stays payable, 1 to 90; default 30

Response

What comes back from the call.

  • ok boolean
  • requestId string preq_<32 hex>: the request id the link carries
  • url string The payer's page: <workspace origin>/u/<workspace>/shop/checkout?req=<requestId>
  • workspace string
  • amountCents number
  • currency string
  • memo string
  • actorId string
  • status string pending on a fresh request; pending -> paid once, by the storefront webhook
  • expiresAt string ISO time the request stops being payable
  • rails card | crypto[] The ways the payer can pay on this link. Card only today
  • absent object[] Each rail NOT on the link and why: crypto → deposit_rail_prices_catalogue_only, use wallet:invoice; card (on a refusal) → the card rail's reason
  • testMode boolean true when the card takes Stripe TEST money (the store is not live yet)
  • reason string On no_card_rail: storefront_not_enabled · stripe_not_configured · seller_payments_not_ready · workspace_not_found · unread
  • error string A refusal by name: sign_in_required · not_your_workspace · amount_not_integer · amount_too_small · amount_too_large · currency_unsupported · memo_too_long · expires_out_of_range · contact_not_found · contact_not_yours · contact_unread · no_card_rail · store_unavailable · no_db

Traffic

Every call to pay:create, 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 pay:create, 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

UI 1
  • one.ie/web/src/components/crm/MoneySheet.tsx:133
API route 4
  • one.ie/web/src/lib/pay/pay-request-settle.ts:22
  • one.ie/web/src/lib/pay/pay-request.ts:4
  • one.ie/web/src/lib/receiver-index.generated.ts:315
  • one.ie/web/src/lib/resolvers/pay-request.ts:2
CLI 1
  • packages/cli/src/wallet-money.ts:487
→

Answered by

pay:create one.ie/web/src/lib/resolvers/pay-request.ts:138 Dispatched through POST /api/ask/pay:create, after the envelope validates the payload.

pay family · 1 more

JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace": {
      "description": "The payee workspace; defaults to the attested caller's own. The caller must control it (refused not_your_workspace)",
      "type": "string"
    },
    "amountCents": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991,
      "description": "Integer US cents, 50 to 1000000 ($0.50 to $10,000). A float is refused amount_not_integer, never rounded"
    },
    "currency": {
      "description": "Only 'usd' (the default); anything else is refused currency_unsupported",
      "type": "string"
    },
    "memo": {
      "description": "What it is for, shown to the payer as the line (\"Logo design\"); 200 characters at most",
      "type": "string"
    },
    "actorId": {
      "description": "The CRM contact this request is for; attributed only when the caller controls that contact's group (refused contact_not_found / contact_not_yours)",
      "type": "string"
    },
    "expiresInDays": {
      "description": "Days the link stays payable, 1 to 90; default 30",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "amountCents"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "requestId": {
      "description": "preq_<32 hex>: the request id the link carries",
      "type": "string"
    },
    "url": {
      "description": "The payer's page: <workspace origin>/u/<workspace>/shop/checkout?req=<requestId>",
      "type": "string"
    },
    "workspace": {
      "type": "string"
    },
    "amountCents": {
      "type": "number"
    },
    "currency": {
      "type": "string"
    },
    "memo": {
      "type": "string"
    },
    "actorId": {
      "type": "string"
    },
    "status": {
      "description": "pending on a fresh request; pending -> paid once, by the storefront webhook",
      "type": "string"
    },
    "expiresAt": {
      "description": "ISO time the request stops being payable",
      "type": "string"
    },
    "rails": {
      "description": "The ways the payer can pay on this link. Card only today",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "card",
          "crypto"
        ]
      }
    },
    "absent": {
      "description": "Each rail NOT on the link and why: crypto → deposit_rail_prices_catalogue_only, use wallet:invoice; card (on a refusal) → the card rail's reason",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rail": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          },
          "use": {
            "type": "string"
          }
        },
        "required": [
          "rail",
          "reason"
        ]
      }
    },
    "testMode": {
      "description": "true when the card takes Stripe TEST money (the store is not live yet)",
      "type": "boolean"
    },
    "reason": {
      "description": "On no_card_rail: storefront_not_enabled · stripe_not_configured · seller_payments_not_ready · workspace_not_found · unread",
      "type": "string"
    },
    "error": {
      "description": "A refusal by name: sign_in_required · not_your_workspace · amount_not_integer · amount_too_small · amount_too_large · currency_unsupported · memo_too_long · expires_out_of_range · contact_not_found · contact_not_yours · contact_unread · no_card_rail · store_unavailable · no_db",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}