Creating checkout links manually

Generate preconfigured checkout links

Creating Links

This article guides you on how to create links to the Sesamy checkout. The links will be used to direct users to a specific product checkout page, with various customization options available through query string parameters.

 
💡

In most cases it is better to user sesamy-js to create checkout links.

Overview

The base URL for the Sesamy checkout is https://checkout3.sesamy.com/. This URL alone won't function properly without additional parameters that specify the details of the product and the client. These parameters are added to the URL as a query string. Here's an example URL with query string parameters:

https://checkout3.sesamy.com/?sku=sid:jWkwFiSIWsgNk26l-ksjd&option=VkPw-Um9wP88DgZ0e7mLu&lang=sv&redirect-url=https://example.com.se&discountCode=<discountCode>

This URL includes six parameters: skuoptionlangredirect-url and discountCode.

Required Parameters

There are two required parameters you need to include in every Sesamy checkout URL:

  • sku or url: Either the sku (Store Keeping Unit), which is the id of the product, or the url of product is required.

Optional Parameters

In addition to the required parameters, there are several optional ones that you can use to customize the checkout experience:

  • option: This specifies the variant of a product. For example, it could be used to denote whether a subscription is monthly or yearly, or to specify different podcast episodes in a podcast series. The purchase option id's are provided by Sesamy.
  • lang: This is a two-letter language code that sets the language for the checkout page. If not specified, it defaults to the browser language.
  • discountCode: This applies a discount code to the checkout.
  • redirect-url: This specifies where the user will be redirected after a purchase is complete.
  • email: This is the email of the user.

Constructing a URL

Here's how you can construct a Sesamy checkout URL with these parameters:

  1. Start with the base URL: https://checkout3.sesamy.com/
  1. Add a question mark to start the query string: https://checkout3.sesamy.com/?
  1. Add the sku and option parameters of a url if it is an article, separated by an ampersand (&):
https://checkout3.sesamy.com/?sku=yourSku
  1. If you want to include optional parameters, continue adding them, separated by ampersands:
https://checkout3.sesamy.com/?sku=yourSku&option=yourOption&lang=sv&discountCode=yourDiscountCode&redirect-url=yourRedirectUrl&email=userEmail

Remember to replace yourSkuyourOptionsvyourDiscountCodeyourRedirectUrl, and userEmail with your actual values.

And that's it! You've successfully created a Sesamy checkout URL. This will help guide your users to the correct product and enhance their checkout experience.

 
 
 
 
Did this answer your question?
😞
😐
🤩

Last updated on August 4, 2021