> ## 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.

# Stripe Checkout

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



## OpenAPI

````yaml /frontend-integration/openapi.json post /stripe-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:
  /stripe-checkout/:
    post:
      tags:
        - Checkout
      summary: Stripe Checkout
      description: >-
        This endpoint creates a checkout session with Stripe 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
                apply_coupons:
                  type: boolean
                  description: >-
                    Set this field true to automatically fetches and applies
                    pricing based on the user’s location at checkout.
                    **Warning:** If this is set to `false`, the Stripe
                    `price_id` for adjusted pricing may not be available
                    directly in the response.
                  default: false
                  example: true
                success_url:
                  type: string
                  format: uri
                  description: >-
                    The URL to which a user will be redirected after a
                    successful purchase.
                  example: https://your-success-url.com
              required:
                - pd_identifier
                - success_url
              oneOf:
                - required:
                    - checkout_data
                  properties:
                    checkout_data:
                      type: object
                      description: >-
                        Checkout data similar to the data specified in Stripe
                        documentation
                        (https://docs.stripe.com/api/checkout/sessions/create).
                        This parameter is required if payment_id is not
                        provided.
                      additionalProperties: true
                      example: {}
                - required:
                    - payment_id
                  properties:
                    payment_id:
                      type: string
                      description: >-
                        The unique identifier for the product on Stripe. This
                        parameter is required if checkout_data is not provided.
                      example: your_payment_id
      responses:
        '200':
          description: Successfully created Checkout session
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The unique identifier for the Stripe Checkout Session.
                    example: >-
                      cs_live_a1HmmI9644trNrGaxfCMYrsZgK3QMiklsMqNEBNzEKWmNkzJtViECUBNpB
                  url:
                    type: string
                    format: uri
                    description: >-
                      The URL to redirect the user to for completing the
                      checkout process.
                    example: >-
                      https://checkout.stripe.com/c/pay/cs_live_a1HmmI9644trNrGaxfCMYrsZgK3QMiklsMqNEBNpB#fid2cXdsdWBEZmZqcGtxJz8nZGZmcVo0SnYzXGdJSzZUVUlxRnRgJyknZHVsTmB8Jz8ndW5aaWxzYFowNE49Q0hnVkZsMWJHYjBcRmBGVEZ8ZFxWVF1XcUpEVXRgYE9HNGExQElMMz1IaDQ1ZkpqTl0wTGdwRm1AUVddbzdHclRIR1J8MjJfPEhKY3Z1czU1NF1PbX9TclMnKSdjd2poVmB3c2B3Jz9xd3BgKSdpZHxqcHFRfHVgJz8ndmxrYmlgWmxxYGgnKSdga2RnaWBVaWRmYG1qaWFgd3YnP3F3cGB4JSUl
        '400':
          description: Bad Request - Missing or invalid parameters.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Missing pd_identifier or success_url
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Failed to create Stripe Checkout session

````