Use this recipe to collect payment for booking-related flows by generating payment links with the Payment Links API.
ECOM_ORDER for existing unpaid ordersIf a booking already has an associated unpaid eCommerce order, create an ECOM_ORDER payment link.
Notes:
orderId must exist and be unpaid.ECOM_ORDER links require paymentsLimit: 1.ECOM for ad-hoc booking chargesIf there is no existing order, create an ECOM payment link with custom line items.
Creating a payment link does not deliver it. Send it explicitly:
POST https://www.wixapis.com/payment-links/v1/payment-links/{paymentLinkId}/sendBefore creating booking payment links, ensure:
| Error Code | Meaning |
|---|---|
UNPUBLISHED_SITE | Site must be published before creating payment links |
MISSING_ACCEPT_PAYMENTS | Site is not set up to accept payments |
ORDER_NOT_FOUND | The provided order ID does not exist |
INVALID_PAYMENTS_LIMIT_FOR_ECOM_ORDER_PAYMENT_LINK | ECOM_ORDER links require paymentsLimit: 1 |
RECIPIENT_NOT_FOUND | Recipient contact ID does not exist |