Question:
Hi, I’m trying to use Wix Ecom Backend to update the payment status of an offline order to PAID. Is there an example of how to do this?
Product:
Wix Editor
What are you trying to achieve:
When the user create an order via Wix Stores, I have an order ID with an initial NOT_PAID paymentStatus. And I’d like to change the paymentStatus to PAID
What have you already tried:
I have visited these documents:
I know I’m late here, but better late than never, in case this pops up for someone else.
In my case, I was trying to updatePaymentStatus with a payment ID from an Invoice and an order ID. Unfortunately I couldn’t get that to work, and this was the only thing that I could get to work.
Your line here is wrong:
All you’re missing is setting that status to Approved.
This fixes your issue at the time of writing this, and marks the order as paid for offline orders. (Supposedly the same as marking it as paid by admins through the dashboard) Though, it’s also worth mentioning that this function is in early preview, so hopefully it doesn’t change in the future and causes you issues.