Marks an offline pricing plan order as paid.
The markAsPaid()
function returns a Promise that resolves when the offline order is successfully marked as paid.
The entire order is marked as paid, even if the order's payments are recurring.
Note: Marking separate payment cycles as paid is not yet supported. Subsequent offline payments do trigger events and emails, but are not registered as additional offline payments.
Marking an offline order as paid causes the following changes:
lastPaymentStatus
changes to "PAID"
.status
changes to either "PENDING"
or "ACTIVE"
, depending on the order's startDate
.An error occurs if you attempt to:
markAsPaid()
function is supported for offline orders only.The onOrderMarkedAsPaid()
and onOrderUpdated()
event handlers run when an offline order is marked as paid.
Note: Only site visitors with the Manage Pricing Plans and Manage Subscriptions permissions
can mark offline orders as paid. You can override the permissions by setting the function's suppressAuth
option to true
.
ID of the order being marked as paid.
Options to use when marking an order as paid.