- Product Types
- Prices Types
- Adding Products
- One Time Pricing
- Subscription Pricing
- Subscription Trials Setup
- Installment Pricing
- Donation / Pay What You Want
- Inventory Management
- Product Variants
- Variant Images
- Digital Downloads
- Change Product Availability
- Template Customization
- Product Collections
- First-Time Payment Discounts
- Manage Product Access
- Create Product With Free Trials
- Charge Set Up Fee on Trials
- Product List
- Product Pages
- Create Product Page in Elementor
- Custom Buy Links
- Product SEO
- Change Permalinks
- Custom Fields
- Test Mode
- Make Test Payments
- Edit & Customize Form
- Change Form Template
- Delete SureCart Forms
- Custom Checkout Form
- Add New Checkout Form
- Checkout Form With Gutenberg
- Checkout Form in Elementor
- Custom Thank You Page
- Create Donation Form
- Customize Confirmation Popup
- Include Coupons in URLs
- Pre-Fill Checkout Fields
- Change Checkout Texts
- Password Field in Checkout
- Default Country Code
- Add Terms to Checkout
- Conditional Block Checkouts
- Remove Coupon Field
- Hide Quantity Option
- Disable Quantity Editing
- Disable Item Removal
- Country Specific Purchases
- Update Store Details
- Dark Mode
- Orders & Receipts
- Menu & Slide-out Cart
- Manage Slide-out Cart
- Customers Section Overview
- Create Customer
- Delete Customer
- Update Customer Details
- Edit Invoice Details
- Create Shipping Profiles
- Manage Shipping
- Disable Payment Processor
- Manage Store Notifications
- Manage PayPal Branding
- How to transfer a store to a new organization and assign a license.
- How to Download SureCart Purchase Invoice
- Fix View Order Button
- Fix Express Payment Buttons
- How To Stop Sending WooCommerce Notifications via SureCart?
- Fix PayPal Test Connection
- Fix Sign-In Loop
- Fix Order Confirmation Redirect
- Fix Divi Bullet Point Issue
- Fix Customer Dashboard
- Fix JSON Response Error
- Failed Payment Behavior
- Fix Stripe Zip Code Error
- Fix "Product Can’t Be Blank"
- Troubleshooting Guide
- PayPal IPN Warning Emails
- Caching Configuration for SureCart
- Why iDEAL Might Not Appear in Your Checkout
- Compatibility Guide
Creating Custom Buy Links
While SureCart provides copy/paste buy links when you create your product prices, sometimes you may want to create custom purchase links that allow your users to purchase a product.
You can even specify several different products or prices and the quantities for each. You can accomplish this using URL parameters.
Creating The Link
In this section, we’ll walk you through the process of creating custom purchase links for your products.
Finding the Price ID
The first step is to find the price ID that you want to use for the line item. You can do this by navigating to your Edit Product page and clicking on Copy Links next to the price.
This will open a new section that contains all of the links associated with your product. Next, click Copy next to the Price ID box:
Creating the URL
To add line items, you will want to use the line_items parameter in the URL. The URL accepts multiple options, so it will follow the format:
https://yoursite.com/checkout?line_items[0][price_id]=5366e5a3
Replace ‘https://yoursite.com/checkout?” with your actual WordPress site link.
Enter the price id you copied after “[price_id]= “
When you click on the newly created link, it will redirect you to the usual product page.
Changing the quantity
You can also specify the quantity of a line item in the URL as well. This would give the line item a quantity of “2”.
https://yoursite.com/checkout?line_items[0][price_id]=5366e5a3&line_items[0][quantity]=2
Here’s how the change will reflect on the product page after clicking on the new link.
Adding multiple items
You may want to add more than a single line item to the checkout. To do that, you can do this:
https://yoursite.com/checkout?line_items[0][price_id]=5366e5a3&line_items[1][price_id]=402d8e25
How the product page will look after clicking on the link.
You will also need the price ID of the additional product item that you plan to show.
As you can see, we are adding an additional line_items parameter, but instead of using the “key” [0], we are using [1] to indicate it’s a separate line item.
We hope this guide helped you. If you have any questions, please don’t hesitate to contact our support team. We’re here to help!
We don't respond to the article feedback, we use it to improve our support content.