Checkout Sessions

The Checkout API provides endpoints to create and manage checkout sessions. A session can be created, retrieved by ID, expired when needed, and deleted for cleanup.

Create Checkout Session

Create a new checkout session for hosted payments.

  • Name
    amount
    Type
    decimal
    Required
    required
    Description

    Amount in minor units (cents)

  • Name
    cancel_url
    Type
    uri
    Required
    required
    Description

    URL to redirect customer if they cancel the payment

  • Name
    success_url
    Type
    uri
    Required
    required
    Description

    URL to redirect customer after successful payment. Use {CHECKOUT_SESSION_ID} as placeholder

  • Name
    branding_settings
    Type
    object | nullable
    Description

    Branding settings for this session

  • Name
    branding_settings > background_color
    Parent
    in branding_settings
    Type
    string
    Description

    A hex color value starting with # representing the background color

  • Name
    branding_settings > border_style
    Parent
    in branding_settings
    Type
    enum
    Description

    The border style for the widget.

    • pill - pill
    • rectangular - rectangular
    • rounded - rounded
  • Name
    branding_settings > button_color
    Parent
    in branding_settings
    Type
    string
    Description

    A hex color value starting with # representing the button color for the pay widget

  • Name
    branding_settings > display_name
    Parent
    in branding_settings
    Type
    string
    Description

    A string to override the business name shown on the pay widget. This only shows at the top of the Checkout page, and your business name still appears in terms, receipts, and other places.

  • Name
    branding_settings > font_family
    Parent
    in branding_settings
    Type
    enum
    Description

    The font family for the Checkout Session corresponding to one of the [supported font families]

    • be_vietnam_pro - be_vietnam_pro
    • bitter - bitter
    • chakra_petch - chakra_petch
    • default - default
    • hahmlet - hahmlet
    • inconsolata - inconsolata
    • inter - inter
    • lato - lato
    • lora - lora
    • m_plus_1_code - m_plus_1_code
    • montserrat - montserrat
    • noto_sans - noto_sans
    • noto_sans_jp - noto_sans_jp
    • noto_serif - noto_serif
    • nunito - nunito
    • open_sans - open_sans
    • pridi - pridi
    • pt_sans - pt_sans
    • pt_serif - pt_serif
    • raleway - raleway
    • roboto - roboto
    • roboto_slab - roboto_slab
    • source_sans_pro - source_sans_pro
    • titillium_web - titillium_web
    • ubuntu_mono - ubuntu_mono
    • zen_maru_gothic - zen_maru_gothic
  • Name
    call_to_action
    Type
    enum
    Default
    Default: pay
    Description

    Describes the type of transaction being performed by Checkout in order to customize relevant text on the page, such as the submit button.

    • pay - Pay
    • book - Book
    • donate - Donate
    • auto - Auto
    • subscribe - Subscribe
  • Name
    client_reference_id
    Type
    string
    Description

    Your internal order/transaction ID for reconciliation

  • Name
    consent_collection
    Type
    object | nullable
    Description

    Configure fields for the Checkout Session to gather active consent from customers.

  • Name
    consent_collection > promotions
    Parent
    in consent_collection
    Type
    enum
    Description

    If set to auto, enables the collection of customer consent for promotional communications.

    • auto - auto
    • none - none
  • Name
    consent_collection > terms_of_service
    Parent
    in consent_collection
    Type
    enum
    Description

    If set to required, it requires customers to check a terms of service checkbox before being able to pay. There must be a valid terms of service URL set in your application settings.

    • none - none
    • required - required
  • Name
    conversion
    Type
    boolean
    Description

    If you want MeSomb to convert in case of foreign currency

  • Name
    currency
    Type
    string
    Default
    Default: XAF
    Description

    Three-letter ISO currency code (e.g., XAF, EUR, USD)

  • Name
    custom_fields
    Type
    array
    Description

    Collect additional information from your customer using custom fields. Up to 3 fields are supported.

  • Name
    custom_fields > label
    Parent
    in custom_fields
    Type
    string
    Required
    required
    Description

    Label of the input field

  • Name
    custom_fields > type
    Parent
    in custom_fields
    Type
    enum
    Required
    required
    Description
  • Name
    custom_fields > limit_max
    Parent
    in custom_fields
    Type
    double
    Description

    Maximum value allowed

  • Name
    custom_fields > limit_min
    Parent
    in custom_fields
    Type
    double
    Description

    Minimum value allowed

  • Name
    custom_fields > limit_type
    Parent
    in custom_fields
    Type
    enum
    Description

    Type of limit to set on the value

    • max - At most
    • min - At least
    • between - Between
    • equal - Exactly
  • Name
    custom_fields > optional
    Parent
    in custom_fields
    Type
    boolean
    Description

    Make this field optional

  • Name
    custom_fields > set_limit
    Parent
    in custom_fields
    Type
    boolean
    Description

    Set a limit on the value in this field

  • Name
    custom_text
    Type
    object | nullable
    Description

    Display additional text for your customers using custom text.

  • Name
    custom_text > after_submit
    Parent
    in custom_text
    Type
    string
    Description

    Custom text that should be displayed after the payment confirmation button.

  • Name
    custom_text > submit
    Parent
    in custom_text
    Type
    string
    Description

    Custom text that should be displayed alongside the payment confirmation button.

  • Name
    custom_text > terms_of_service_acceptance
    Parent
    in custom_text
    Type
    string
    Description

    Custom text that should be displayed in place of the default terms of service agreement text.

  • Name
    customer
    Type
    object | nullable
    Description

    Optional customer information to prefill in checkout UI

  • Name
    customer > address
    Parent
    in customer
    Type
    undefined
    Description
  • Name
    customer > country
    Parent
    in customer
    Type
    string | nullable
    Description

    Living country of the customer

  • Name
    customer > email
    Parent
    in customer
    Type
    email | nullable
    Description

    Contact email of the customer

  • Name
    customer > first_name
    Parent
    in customer
    Type
    string | nullable
    Description

    First name of the customer

  • Name
    customer > last_name
    Parent
    in customer
    Type
    string | nullable
    Description

    Last name of the customer

  • Name
    customer > phone
    Parent
    in customer
    Type
    string | nullable
    Description

    Contact phone of the customer

  • Name
    customer > region
    Parent
    in customer
    Type
    string | nullable
    Description

    Living region of the customer

  • Name
    customer > town
    Parent
    in customer
    Type
    string | nullable
    Description

    Living town of the customer

  • Name
    customer_id
    Type
    string | nullable
    Description

    ID of an existing customer to associate with this session (e.g., cus_...)

  • Name
    description
    Type
    string
    Description

    Description of the payment shown to the customer

  • Name
    discounts
    Type
    object | nullable
    Description

    The coupon or promotion code to apply to this Session. Currently, only up to one may be specified.

  • Name
    discounts > coupon
    Parent
    in discounts
    Type
    string
    Description

    The ID of the coupon to apply to this Session.

  • Name
    discounts > promotion_code
    Parent
    in discounts
    Type
    string
    Description

    The ID of a promotion code to apply to this Session.

  • Name
    expires_in
    Type
    integer
    Default
    Default: 1800
    Description

    Session expiration time in seconds (5 min - 2 hours)

  • Name
    fees_included
    Type
    boolean
    Default
    Default: true
    Description

    If false then extra fees will be added to the amount deducted to the customer

  • Name
    line_items
    Type
    array
    Description

    Optional product line items to display during checkout

  • Name
    line_items > adjustable
    Parent
    in line_items
    Type
    boolean
    Description

    If set to true, the line item will be adjustable.

  • Name
    line_items > currency
    Parent
    in line_items
    Type
    string
    Default
    Default: XAF
    Description

    Currency of the transaction: can be local country local currency or foreign currency

  • Name
    line_items > limit_max
    Parent
    in line_items
    Type
    integer
    Description

    Maximum quantity allowed for this line item.

  • Name
    line_items > limit_min
    Parent
    in line_items
    Type
    integer
    Description

    Minimum quantity allowed for this line item.

  • Name
    line_items > product
    Parent
    in line_items
    Type
    string
    Description

    ID of an existing Product record to add to this session

  • Name
    line_items > product_data
    Parent
    in line_items
    Type
    object | nullable
    Description

    Data used to generate a new [Product]

  • Name
    line_items > product_data > name
    Parent
    in line_items.product_data
    Type
    string
    Required
    required
    Description

    The name of the product being purchased.

  • Name
    line_items > product_data > description
    Parent
    in line_items.product_data
    Type
    string | nullable
    Description

    A description of this product.

  • Name
    line_items > product_data > images
    Parent
    in line_items.product_data
    Type
    array
    Description

    A list of up to 8 URLs of images for this product.

  • Name
    line_items > product_data > metadata
    Parent
    in line_items.product_data
    Type
    object
    Description

    Metadata associated with this product.

  • Name
    line_items > product_data > unit_label
    Parent
    in line_items.product_data
    Type
    string | nullable
    Description

    A label that represents units of this product.

  • Name
    line_items > quantity
    Parent
    in line_items
    Type
    integer
    Default
    Default: 1
    Description
  • Name
    line_items > unit_amount
    Parent
    in line_items
    Type
    double
    Description
  • Name
    location
    Type
    object | nullable
    Description

    Optional location information for analytics

  • Name
    location > country
    Parent
    in location
    Type
    string | nullable
    Description

    Country from where the transaction was performed

  • Name
    location > ip
    Parent
    in location
    Type
    string
    Description

    If you want to use IP address to localize your transaction

  • Name
    location > region
    Parent
    in location
    Type
    string | nullable
    Description

    Region from where the transaction was performed

  • Name
    location > town
    Parent
    in location
    Type
    string
    Description

    Town from where the transaction was performed

  • Name
    metadata
    Type
    object
    Description

    Key-value pairs for storing additional information

  • Name
    mode
    Type
    enum
    Default
    Default: payment
    Description

    Payment mode

    • payment - Payment
  • Name
    required_contact_info
    Type
    boolean | nullable
    Description

    Ask for the customer contact information

  • Name
    secure_pay
    Type
    object | nullable
    Description

    If you want to activate secure payment, you must provide the following information:

  • Name
    secure_pay > auto_release_delay_hours
    Parent
    in secure_pay
    Type
    integer
    Description

    The number of hours after which the secure payment will be automatically released after delivery confirm

  • Name
    secure_pay > commitment_fee
    Parent
    in secure_pay
    Type
    decimal
    Description

    The commitment fee to apply on secure payments, this fee is charged to the buyer at the moment of payment and is refunded if the payment is released or canceled without dispute, but is not refunded if a dispute is opened and resolved in favor of the seller

  • Name
    secure_pay > delivery_required
    Parent
    in secure_pay
    Type
    boolean
    Default
    Default: true
    Description

    If you want to require delivery confirmation for secure payments

  • Name
    secure_pay > dispute_enabled
    Parent
    in secure_pay
    Type
    boolean
    Default
    Default: true
    Description

    If you want to enable dispute resolution for secure payments

  • Name
    secure_pay > fee_payer
    Parent
    in secure_pay
    Type
    enum
    Default
    Default: buyer
    Description

    The fee payer for secure payments, either the buyer or the seller

    • buyer - Fee paid by buyer
    • seller - Fee paid by merchant
    • split - Fee split 50/50 between buyer and merchant
    • no_fee - No fee
  • Name
    secure_pay > pay_mode
    Parent
    in secure_pay
    Type
    enum
    Default
    Default: mandatory
    Description

    The payment mode for secure payments, either secure or instant

    • disabled - Secure Pay disabled
    • optional - Buyer can choose Secure Pay
    • mandatory - Secure Pay required
  • Name
    secure_pay > terms_accepted
    Parent
    in secure_pay
    Type
    boolean
    Description

    If you have accepted the terms and conditions for secure payments

  • Name
    success_url
    Type
    string
    Required
    required
    Description

    URL to redirect to after successful payment

  • Name
    cancel_url
    Type
    string
    Required
    required
    Description

    URL to redirect to if payment is cancelled

  • Name
    line_items
    Type
    array
    Description

    Optional product line items to display during checkout

  • Name
    conversion
    Type
    boolean
    Description

    If true, MeSomb will convert in case of foreign currency

Request

POST
/api/v1.1/checkout/sessions/
<span><span style="color: var(--shiki-token-keyword)">import</span><span style="color: var(--shiki-color-text)"> {CheckoutOperation} </span><span style="color: var(--shiki-token-keyword)">from</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;@hachther/mesomb&#39;</span><span style="color: var(--shiki-color-text)">;</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">applicationKey</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your application key&gt;&#39;</span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">accessKey</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your access key&gt;&#39;</span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">secretKey</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your secret key&gt;&#39;</span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">client</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">new</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-function)">CheckoutOperation</span><span style="color: var(--shiki-color-text)">({applicationKey</span><span style="color: var(--shiki-token-punctuation)">,</span><span style="color: var(--shiki-color-text)"> accessKey</span><span style="color: var(--shiki-token-punctuation)">,</span><span style="color: var(--shiki-color-text)"> secretKey});</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">session</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">await</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">client</span><span style="color: var(--shiki-token-function)">.create</span><span style="color: var(--shiki-color-text)">({</span></span>
<span><span style="color: var(--shiki-color-text)">    success_url</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;https://example.com/success&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">    cancel_url</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;https://example.com/cancel&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">    line_items</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> [</span></span>
<span><span style="color: var(--shiki-color-text)">        {</span></span>
<span><span style="color: var(--shiki-color-text)">            name</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;Premium Bag&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">            amount</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">99999</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">            currency</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;XAF&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">            quantity</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">1</span></span>
<span><span style="color: var(--shiki-color-text)">        }</span></span>
<span><span style="color: var(--shiki-color-text)">    ]</span></span>
<span><span style="color: var(--shiki-color-text)">});</span></span>
<span></span>
<span><span style="color: var(--shiki-token-constant)">console</span><span style="color: var(--shiki-token-function)">.log</span><span style="color: var(--shiki-color-text)">(</span><span style="color: var(--shiki-token-constant)">session</span><span style="color: var(--shiki-color-text)">.url);</span></span>
<span></span>

Get Checkout Session

Retrieve a checkout session by ID.

  • Name
    id
    Type
    string
    Required
    required
    Description

    ID of the checkout session.

Request

GET
/api/v1.1/checkout/sessions/{id}/
<span><span style="color: var(--shiki-token-keyword)">import</span><span style="color: var(--shiki-color-text)"> {CheckoutOperation} </span><span style="color: var(--shiki-token-keyword)">from</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;@hachther/mesomb&#39;</span><span style="color: var(--shiki-color-text)">;</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">client</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">new</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-function)">CheckoutOperation</span><span style="color: var(--shiki-color-text)">({</span></span>
<span><span style="color: var(--shiki-color-text)">    applicationKey</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your application key&gt;&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">    accessKey</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your access key&gt;&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">    secretKey</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your secret key&gt;&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">});</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">session</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">await</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">client</span><span style="color: var(--shiki-token-function)">.retrieve</span><span style="color: var(--shiki-color-text)">(</span><span style="color: var(--shiki-token-string-expression)">&#39;cs_test_123&#39;</span><span style="color: var(--shiki-color-text)">);</span></span>
<span><span style="color: var(--shiki-token-constant)">console</span><span style="color: var(--shiki-token-function)">.log</span><span style="color: var(--shiki-color-text)">(</span><span style="color: var(--shiki-token-constant)">session</span><span style="color: var(--shiki-color-text)">.status);</span></span>
<span></span>

Expire Checkout Session

Expire an active checkout session.

  • Name
    id
    Type
    string
    Required
    required
    Description

    ID of the checkout session.

Request

PATCH
/api/v1.1/checkout/sessions/{id}/expire/
<span><span style="color: var(--shiki-token-keyword)">import</span><span style="color: var(--shiki-color-text)"> {CheckoutOperation} </span><span style="color: var(--shiki-token-keyword)">from</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;@hachther/mesomb&#39;</span><span style="color: var(--shiki-color-text)">;</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">client</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">new</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-function)">CheckoutOperation</span><span style="color: var(--shiki-color-text)">({</span></span>
<span><span style="color: var(--shiki-color-text)">    applicationKey</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your application key&gt;&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">    accessKey</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your access key&gt;&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">    secretKey</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your secret key&gt;&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">});</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">session</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">await</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">client</span><span style="color: var(--shiki-token-function)">.expire</span><span style="color: var(--shiki-color-text)">(</span><span style="color: var(--shiki-token-string-expression)">&#39;cs_test_123&#39;</span><span style="color: var(--shiki-color-text)">);</span></span>
<span><span style="color: var(--shiki-token-constant)">console</span><span style="color: var(--shiki-token-function)">.log</span><span style="color: var(--shiki-color-text)">(</span><span style="color: var(--shiki-token-constant)">session</span><span style="color: var(--shiki-color-text)">.status);</span></span>
<span></span>

Delete Checkout Session

Delete a checkout session by ID.

  • Name
    id
    Type
    string
    Required
    required
    Description

    ID of the checkout session.

Request

DELETE
/api/v1.1/checkout/sessions/{id}/
<span><span style="color: var(--shiki-token-keyword)">import</span><span style="color: var(--shiki-color-text)"> {CheckoutOperation} </span><span style="color: var(--shiki-token-keyword)">from</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;@hachther/mesomb&#39;</span><span style="color: var(--shiki-color-text)">;</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">const</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">client</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">=</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-keyword)">new</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-function)">CheckoutOperation</span><span style="color: var(--shiki-color-text)">({</span></span>
<span><span style="color: var(--shiki-color-text)">    applicationKey</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your application key&gt;&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">    accessKey</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your access key&gt;&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">    secretKey</span><span style="color: var(--shiki-token-keyword)">:</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string-expression)">&#39;&lt;your secret key&gt;&#39;</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">});</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">await</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-constant)">client</span><span style="color: var(--shiki-token-function)">.delete</span><span style="color: var(--shiki-color-text)">(</span><span style="color: var(--shiki-token-string-expression)">&#39;cs_test_123&#39;</span><span style="color: var(--shiki-color-text)">);</span></span>
<span><span style="color: var(--shiki-token-constant)">console</span><span style="color: var(--shiki-token-function)">.log</span><span style="color: var(--shiki-color-text)">(</span><span style="color: var(--shiki-token-string-expression)">&#39;Checkout session deleted&#39;</span><span style="color: var(--shiki-color-text)">);</span></span>
<span></span>