Skip to content

Payments

Niko can complete a checkout with a card saved in Vault, but only after you approve that one payment. The model never sees the card number or security code.

  1. Open Vault, select Add, then Payment card.
  2. Enter a Name, the Cardholder name, Card number and Expiry date.
  3. Select Save. Saving a card doesn't approve any payment.

If the card number or expiry date is not valid, the error identifies the field and explains what to change.

Niko never saves the card's security code. You enter it for each payment.

If Niko reaches a checkout and you have no card saved, select its add-card action to open this form beside chat. Save the card, then tell Niko to continue. You can also add it in Vault.

When Niko has filled in the rest of the checkout, it prepares one payment request. Before you see it, the browser reads the real origin of each card field. The request is bound to:

Bound to What it means
The card and its version Editing the card cancels the request
The shop The origin of the checkout page
The checkout page The exact page Niko prepared
Card-field destinations The real origin of every card field, including payment frames
The submit button The one control Niko chose
Amount and currency As shown on the page

The request stays open while its task waits for you. If Niko can't write the approval question, the request closes at once. A newer request, a newer message from you in the same conversation, a changed card or Stop makes it unusable. A scheduled run or background task has its own session, so chatting with Niko never closes its payment request.

In Niko web or desktop, Niko shows the checkout with the card fields hidden. Its payment message keeps the amount, shop, card and destinations separate from a short payment action. Only that action is a link; addresses in the explanation are shown as text. Select the action to open Approve payment beside chat. Check the details, then enter the card's security code and submit. The code never reaches the model or the chat history. Closing the panel clears an unsent code; it does not cancel a payment already submitted. Reopening shows the current result, including an expired or uncertain request.

You can ask an unrelated question, including one with an invoice or order number, while payment waits. That message reaches ordinary chat and starts a new turn, which closes the pending payment request in the same conversation. To pay later, ask Niko to check the checkout and prepare a new approval. Niko still withholds standalone code-like numbers and messages labeled code, PIN, CVV, CVC or security code from the model.

Chat apps can't approve payments or receive security codes. Niko asks you to open the same conversation in its web or desktop app, where the Approve payment form waits. After you approve, Niko replies in the original chat.

sequenceDiagram
  actor You
  participant Server
  participant Shop
  participant Niko
  You->>Server: Security code
  Server->>Server: Check card version, claim one use
  Server->>Shop: Enter card and submit privately
  Shop-->>Niko: Page after submit, card values masked
  Niko->>Niko: Check the shop's result
  Niko-->>You: Order confirmed, or what went wrong

Card submitted is not paid. Vault records that the card was submitted, with the amount. Niko then reads the shop's page and tells you the result, because only the shop and your bank decide whether the payment went through. If the operation was interrupted, Vault shows Result unknown: check the order before you try again. See One use, one result.

  • With an expired, replaced or already-used request.
  • When Niko sees a new amount on the checkout page after you approved, or the same amount more often, for example a card surcharge or currency conversion added while the card was entered or while the page finished updating before submission. The card details are on the page by then, but Niko doesn't submit it.
  • When it can't read the checkout page's text to check its amounts.

src/server/payments.ts (request and approval) · src/server/vault-use.ts (one use) · src/server/trust.ts (when payment is allowed)