Palbase Commerce & Promotions · API
/commerce/orders/{order_id}/mark-paidMark order paid (manual/COD/bank transfer)
Mark order paid (manual/COD/bank transfer). An order sent before it was paid is paid in full here — its stock taken, its promotions used, its sellers' shares held, commerce.order.paid emitted — and stays where its shipping brought it. An order whose payment is written already is left as it is, whatever became of it since. With no paid_total_amount the order is paid what is left of it: units canceled before are not paid for. Paid more than that, its buyer is owed the difference: given back by itself when the platform holds it, or outside the platform by its store (the cancellation's cancellation_id with refunded_outside: true). An order whose units were all canceled stays canceled, and the answer says so. An order whose payment is still being asked for answers 409 order_being_placed: ask again. Its payment through the platform still open is closed first, and its buyer can pay it no more: one its buyer paid answers 409 order_paid_by_payment (the payment marks the order paid, and gives back what was canceled of it), and one payments cannot close now 409 order_payment_open (ask again).
Called by your server, with the project's secret key.
Path
order_idstring · requiredPath parameter order_id.curl -X POST "https://<your-ref>.palbase.studio/commerce/orders/<order_id>/mark-paid" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{}'Responses
200Mark order paid (manual/COD/bank transfer)
defaultStandard Palbase JSON error envelope (`error` and `error_description`).
Operation MarkOrderPaid of commerce's contract.