Sample Use Cases and Flows

This article shares some possible use cases you can support, as well as a sample flow that could support each use case. This can be a helpful jumping off point as you plan your implementation.

You can display payment link data to a site page or dashboard page by completing the following steps:

  1. Collect payment link data to display by calling Query Payment Links.
  2. Display the returned values.

You can create and send a payment link by completing the following steps:

  1. Call Create Payment Link to create a payment link, and specify the following:
    • Type: Specify either ECOM and the corresponding ecomPaymentLink with details about the items to be purchased, or ECOM_ORDER and the corresponding ecomOrderPaymentLink with the Wix eCommerce order ID.
    • Recipients: Contact IDs of buyers who should receive the payment link, and the channels to use when sending the payment link.
  2. Call Send Payment Link to send the created payment link. The payment link will be sent to the predefined recipients.

Note: If you didn't specify recipients in the Create Payment Link request, you should specify them in the Send Payment Link request instead.

  1. Buyer opens the payment link and is directed to a Wix eCommerce checkout page.
  2. Buyer completes checkout.
  3. A payment link payment is created.

You can create and send a payment link for specific Wix Stores products by completing the following:

Call Create Payment Link to create a payment link, and specify the following:

  • type:ECOM.
  • In the ecomPaymentLink object:
    • specify the lineItems.type = CATALOG, and in the catalogItem object,
    • specify the Wix Stores Catalog product ID as the catalogReference.catalogItemId,
    • specify Wix Stores' catalogReference.appId: "215238eb-22a5-4c36-9e7b-e7c08025e04e".
  1. Select an existing payment link, or create one.
  2. Display a call to action that calls Initiate Payment and specifies a payment link ID.
  3. When the Wix user initiates the action, direct them to the returned URL.
    Note that For ECOM type payment links, ecomCheckout.checkoutUrl is returned, and for ECOM_ORDER type payment links, ecomOrder.orderUrl is returned.
  4. Wix user completes the checkout on behalf of the buyer.
  5. A payment link payment is created.
Did this help?