Skip to content

Verify and confirm payment with the gateway after customer returns​

POST
/rest/v1/checkout/confirm-payment/{orderId}

Asks the gateway whether this order was actually paid and, if so, settles it. Returns {orderId, status, confirmed}, plus reason when the order was not in a confirmable state.

status IS THE PAYMENT VERDICT; confirmed IS NOT. confirmed answers only whether THIS call verified the payment with the gateway. An order can come back status: PAID with confirmed: false — because it was already settled before the call (reason is then already_paid), or because a webhook settled it first. Branch on status: SETTLED is PAID or PENDING_ACCEPTED, awaiting payment is PENDING.

⚠️ PENDING_ACCEPTED is the TERMINAL state of the offline payways (delivery, bank_transfer, paid_at_store) — they settle at placement and never reach PAID.

isPaid WAS REMOVED from both response arms (#754): it published a reconciliation marker, not a payment status, and reported paid orders as unpaid. See GET /rest/checkout/payment-status/{orderId} for the full explanation.

For vivawallet the server verifies the payment itself with Viva, by the order code it stored at placement: the client sends nothing and needs nothing from the return URL, so a paid order confirms however the customer comes back. A transaction settles the order only when it is a charge, completed (StatusId: F) and for exactly the order total. A transaction Viva reports as still IN PROGRESS (StatusId: A) does NOT confirm the order — it is not paid yet, and the order stays PENDING for a later poll. Any request body is ignored.

For paypaladvanced the server CAPTURES the PayPal order it created at placement once the buyer has approved it, then settles the order only when the completed captures come to exactly the order total in the order currency. Call it when the buyer returns from PayPal; a repeated or concurrent call does not capture twice. An approval that was cancelled or never happened leaves the order PENDING. An approved PayPal order for a different amount or currency is not captured, so the buyer is not charged: the answer is confirmed: false with the order still PENDING, indistinguishable from an approval that has not happened yet, and the order is cancelled after 180 minutes.

Verification is gateway-specific and FAILS CLOSED: only stripe, vivawallet and paypaladvanced have a verification arm, so for any other payway this returns confirmed: false and changes nothing. That is by design, not a defect — eurobank is settled by the gateway posting to its server-owned callback, and paybybank by its webhook. Poll this endpoint or payment-status rather than expecting this call to settle them.

Authorizations​

bearerAuth

JWT access token obtained from /rest/auth/admin/login or /rest/auth/customer/login

Type
HTTP (bearer)

Parameters​

Path Parameters

orderId*
Type
integer
Required

Responses​

Payment confirmation result

Playground​

Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI