> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paritydeals.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LemonSqueezy Checkout

> This endpoint creates a checkout session with LemonSqueezy and applies geographic pricing and discounts as configured in ParityDeals. It returns a checkout URL.



## OpenAPI

````yaml /frontend-integration/openapi.json post /lemon-squeezy-checkout/
openapi: 3.0.0
info:
  title: ParityDeals Checkout API
  version: 1.0.0
  description: >-
    The ParityDeals Checkout API extends the capabilities of Stripe's Checkout
    API by incorporating dynamic pricing adjustments based on user location,
    holidays, and other criteria defined within ParityDeals.
servers:
  - url: https://api.paritydeals.com/api/v1
security: []
paths:
  /lemon-squeezy-checkout/:
    post:
      tags:
        - Checkout
      summary: LemonSqueezy Checkout
      description: >-
        This endpoint creates a checkout session with LemonSqueezy and applies
        geographic pricing and discounts as configured in ParityDeals. It
        returns a checkout URL.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                pd_identifier:
                  type: string
                  description: Unique identifier associated with a particular deal.
                  example: your_pd_identifier
                ip_address:
                  type: string
                  description: >-
                    Pass the IP address. This is necessary only if you are
                    implementing this in server-side.
                  nullable: true
                  example: 192.168.1.1
                store_id:
                  type: string
                  description: The unique identifier for the product on LemonSqueezy.
                  example: your_store_id
                success_url:
                  type: string
                  format: uri
                  description: >-
                    The URL to which a user will be redirected after a
                    successful purchase.
                  nullable: true
                  example: https://your-success-url.com
              required:
                - pd_identifier
                - store_id
              oneOf:
                - required:
                    - checkout_data
                  properties:
                    checkout_data:
                      type: object
                      description: >-
                        Checkout data similar to the data specified in
                        LemonSqueezy documentation
                        (https://docs.lemonsqueezy.com/api/checkouts/create-checkout).
                        This parameter is required if variants is not provided.
                      additionalProperties: true
                      example: {}
                - required:
                    - variants
                  properties:
                    variants:
                      type: string
                      description: >-
                        Represents different variations of a product, each with
                        unique pricing options, files, and license key settings.
                        Pass the variants as a comma-separated list. This
                        parameter is required if checkout_data is not provided.
                      example: variant_id_1,variant_id_2
      responses:
        '200':
          description: Successfully created Checkout session
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: >-
                      The unique identifier for the LemonSqueezy Checkout
                      Session.
                    example: 994d1506-2baf-41b3-80a9-7c0ac9c9e368
                  url:
                    type: string
                    format: uri
                    description: >-
                      The URL to redirect the user to for completing the
                      checkout process.
                    example: >-
                      https://paritydeals.lemonsqueezy.com/checkout/custom/994d1506-2baf-41b3-80a9-7c0ac9c9e368?signature=f43c0fd78c65f2649bbccf28b544b141353b528e05d30743def15c917ea5ecf0
        '400':
          description: Bad Request - Missing or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      Missing pd_identifier, store_id, or one of
                      checkout_data/variants
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to create LemonSqueezy Checkout session

````