RECIPE: Business Recipe - Create Pay Link with store catalog items
Description: This recipe provides specific implementation details for creating a payment link (known as Pay Link) with catalog items (plain or with variants) on a Wix site, focusing on relevant steps & critical requirements not explicitly covered in the standard documentation.
Documentation Links:
https://dev.wix.com/api/rest/wix-payments/payment-links/create-payment-link
https://dev.wix.com/api/sdk/wix-get-paid/paymentlinks
https://dev.wix.com/docs/rest/business-solutions/stores/catalog/query-products
https://dev.wix.com/docs/sdk/backend-modules/stores/products/query-products
filter
as JSON stringified value "{"name":{"$contains":"X"}}" and includeVariants
bool.Critical Requirements:
Request to Query Product Variants V1 Stores:
Request prerequisites to create Pay Link with Catalog Items:
type: "ECOM"
& ecomPaymentLink.lineItems
for payment links.type
to CATALOG
.catalogItem
details: quantity
, catalogReference
.catalogReference
details: appId
, catalogItemId
and options
. options
can only have variantId
.catalogOverrideFields
property price
always.catalogOverrideFields
if the user did not require them.catalogOverrideFields.descriptionLines
it must be valid - object with two inner objects: name, plainText.Example Request for Pay Link with Catalog Items {"type":"CATALOG","catalogItem":{"quantity":1,"catalogReference":{"catalogItemId": "<>","appId":"<>","options":{"variantId":"<>"},"catalogOverrideFields":{"productName":{"original":"<>","translated":"<>"},"price":"100.00","fullPrice":"100.00","physicalProperties":{"shippable":true},"descriptionLines":[{"name":{"original":"Variant X","translated":"Variant X"},"plainText":{"original":"Variant X","translated":"Variant X"}}]}}}}
Important Notes for catalog payment links:
Conditional Logic for Parameters:
catalogOverrideFields
Error handling:
IMPORTANT NOTES FOR THE CONSUMING LLM: