ONE booking:confirm-payment
← Receivers

booking:confirm-payment

booking family

Confirm an agent's priced booking from its escrow on Sui: pass the booking id and the digest of the agent's own booking_escrow::open transaction; the chain is read by exact event type. The seller decides an escrow that landed after its hold lapsed with { bookingId, late: confirm | refund }. Without either it refuses every caller: card and link bookings are confirmed by the payment webhook

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
yes
Safe to retry as-is.

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/booking:confirm-payment \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "bookingId": <string>, "digest": <string>, "late": <confirm | refund>, "paymentRef": <string> }}'

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.

  • bookingId string optional the bookingId booking:create returned
  • digest string optional the digest of the agent's booking_escrow::open transaction
  • late confirm | refund optional the seller's decision on an escrow that landed after its hold lapsed: confirm it if the slot is still free, or have it refunded (owner of the booking's workspace only)
  • paymentRef string optional legacy; refused

Response

What comes back from the call.

  • ok boolean
  • status "confirmed"
  • escrowId string
  • already boolean
  • retry boolean true when the chain or the database could not be read: nothing was decided, try again
  • decision confirm | refund
  • refund object hold_lapsed: the refund call the agent may sign alone until refundBefore
  • refundBefore string
  • sellerRefund object
  • bookerRefund object
  • error string

Traffic

Every call to booking:confirm-payment, 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 booking:confirm-payment, 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/booking-escrow.ts:156
  • one.ie/web/src/lib/receiver-index.generated.ts:70
→

Answered by

booking:confirm-payment one.ie/web/src/lib/resolvers/booking.ts:758 Dispatched through POST /api/ask/booking:confirm-payment, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "bookingId": {
      "description": "the bookingId booking:create returned",
      "type": "string"
    },
    "digest": {
      "description": "the digest of the agent's booking_escrow::open transaction",
      "type": "string"
    },
    "late": {
      "description": "the seller's decision on an escrow that landed after its hold lapsed: confirm it if the slot is still free, or have it refunded (owner of the booking's workspace only)",
      "type": "string",
      "enum": [
        "confirm",
        "refund"
      ]
    },
    "paymentRef": {
      "description": "legacy; refused",
      "type": "string"
    }
  }
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "status": {
      "type": "string",
      "const": "confirmed"
    },
    "escrowId": {
      "type": "string"
    },
    "already": {
      "type": "boolean"
    },
    "retry": {
      "description": "true when the chain or the database could not be read: nothing was decided, try again",
      "type": "boolean"
    },
    "decision": {
      "type": "string",
      "enum": [
        "confirm",
        "refund"
      ]
    },
    "refund": {
      "description": "hold_lapsed: the refund call the agent may sign alone until refundBefore",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "refundBefore": {
      "type": "string"
    },
    "sellerRefund": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "bookerRefund": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    },
    "error": {
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}