Adding multiple products to the basket using a URL
Normally a product is added to the basket when a visitor clicks the add to basket button on the product page.
In some cases you may want to add multiple products to the basket from a single link. For example:
- adding a bundle of products
- adding a starter pack
- adding a predefined set of accessories
This feature allows multiple products to be added to the basket using a single URL.
How the feature works
- The request is sent to the basket endpoint /checkout/basket
- The feature is triggered using the query parameter add_items
- Each product is specified using its SKU and quantity
- Optional extras and choices can be specified per SKU
- A maximum of approximately 50 products can be added in a single request
e.g.
https://www.yourdomainname.com/checkout/basket?add_items=1&item[SKU1]=2&extras[SKU1]=11&item[SKU2]=1&extras[SKU2]=22,33&choices[SKU2]=44
This URL would:
- add SKU1 with a quantity of 2
- apply product extra 11 to SKU1
- add SKU2 with a quantity of 1
- apply extras 22 and 33 to SKU2
- apply product choice 44 to SKU2
Invalid values will be ignored.
Adding products
Adding products
item[SKU]=quantity
Products are specified using the item parameter.
- SKU is the product SKU code
- quantity is the number of items to add
Example:
item[TSHIRT-RED]=2
item[CAP-BLACK]=1
Multiple products can be added by separating parameters using &
Example:
item[TSHIRT-RED]=2&item[CAP-BLACK]=1Extras
Extras
extras[SKU]=extra-ID
Extras can be applied to a specific SKU using the extras parameter.
- SKU must match the SKU used in the item parameter
- extra-ID is the unique ID of the product extra
Example:
extras[TSHIRT-RED]=10103
Multiple extras can be specified using commas
Example:
extras[TSHIRT-RED]=10103,10903Choices
Choices
choices[SKU]=choice-ID
Choices can be applied to a specific SKU using the choices parameter.
- SKU must match the SKU used in the item parameter
- choice-ID is the unique ID of the product choice
Example:
choices[CAP-BLACK]=2045
Multiple choices can be specified using commas
Example:
choices[CAP-BLACK]=2045,2046Full example
Full example
The following example adds two products to the basket and applies extras and choices
https://www.yourdomainname.com/checkout/basket?add_items=1&item[TSHIRT-RED]=2&extras[TSHIRT-RED]=10103&item[CAP-BLACK]=1&extras[CAP-BLACK]=10903,10904&choices[CAP-BLACK]=2045
This would:
- add TSHIRT-RED with quantity 2 and extra 10103
- add CAP-BLACK with quantity 1
- apply extras 10903 and 10904
- apply choice 2045
Using Facebook and Instagram Checkout URLs
Using Facebook and Instagram Checkout URLs
When customers purchase products from your shop on Facebook or Instagram, the checkout process takes place on your website. Meta sends the selected products and quantities to your website using a special checkout URL.
ShopWired already supports this functionality automatically, so you do not need to build your own checkout endpoint.
How it works with ShopWired
When a customer selects products in your Facebook or Instagram shop and proceeds to checkout, Meta sends the selected items to your ShopWired checkout using URL parameters.
These parameters include:
- Product IDs
- Quantities
- Optional coupon codes
- Tracking parameters such as UTM tags and
fbclid
ShopWired automatically reads these parameters, adds the products to the customer’s cart, and loads the checkout page with the correct items and quantities.
Example checkout URL
A typical Meta checkout request may look like this:
https://www.example.com/checkout?products=12345%3A3%2C23456%3A1&coupon=SUMMERSALE20
Decoded, this represents:
- Product 12345 with quantity 3
- Product 23456 with quantity 1
- Coupon code SUMMERSALE20
ShopWired automatically converts this information into a cart and displays the checkout page.
Tracking parameters
Meta may also include tracking parameters such as:
fbclidcart_originutm_sourceutm_mediumutm_campaignutm_content
These parameters are used for analytics and marketing attribution. ShopWired accepts and passes these parameters through the checkout process automatically.
Important requirements for Meta Shops
To ensure a smooth checkout experience from Facebook or Instagram:
- The ShopWired checkout page must be accessible to visitors
- Guest checkout should be enabled
- Products in your Meta catalog must match the product IDs used on your ShopWired store
- Your checkout must correctly display products, quantities and final prices
Meta periodically reviews checkout URLs to confirm they work correctly.
Testing your checkout
After setting up your Facebook or Instagram shop, you can test the checkout process by:
- Opening your shop preview in Meta Commerce Manager
- Adding products to the cart
- Proceeding to checkout
- Confirming the correct items appear in your ShopWired checkout
If configured correctly, customers will be redirected from Facebook or Instagram directly to your ShopWired checkout with the selected products already added to the cart.
Limitations
Limitations
- a maximum of approximately 50 products per request is recommended
- SKU codes must be used (product IDs are not supported)
- the same SKU can only appear once in a request
- customisation fields and comments are not supported
- choice and extra IDs may change if products are edited or imported