I want to detect when a pricing plan renewal goes into a “grace period” due to a payment failure and show information to a logged-in user about this status.
I was finally able to generate this condition for testing (there was no easy way to simulate it despite service providers like Stripe having mechanisms to do this) and the order in the Wix Subscriptions dashboard clearly shows “Grace period”. But retrieving the order from the Velo API wix-pricing-plans-backend orders.getOrder retrieves an order that, incorrectly, has status = “ACTIVE” and lastPaymentStatus = “PAID”.
Per Get Order | Velo, there is a lastPaymentStatus value for “FAILED” which is what should be there but is not.
There is a field in the order called wixPayOrderId but I cannot find any Velo API to use this to retrieve payment information.
I may just hook into the event from a custom automation based on the trigger “Payment fails - grace period starts” to record this information in some custom fields unless anyone has been successful in getting this information from an API call.

