markAsPaid( )

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:

  • The order's lastPaymentStatus changes to "PAID".
  • The order's status changes to either "PENDING" or "ACTIVE", depending on the order's startDate.

An error occurs if you attempt to:

  • Mark an already-paid, offline order as paid. You cannot mark an offline order as paid twice.
  • Mark an online order as paid. The 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.

Method Declaration
Method Parameters

ID of the order being marked as paid.


Options to use when marking an order as paid.

Was this helpful?