Fiest Developers

Preview one payment-method correction

Builds a before-and-after report for one exact order, tab, tab-split, or other returned payment source.

POST
/v1/restaurants/{restaurantId}/payment-corrections/preview

Builds a before-and-after report for one exact order, tab, tab-split, or other returned payment source. Set action=correct and provide a supported destination method, or set action=undo to restore the source allocation. Preview is required before apply; it does not mutate data and expires shortly after creation. Organization-boundary tokens also require fiest.organization.read; when a token covers several organizations, organization_id must identify an exact organization returned by listOrganizations.

Quick request

Example Request
curl -X POST 'https://api-sandbox.fiest.io/v1/restaurants/11111111-1111-4111-8111-111111111111/payment-corrections/preview?organization_id=33333333-3333-4333-8333-333333333333' \  -H 'Authorization: Bearer $FIEST_ACCESS_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "businessDate": "2026-07-15",  "sourceKind": "order",  "sourceRecordId": "fiest-50b6d34f-bc6e-4248-b3d6-839b3dda31a1",  "action": "correct",  "toMethodKey": "cash",  "reason": "The receipt was settled in cash at the counter."}'
Example Response
{  "data": {    "restaurantId": "11111111-1111-4111-8111-111111111111",    "input": {      "businessDate": "2026-07-15",      "sourceKind": "order",      "sourceRecordId": "fiest-50b6d34f-bc6e-4248-b3d6-839b3dda31a1",      "action": "correct",      "toMethodKey": "cash",      "reason": "The receipt was settled in cash at the counter."    },    "expectedRevisionId": "11111111-1111-4111-8111-111111111111",    "previewFingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",    "expiresAt": "2026-07-15T13:00:00.000Z",    "before": {      "refundReporting": {        "policy": "refund-event-date/v1",        "legacyTiming": false,        "incompleteEvidence": false      },      "restaurantId": "11111111-1111-4111-8111-111111111111",      "scope": "day",      "period": {        "startDate": "2026-07-15",        "endDate": "2026-07-15",        "timeZone": "Europe/Helsinki",        "dayStartHour": 4      },      "currency": "EUR",      "rawRows": [        {          "key": "card",          "label": "Card",          "transactionCount": 459,          "grossMinor": 2795000,          "netMinor": 2390000,          "vatMinor": 405000,          "grossByRateMinor": null,          "vatByRateMinor": null        }      ],      "adjustedRows": null,      "rawTotalMinor": 2795000,      "adjustedTotalMinor": null,      "status": "review_required",      "warnings": [        {          "code": "correction_ledger_unavailable",          "message": "Raw values are available; adjusted values need review.",          "businessDate": null,          "correctionId": null        }      ],      "days": [],      "corrections": [],      "sources": [],      "appliedCorrectionIds": [],      "rawSourceBasis": "services_accounting",      "calculationVersion": "services-accounting/payment-report/1",      "schemaVersion": null,      "currentSourceFingerprint": null,      "readOnly": true    },    "after": {      "refundReporting": {        "policy": "refund-event-date/v1",        "legacyTiming": false,        "incompleteEvidence": false      },      "restaurantId": "11111111-1111-4111-8111-111111111111",      "scope": "day",      "period": {        "startDate": "2026-07-15",        "endDate": "2026-07-15",        "timeZone": "Europe/Helsinki",        "dayStartHour": 4      },      "currency": "EUR",      "rawRows": [        {          "key": "card",          "label": "Card",          "transactionCount": 459,          "grossMinor": 2795000,          "netMinor": 2390000,          "vatMinor": 405000,          "grossByRateMinor": null,          "vatByRateMinor": null        }      ],      "adjustedRows": null,      "rawTotalMinor": 2795000,      "adjustedTotalMinor": null,      "status": "review_required",      "warnings": [        {          "code": "correction_ledger_unavailable",          "message": "Raw values are available; adjusted values need review.",          "businessDate": null,          "correctionId": null        }      ],      "days": [],      "corrections": [],      "sources": [],      "appliedCorrectionIds": [],      "rawSourceBasis": "services_accounting",      "calculationVersion": "services-accounting/payment-report/1",      "schemaVersion": null,      "currentSourceFingerprint": null,      "readOnly": true    }  }}

Authorization

fiestOAuth fiest.restaurant.read, fiest.accounting.read, fiest.analytics.read, fiest.accounting.corrections.write
headerAuthorizationBearer <token>

OAuth 2.1 authorization code with PKCE. Partner clients and redirect URIs must be approved by Fiest before use.

Scope: fiest.restaurant.read, fiest.accounting.read, fiest.analytics.read, fiest.accounting.corrections.write

Path Parameters

restaurantId*string

A restaurant identifier returned by the authorized restaurant list.

Formatuuid

Query Parameters

organization_id?string

An organizationId returned by GET /v1/organizations. Required for restaurant-scoped calls when a Management portfolio authorization covers more than one organization; omitted for a single-restaurant authorization and optional for a one-organization grant.

Formatuuid

Request Body

application/json
  1. body
businessDate*string
Match^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
Formatdate
sourceKind*string
Value in"order""tab""tab_split_detail""card_split_payment"
sourceRecordId*string
Length1 <= length <= 255
action*string
Value in"correct""undo"
toMethodKey?string
Length1 <= length <= 64
reason*string
Length4 <= length <= 1000

Response Body

The exact input, current report revision, expiry, and before/after payment reports.

application/json
  1. response
data*