Order Pricing Plan not Marked as Paid

I have a backend function that assigns a pricing plan to a member. It uses a coupon to discount the entire price. If I go to the Subscriptions page after running this function, I can see that the order was created, and that the coupon was applied. The total amount due is zero. The subscription is marked ACTIVE, but is marked as UNPAID, and can’t be used by the member. Is this a Wix bug, or am I doing something wrong? I’ve tried it both with and without calling markAsPaid(), but it makes no difference.

By the way, the Wix Editor marks the third parameter to createOfflineOrder() as an error, saying 1-2 parameters are expected. However, I am following the calling sequence in the Velo API reference, and the call otherwise seems to work, including applying the coupon specified in the third parameter. I have found several other instances in which the Wix JavaScript Editor incorrectly finds something in error, so this doesn’t surprise me.

import { orders as planOrders } from 'wix-pricing-plans.v2';
import { elevate } from 'wix-auth';
export async function assignPricingPlan(planId, memberId, coupon) {
    try {
        let elevatedOrderPlan = elevate(planOrders.createOfflineOrder);
        let thisOrder = await elevatedOrderPlan(planId, memberId, { couponCode: coupon, paid: true });
        let elevatedMarkAsPaid = elevate(planOrders.markAsPaid);
        await elevatedMarkAsPaid(thisOrder.order._id);
        /* console.log(thisOrder); */
        return thisOrder;
    } catch (error) {
        console.log('customBackend.jsw > assignPricingPlan error - details -' + error.message)
        Promise.reject(
            new Error('customBackend.jsw > assignPricingPlan error - details -' + error.message));

    }

}

I believe this is a bug related to the use of coupons. If I remove the coupon and just call createOfflineOrder() with { paid : true}, it works correctly, marking the order as both PAID and ACTIVE. I don’t need to call markAsPaid(). But as soon as I add the coupon code, it correctly creates the order with a net price of zero (price of plan less $ discount from coupon), and marks the order as active but unpaid. So, after removing the coupon code my code now works, but I lose the functionality of tracking the number of discounted passes issued. I would count this as a workaround, not a solution.