POS integration: apply a benefit before payment
Use this flow when your POS applies a discount or spends points before collecting payment. Grant checkouts:write and explicitly authorize financial operations in the cabinet.
| Cabinet binding | Value from your system |
|---|---|
| source | A stable integration identifier, for example my_pos. |
| accountId | The merchant or POS account identifier. |
| externalLocationId | The store identifier in your POS. |
| locationId | The UUID of the corresponding Mereu location. |
| eligiblePolicy | Use paid_excluding_tips_surcharges. |
This binding maps document references; it does not grant Mereu access to a POS provider account. Keep these values unchanged across key rotation.
- Calculate the benefit with
POST /checkouts/preview. Send amounts andreward.mode:none,pointsorvisit_reward. Forpoints, supply a decimal string such as10.25. - Read
discountandexpected_paid_totalfrom the quote. The quote lasts 120 seconds. Do not recalculate these values in your POS. - Reserve the benefit with
POST /checkouts, usingquote_idand the stable sale reference. - Send
POST /checkouts/{id}/payment-startedwith the reservation’sexpected_revisionand wait for success. - Only now apply the benefit and collect payment in your own POS or payment system.
- After verifying payment, confirm with
POST /checkouts/{id}/commit. Use the revision frompayment-started, the real amount equal toexpected_paid_total, the payment time and its reference. Savetransaction_id.
A card can have only one reservation, shared with Casa. A reservation whose payment has not started expires after 10 minutes. Read GET /checkouts/{id} to check its status.
If payment did not occur, cancellation requires the current revision and a reason. Once payment might have started, payment_not_completed:true is an explicit attestation of non-payment, never an assumption after a timeout.