I am calling checkout.createCheckout() from wix-ecom-backend. I am creating a checkout for a booking which I just created. The input parameter for this method includes options.checkoutInfo.membershipOptions.selectedMembership.memberships[ ]. The elements in the membership array are _id, appId, and lineItemIds[ ].
My thinking is that the memberships supplied somehow correspond to the subscriptions for pricing plans owned by the member, but I can’t find anything in the documentation to explain it. I’ve tried using the appId of the Pricing Plan App. I’ve tried the memberId of the contact making the booking, the orderId for the pricing plan to be used, and the subscriptionId for the pricing plan. Nothing seems to work. I just get errors when I try to create the order for the checkout.
Can anybody explain to me how to indicate which pricing plan to use, or how to fill in the membershipOptions field, or point me to some documentation that would clarify?
Much appreciated.