Fiest Developers

Apply an approved payment-method correction

Applies one unchanged, explicitly approved preview for an exact payment source.

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

Applies one unchanged, explicitly approved preview for an exact payment source. Send confirmed=true, the unchanged preview fingerprint, expected revision, expiry, reason, and a UUID idempotency key. The immutable correction ledger is written only after the current report and source are rechecked under the canonical day lock; the response contains the recalculated report. Use this for action=correct. 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

curl -X POST "https://example.com/v1/restaurants/11111111-1111-4111-8111-111111111111/payment-corrections/apply?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.",    "expectedRevisionId": "11111111-1111-4111-8111-111111111111",    "previewFingerprint": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",    "expiresAt": "2026-07-15T13:00:00.000Z",    "confirmed": true,    "idempotencyKey": "44444444-4444-4444-8444-444444444444"  }'
{  "data": {    "restaurantId": "11111111-1111-4111-8111-111111111111",    "batchId": "22222222-2222-4222-8222-222222222222",    "revisionId": "33333333-3333-4333-8333-333333333333",    "replayed": false,    "report": {      "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
AuthorizationBearer <token>

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

In: header

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

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json