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

# Generate Checkout Quote

> This endpoint allows a user to generate a quote for a service via the API. You can either specify
a `product_code` directly or use the traditional combination of `product_type`, `country_id`, and
`product_protocol`.




## OpenAPI

````yaml post /public/user/checkout/quote
openapi: 3.0.1
info:
  title: Byteful Public User API
  description: Public API used for third-party usage.
  termsOfService: https://byteful.com
  contact:
    url: https://byteful.com
    email: developer@byteful.com
  version: '1.0'
  x-logo:
    altText: Byteful
    backgroundColor: '#6354eb'
    url: >-
      https://pbs.twimg.com/profile_banners/1038803520605118464/1729783007/1500x500
servers:
  - url: https://api.byteful.com/1.0/
security: []
paths:
  /public/user/checkout/quote:
    post:
      tags:
        - Checkout
      summary: Generate Checkout Quote
      description: >
        This endpoint allows a user to generate a quote for a service via the
        API. You can either specify

        a `product_code` directly or use the traditional combination of
        `product_type`, `country_id`, and

        `product_protocol`.
      parameters:
        - name: Content-Type
          in: header
          description: Content type for the request body as application/json.
          required: true
          schema:
            type: string
            default: application/json
      requestBody:
        description: The data needed to create the checkout quote.
        content:
          application/json:
            schema:
              required:
                - quantity
              type: object
              properties:
                country_id:
                  type: string
                  description: >-
                    The ISO country code of the product. Applicable for
                    region-specific datacenter/isp products.
                  example: gb
                cycle_interval:
                  type: string
                  description: The interval of the product.
                  example: month
                  default: month
                  enum:
                    - year
                    - month
                    - week
                    - day
                cycle_interval_count:
                  type: integer
                  description: The interval count of the product.
                  example: 1
                product_code:
                  type: string
                  description: >
                    If provided, this overrides product_type, country_id, and
                    product_protocol.

                    The cycle must still be valid for this product_code.
                  example: isp_gb
                product_protocol:
                  type: string
                  description: The protocol of the product.
                  example: ipv4
                  default: ipv4
                  enum:
                    - ipv4
                    - ipv6
                    - dual
                product_type:
                  type: string
                  description: The product type you would like to purchase.
                  example: isp
                  enum:
                    - datacenter
                    - isp
                    - residential
                promotional_code:
                  type: string
                  description: Promotional code to apply to the checkout.
                  example: NEWYEAR2025
                quantity:
                  type: integer
                  description: The quantity of the product you would like to purchase.
                  example: 1
                service_fulfillment_filter:
                  type: object
                  properties: {}
                  example:
                    asn_id: 7018
        required: true
      responses:
        '200':
          description: Quote generated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      before_discount_total:
                        type: integer
                        description: Total cost before any discounts.
                        example: 350
                      credit_balance:
                        type: integer
                        description: User's current credit balance.
                        example: 99050
                      credit_only_checkout:
                        type: boolean
                        description: Indicates if the checkout is credit only.
                        example: true
                      customer_credit_balance_applied:
                        type: boolean
                        description: Indicates if the user's credit balance was used.
                        example: true
                      customer_credit_balance_applied_amount:
                        type: integer
                        description: Amount of credit balance applied.
                        example: 350
                      discount:
                        type: integer
                        description: Discount amount applied.
                        example: 0
                      discounted:
                        type: boolean
                        description: Indicates if a discount was applied.
                        example: false
                      invalid_reason:
                        type: string
                        description: >-
                          Reason for the cart being invalid (only set if
                          is_valid=false).
                        example: 'null'
                      is_top_up:
                        type: boolean
                        description: Indicates if the cart is for a top-up.
                        example: false
                      is_valid:
                        type: boolean
                        description: Indicates if the cart is valid to checkout.
                        example: true
                      line_items:
                        type: array
                        description: Detailed list of cart items.
                        items:
                          type: object
                          properties:
                            item_country_id:
                              type: string
                              example: gb
                            item_name:
                              type: string
                              example: Static Residential ISP Proxies [GB]
                            item_per_unit_amount:
                              type: integer
                              example: 350
                            item_price_id:
                              type: string
                              example: price_1QJx2DB2BUlqim5lxmO3aT2v
                            item_price_type:
                              type: string
                              example: recurring
                            item_quantity:
                              type: integer
                              example: 1
                            item_total:
                              type: integer
                              example: 350
                            item_type:
                              type: string
                              example: isp
                            service_fulfillment_filter:
                              type: object
                              properties: {}
                              description: Additional filters for fulfillment (if any).
                              example: {}
                      promotional_code:
                        type: string
                        example: 'null'
                      promotional_code_id:
                        type: string
                        example: 'null'
                      top_up_amount:
                        type: integer
                        description: Amount intended for credit top-up (if applicable).
                        example: 0
                      total:
                        type: integer
                        description: Total cost after discounts, before credit.
                        example: 350
                      total_after_applied_credit:
                        type: integer
                        description: Total cost after discounts and credit.
                        example: 0
                  message:
                    type: string
                    description: Success message.
                    example: Quote generated successfully.
      security:
        - APIPrivateKey: []
          APIPublicKey: []
components:
  securitySchemes:
    APIPrivateKey:
      type: apiKey
      description: ' Private API key for user-level authentication.'
      name: X-API-Private-Key
      in: header
    APIPublicKey:
      type: apiKey
      description: ' Public API key for user-level authentication.'
      name: X-API-Public-Key
      in: header

````