---
title: "POST /api/public/v1/payments/pay"
method: POST
path: "/api/public/v1/payments/pay"
---

# POST /api/public/v1/payments/pay

`POST /api/public/v1/payments/pay`

## Request

- Base URL: `https://app.fortuneos.ai`
- URL: `https://app.fortuneos.ai/api/public/v1/payments/pay`
- Auth: none declared

Records one payment against an order, the whole balance or a part of it. An order holding a pass without a guest attached is refused with BAD_REQUEST as `passNeedsGuest` before any money is taken. While the organization asks for the guest's WhatsApp code when selling a pass, an order holding a pass whose customer has not verified it with `customers.verifyPassSaleCode` is refused with FORBIDDEN as `passCodeRequired` before any money is taken. An unpaid order whose pass discount no longer holds (the pass's allowance was used on another order, or the pass ended, was voided or is not on sale at this Location) is refused with CONFLICT as `passRedemptionChanged` before any money is taken, and the order is repriced without it: read the order again for the new total. While the organization asks for the guest's WhatsApp code when redeeming a pass, an unpaid order with a line a pass redeems whose customer has not verified it (with `customers.verifyPassRedemptionCode`, or any other code that verifies the order's guest) is refused with FORBIDDEN as `passRedemptionCodeRequired` before any money is taken. An unpaid order whose stamp reward no longer holds (it expired, was revoked, or its line changed) is refused with CONFLICT as `stampRewardChanged` before any money is taken, and the order is repriced without it: read the order again for the new total. While the organization asks for the guest's WhatsApp code when paying with points or a reward, an unpaid order with a line a stamp reward makes free whose customer has not verified it (with any code that verifies the order's guest) is refused with FORBIDDEN as `stampRewardCodeRequired` before any money is taken. A `pointsCents` on such an order is refused with BAD_REQUEST as `passNoPoints`. A covering payment completes it whatever its order type, and it earns no points. Refused with CONFLICT `terminalPaymentLive` while a card terminal payment is in progress or unresolved on the order, until it settles, is declined or cancelled, or a re-check resolves it. While the order's bill is split equally (a payment sent `equalSplit`), refused with CONFLICT `splitWaysMismatch` for a part under another number of people, `equalSlotClaimed` for a part already paid or being paid, `splitModeMismatch` for a partial payment without `equalSplit`, and `equalSplitUnavailable` when a guest split held from the QR menu rules Split equally out. A By items part (a payment sent `claimedItems`) is refused with BAD_REQUEST `itemNotOnBill` for a line not on the order, and CONFLICT `itemAlreadyClaimed` for a quantity already paid or being paid, `itemsShareChanged` for an amount other than the lines' share, and `itemsSplitUnavailable` while the bill is split another way; a partial payment without `claimedItems`, an equal part included, is refused `splitModeMismatch` while items are claimed. A payment of the whole balance is never refused for the split. An optional `tipCents` rides beside `amountCents`, never inside it: it covers nothing on the bill, cash must cover both, and it is refused with BAD_REQUEST `tipsOff` where the venue's POS tips are off. An optional `pointsCents` spends the attached member's loyalty points first, as a payment of its own whose `paymentType` is `points`, and `amountCents` pays the rest (zero records the points alone, or with a tip a zero-amount payment of `paymentType` that carries it and its cash tender, since points never pay a tip); it is refused with PRECONDITION_FAILED `pointsUnavailable` when the business takes no new Loyalty work (its own switch is off, or its plan restricts or lacks Loyalty), the program is not live or the order has no unarchived member, FORBIDDEN `pointsCodeRequired` while the organization asks for the guest's WhatsApp code before points pay and `customers.verifyPointsCode` has not verified the order for its customer, CONFLICT `guestPaying` while a guest pays the table from the QR menu, and BAD_REQUEST `pointsOverLimit` beyond the balance or the program's share of the bill, or while the balance is under the program's minimum balance to redeem. An optional `simulatedCard: true`, sent by a till's simulated card steps on an approval, also records a card payment in payment history as a succeeded `terminal` fixture, only in a demo business with the `payments` flag on; elsewhere it is ignored. Beside it, an optional `continuesAttemptId` names the declined or unanswered simulated attempt this approval retried, so history records both as one payment. An optional `terminalPayment`, sent with a card payment a real terminal approved, carries the terminal's answer: its operation id, TID, amount (the tip included), ISO 4217 numeric currency and time, and, as the terminal returns them, its MID, STAN (`number`), RRN, auth code, host response code, payment system, card last four digits and batch number. It also records the payment in payment history as a live succeeded `terminal` payment, keyed by the operation id, so a resent one records once and keeps its first RRN and auth code, in any business and whatever the `payments` flag; it is never voided or refunded through `payments.void` or `payments.refundInFull`. Its order payment is keyed by the operation id instead of `idempotencyKey`, for the split checks as for the record, so a resend after a lost answer, with any key, answers the payment the first call recorded; the same approval sent for another order is refused with CONFLICT `terminalPaymentRecorded` and records nothing, since one approval pays one order payment. History is recorded in the order's currency. An answer whose amount differs from `amountCents` plus `tipCents`, or whose currency differs from the order's, is refused with BAD_REQUEST `terminalAnswerMismatch` and records nothing. A `terminalPayment` is refused with BAD_REQUEST beside `simulatedCard` or with a `paymentType` other than `card`. A covering payment answers `loyaltyEarn`, what the order earned its member as `customers.tillOrderEarn` reads it (points and their balance after it, stamps and the rewards they filled), or null; with the plan lacking Loyalty under enforcement, the order earns nothing. Refused with CONFLICT and the refusal orderNotShipped for a supplier's shipment order that has not shipped yet: Ship it first. Refused with FORBIDDEN as `paywallLocked` when the caller is an Owner or Manager of a business the merchant Paywall locks: one with no verified subscription that has taken 5 orders while the Paywall's rollout reaches it, an order counting from its first saved line, whether or not it is paid or completed, until it is archived or cancelled before activation. Nothing is read or written; a verified subscription lifts the lock.

## Request body

- object
  - `orderId` string, required
  - `paymentType` 'cash' | 'card' | 'voucher' | 'gift_card' | 'staff' | 'bank_transfer' | 'payment_link' | 'zomato_pay' | 'careem_pay' | 'myfatoorah' | 'geidea', required
  - `amountCents` integer, required
  - `tenderedCents` integer
  - `tipCents` integer
  - `pointsCents` integer
  - `idempotencyKey` string, required
  - `simulatedCard` unknown
  - `continuesAttemptId` string, uuid
  - `terminalPayment` object
    - `operationId` string, uuid, required
    - `terminalId` string, required
    - `merchantId` string, nullable
    - `number` integer, nullable
    - `amount` integer, required
    - `currency` integer, required
    - `registeredAt` string, required
    - `authorizationCode` string, nullable
    - `referenceRetrievalNumber` string, nullable
    - `hostResponseCode` string, nullable
    - `paymentSystem` string, nullable
    - `cardLast4` string, nullable
    - `batchNumber` integer, nullable
  - `expectedRemainingCents` integer
  - `equalSplit` object
    - `ways` integer, required
    - `part` integer, required
  - `claimedItems` object

## Response `200`

OK

- unknown

## Changes

- **2026-11-25** `a2525f3613cb`: 1 info
  - added the new optional request property `terminalPayment`
- **2026-11-18** `aee575c683b2`: 1 info
  - added the new optional request property `continuesAttemptId`
- **2026-11-18** `d09917f0412e`: 1 info
  - added the new optional request property `simulatedCard`
- **2026-11-16** `80ac0ad5527d`: 1 info
  - added the new `geidea` enum value to the request property `paymentType/anyOf[subschema #1]/`
- **2026-10-15** `19805e19664f`: 1 info
  - added the new optional request property `pointsCents`

[Operation history](https://skmtc.dev/fortis/apis/fortune-os-api/changes/api/public/v1/payments/pay/post.md)

---

[API](https://skmtc.dev/fortis/apis/fortune-os-api.md) - [All operations](https://skmtc.dev/fortis/apis/fortune-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fortis/apis/fortune-os-api/revisions/522f3cea550d?raw)
