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

# Create Checkout Link Offer

> Creates a checkout link offer.

<RequestExample>
  ```bash Create Checkout Link Offer theme={"system"}
  curl -X POST \
    'https://api.appcharge.com/v2/offer' \
    -H 'Content-Type: application/json' \
    -H 'x-publisher-token: <x-publisher-token>' \
    -d '{
      "publisherOfferId": "checkout-link-1",
      "name": "My Checkout Link Offer",
      "displayName": "My Checkout Link Offer",
      "type": "CheckoutLink",
      "active": true,
      "productsSequence": [
        {
          "index": 1,
          "playerAvailability": 12,
          "products": [
            {
              "priority": "Sub",
              "publisherProductId": "6cb43621ccf1",
              "quantity": "100",
            }
          ],
          "priceInUsdCents": 1000
        }
      ],
      "productSale": {
        "type": "percentage",
        "sale": 100
      },
      "priceDiscount": {
        "type": "percentage",
        "discount": 20
      },
      "description": "This is my checkout link offer description.",
      "offerUiId": "9ac77ff889b",
      "offerExternalUiId": "9ac22377ff889cc",
      "segments": [
        "New User"
      ],
      "badges": [
        {
          "publisherBadgeId": "22ac77ff889b"
        }
      ]
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Create Checkout Link Offer theme={"system"}
  {
    "offerId": "867f5b309118",
    "publisherId": "35nb7861ec9924a6b69a0fe59",
    "publisherOfferId": "checkout-link-1",
    "name": "My Checkout Link Offer",
    "displayName": "My Checkout Link Offer",
    "type": "CheckoutLink",
    "active": true,
    "segments": [
        "New User"
    ],
    "productsSequence": [
        {
            "index": 1,
            "playerAvailability": 12,
            "products": [
                {
                    "priority": "Sub",
                    "publisherProductId": "6cb43621ccf1",
                    "quantity": "100",
                }
            ],
            "priceInUsdCents": 1000,
            "playerClickedTtl": 300
        }
    ],
    "badges": [
        {
        "publisherBadgeId": "22ac77ff889b"
        }
    ],
    "productSale": {
        "type": "percentage",
        "sale": 100
    },
    "priceDiscount": {
        "type": "percentage",
        "discount": 20
    },
    "description": "This is my checkout link offer description.",
    "deeplinkUrl": "https://best-game.appcharge.com/login/campaign/YL2bAHqnuSMBhXIwMJbEM",
    "createdAt": "2025-04-06T10:00:44.528Z",
    "updatedAt": "2025-04-06T10:00:44.528Z"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi-checkout-links.json POST /v2/offer
openapi: 3.0.1
info:
  title: Checkout Link Offers API
  description: API for managing Checkout Link Offers.
  version: '1.0'
servers:
  - url: https://api-sandbox.appcharge.com
security: []
paths:
  /v2/offer:
    post:
      tags:
        - CheckoutLinks
      summary: Create a new checkout link offer
      description: Creates a checkout link offer.
      operationId: createCheckoutLinkOffer
      parameters:
        - name: x-publisher-token
          in: header
          required: true
          description: The publisher token, as displayed in the Publisher Dashboard.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCheckoutLinkDto'
      responses:
        '201':
          description: Checkout Link Offer created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutLinkDtoResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  requestUrl:
                    type: string
                  body:
                    type: string
        '401':
          description: Unauthorized.
components:
  schemas:
    CreateCheckoutLinkDto:
      type: object
      required:
        - publisherOfferId
        - name
        - type
        - active
        - segments
        - productsSequence
      properties:
        publisherOfferId:
          type: string
          description: The checkout link offer external ID.
        name:
          type: string
          description: The checkout link offer name. It must be at least 3 characters long.
        type:
          type: string
          description: The type of offer - In this case 'CheckoutLink'.
          enum:
            - CheckoutLink
        active:
          type: boolean
          description: Whether the checkout link offer is active.
        segments:
          type: array
          description: >-
            List of player segments that this checkout link offer applies to
            (e.g., ["NewUser", "BigSpender"]).
          items:
            type: string
        productsSequence:
          type: array
          description: >-
            The sequence of the products included in the offer. Limited to one
            `productsSequence` object.
          items:
            type: object
            properties:
              index:
                type: integer
                description: The order of the products in the checkout link offer.
              playerAvailability:
                type: number
                description: >-
                  The amount of times the player can purchase the checkout link
                  offer. Must be a minimum of 1.
              products:
                type: array
                description: List of products in the checkout link offer.
                items:
                  type: object
                  required:
                    - publisherProductId
                    - quantity
                    - priority
                  properties:
                    publisherProductId:
                      type: string
                      description: The product external ID.
                    quantity:
                      type: integer
                      description: The quantity of the product in the checkout link offer.
                    priority:
                      type: string
                      description: >-
                        Specifies the display priority of a product within the
                        checkout link offer.
                      enum:
                        - Main
                        - Sub
                      x-enum-descriptions:
                        - Main: >-
                            Primary display, with more prominent placement in
                            supported templates.
                        - Sub: >-
                            Secondary display, with less prominent placement in
                            supported templates.
              priceInUsdCents:
                type: integer
                description: >-
                  The price of the product in cents. Must be a minimum of 80
                  cents.
            required:
              - index
              - products
              - priceInUsdCents
        schedule:
          type: object
          required:
            - timeFrames
            - permanent
          description: The schedule for when the checkout link offer is available.
          properties:
            permanent:
              type: boolean
              description: Whether the checkout link offer is permanent.
            timeFrames:
              type: array
              description: >-
                The time frame for the scheduled offer. Leave blank if permanent
                is set to `true`. If permanent is `false`, at least 1 time frame
                is required. When specifying multiple `timeFrames`, the
                `startTime` and `endTime` of each must not overlap.
              items:
                type: object
                properties:
                  startTime:
                    type: string
                    description: Scheduled offer start time.
                    format: date-time
                  endTime:
                    type: string
                    description: Scheduled offer end time. Can't be a past date.
                    format: date-time
                  notes:
                    type: string
                    description: Notes about the scheduled offer.
                required:
                  - startTime
                  - endTime
            intervals:
              type: string
              description: >-
                Specifies the intervals for the scheduled checkout link offer.
                This is only applicable if `playerAvailability` is provided.
        displayName:
          type: string
          description: If not specified, the checkout link offer name will be used.
        description:
          type: string
          description: The checkout link offer description.
        publisherSectionId:
          type: string
          description: The publisher section ID.
        publisherTabId:
          type: string
          description: Tab ID in the web store.
        badges:
          type: array
          description: List of badges associated with the checkout link offer.
          items:
            type: object
            required:
              - publisherBadgeId
            properties:
              publisherBadgeId:
                type: string
                description: The ID as configured in the dashboard.
        productSale:
          type: object
          description: Sale details for products in the checkout link offer.
          properties:
            amountBeforeSale:
              type: number
              description: Product amount before sale is applied.
            sale:
              type: number
              description: The sale amount.
            type:
              type: string
              description: The type of sale.
              default: percentage
              enum:
                - percentage
                - multiplier
                - fixed_amount
          required:
            - sale
        priceDiscount:
          type: object
          description: Discount applied to the checkout link offer price.
          properties:
            priceBeforeDiscount:
              type: number
              description: Offer amount in USD before sale is applied.
            discount:
              type: number
              description: The discount amount.
            type:
              type: string
              description: The type of discount applied.
              default: percentage
              enum:
                - percentage
          required:
            - discount
    CheckoutLinkDtoResponse:
      type: object
      properties:
        publisherId:
          type: string
          description: Publisher ID.
        offerId:
          type: string
          description: The unique identifier of the checkout link offer.
        deeplinkUrl:
          type: string
          description: The deeplink offer URL.
        publisherOfferId:
          type: string
          description: >-
            The checkout link offer ID provided by the publisher. This is the
            offer's **External ID** value in the Publisher Dashboard.
        name:
          type: string
          description: The checkout link offer name.
        type:
          type: string
          description: The type of offer - In this case 'CheckoutLink'.
        active:
          type: boolean
          description: Whether the checkout link offer is active.
        segments:
          type: array
          description: >-
            List of player segments that this checkout link offer applies to
            (e.g., ["NewUser", "BigSpender"]).
          items:
            type: string
        productsSequence:
          type: array
          description: The sequence of the products included in the offer.
          items:
            type: object
            properties:
              index:
                type: integer
                description: The order of the products in the checkout link offer.
              playerAvailability:
                type: number
                description: >-
                  The amount of times the player can purchase the checkout link
                  offer.
              products:
                type: array
                description: List of products in the checkout link offer.
                items:
                  type: object
                  properties:
                    publisherProductId:
                      type: string
                      description: The product external ID.
                    quantity:
                      type: integer
                      description: The quantity of the product in the checkout link offer.
                    priority:
                      type: string
                      description: >-
                        Specifies the display priority of a product within the
                        checkout link offer.
                      enum:
                        - Main
                        - Sub
                      x-enum-descriptions:
                        - Main: >-
                            Primary display, with more prominent placement in
                            supported templates.
                        - Sub: >-
                            Secondary display, with less prominent placement in
                            supported templates.
              priceInUsdCents:
                type: integer
                description: The price of the product in cents.
        schedule:
          type: object
          description: The schedule for when the checkout link offer is available.
          properties:
            permanent:
              type: boolean
              description: Whether the checkout link offer is permanent.
            timeFrames:
              type: array
              description: >-
                The time frame for the scheduled offer. Leave blank if permanent
                is set to `true`. If permanent is `false`, at least 1 time frame
                is required. When specifying multiple `timeFrames`, the
                `startTime` and `endTime` of each must not overlap.
              items:
                type: object
                properties:
                  startTime:
                    type: string
                    description: Scheduled offer start time.
                    format: date-time
                  endTime:
                    type: string
                    description: Scheduled offer end time.
                    format: date-time
                  notes:
                    type: string
                    description: Notes about the scheduled offer.
            intervals:
              type: string
              description: >-
                Specifies the intervals for the scheduled checkout link offer.
                This is only applicable if `playerAvailability` is provided.
        createdAt:
          type: string
          description: Date the checkout link offer was created.
          format: date-time
        updatedAt:
          type: string
          description: Date the checkout link offer was updated.
          format: date-time

````