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

# Quote payment

> Calculate pricing quote for products, invoices, or custom items with currency conversion support



## OpenAPI

````yaml post /pay/quote
openapi: 3.1.0
info:
  title: BitGPT 402pay API
  description: Full description of private and dev-availble API endpoints
  version: 1.0.0
  termsOfService: https://bitgpt.xyz/terms
  contact:
    name: API Support
    url: https://help.bitgpt.xyz
    email: support@bitgpt.xyz
servers:
  - url: https://api.bitgpt.xyz
    description: Production API server
security: []
tags:
  - name: Payments
    description: Invoice and payment management endpoints
  - name: Products
    description: Product management endpoints
  - name: dev-api
    description: Developer API endpoints
externalDocs:
  description: Full BitGPT 402pay API documentation
  url: https://docs.bitgpt.xyz
paths:
  /pay/quote:
    post:
      tags:
        - Payments
        - dev-api
      summary: Quote payment
      description: >-
        Calculate pricing quote for products, invoices, or custom items with
        currency conversion support
      operationId: calculateQuote
      requestBody:
        $ref: '#/components/requestBodies/calculatorQuoteRequest'
      responses:
        '200':
          $ref: '#/components/responses/calculatorQuoteResponse'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
      security:
        - BearerAuth: []
          ApiKeyAuth: []
components:
  requestBodies:
    calculatorQuoteRequest:
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/calculateQuoteRequest'
  responses:
    '400':
      description: Bad request
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: integer
                enum:
                  - 400
                  - 401
                  - 403
                  - 404
                description: Status code of the response
              data:
                type:
                  - object
                  - 'null'
                description: Response data containing the requested object
              error:
                type:
                  - string
                  - 'null'
                examples:
                  - Invalid email address
                description: Error message of the response, human readable
              message:
                type: 'null'
              env:
                type: string
                enum:
                  - development
                  - production
                description: API environment
              log:
                type:
                  - string
                  - object
                  - 'null'
                examples:
                  - request_id: req_1234567890
                  - Some pertinent log message
                description: Useful informaiton, not always present, to debug the response
              validator:
                type:
                  - object
                  - 'null'
                examples:
                  - email: Invalid email address
                    password: Password is required
                description: >-
                  Validator response object, each key is the field name and
                  value is the error message
              support_id:
                type:
                  - string
                  - 'null'
                format: uuid
                examples:
                  - support_uuidv7-something-else
                description: >-
                  Support ID linked to the response, used to identify it when
                  talking with our team
            required:
              - status
              - error
              - message
              - env
              - log
              - validator
              - support_id
    '401':
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Invalid email address
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - validator
                  - support_id
              - properties:
                  status:
                    type: integer
                    enum:
                      - 401
    '403':
      description: You do not have the required permissions to access this resource
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Invalid email address
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - validator
                  - support_id
              - properties:
                  status:
                    type: integer
                    enum:
                      - 403
    calculatorQuoteResponse:
      description: Quote calculated successfully
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Response200'
              - type: object
                description: Calculator quote response
                properties:
                  data:
                    type: object
                    description: Calculation result data
                    properties:
                      exchange_rate_timestamp:
                        type: string
                        format: mysql-date-time
                        description: Timestamp of the exchange rate used for calculations
                      total:
                        type: object
                        description: Total calculation information
                        properties:
                          currency:
                            $ref: '#/components/schemas/currency'
                            description: Currency of the price
                          currency_orig:
                            $ref: '#/components/schemas/currency'
                            description: Original currency of the price
                          price:
                            type: string
                            description: Total amount in the specified currency
                          price_usd:
                            type: string
                            description: Total amount in USD
                          price_orig:
                            type: string
                            description: Total amount in the original currency
                      currency:
                        $ref: '#/components/schemas/currency'
                        description: Currency of the calculation
                      items:
                        type: array
                        description: >-
                          Array of calculation results for each item in the
                          quote, including step-by-step calculations and totals
                        items:
                          type: object
                          properties:
                            item:
                              type: object
                              description: >-
                                Original input item that was used for
                                calculation.
                              oneOf:
                                - type: object
                                  description: Product item
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - PRODUCT
                                      description: Type of item
                                    product_id:
                                      type: string
                                      description: Product ID
                                    billing_schema_id:
                                      type: string
                                      description: Billing schema ID
                                    quantity:
                                      type: integer
                                      minimum: 1
                                      description: Quantity of the product
                                    currency:
                                      $ref: '#/components/schemas/currency'
                                      description: Currency for this item
                                    status:
                                      type: string
                                      enum:
                                        - INCLUDED
                                        - EXCLUDED
                                      description: Status of the item in the quote
                                  required:
                                    - product_id
                                    - billing_schema_id
                                    - type
                                    - quantity
                                    - currency
                                - type: object
                                  description: Payment intent item
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - PAYMENT_INTENT
                                      description: Type of item
                                    price:
                                      type: string
                                      description: Price amount
                                    currency:
                                      $ref: '#/components/schemas/currency'
                                      description: Currency code
                                    status:
                                      type: string
                                      enum:
                                        - INCLUDED
                                        - EXCLUDED
                                      description: Status of the item in the quote
                                  required:
                                    - type
                                    - price
                                    - currency
                                - type: object
                                  description: Total
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - TOTAL
                                      description: Type of item
                                    currency:
                                      $ref: '#/components/schemas/currency'
                                      description: Currency code
                                    status:
                                      type: string
                                      enum:
                                        - INCLUDED
                                        - EXCLUDED
                                      description: Status of the item in the quote
                                  required:
                                    - type
                                    - currency
                                - type: object
                                  description: Total in USD
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - TOTAL_USD
                                      description: Type of item
                                    currency:
                                      $ref: '#/components/schemas/currency'
                                      description: Currency code
                                    status:
                                      type: string
                                      enum:
                                        - INCLUDED
                                        - EXCLUDED
                                      description: Status of the item in the quote
                                  required:
                                    - type
                                    - currency
                                - type: object
                                  description: Total in the product's original currency
                                  properties:
                                    type:
                                      type: string
                                      enum:
                                        - TOTAL_ORIGINAL
                                      description: Type of item
                                    currency:
                                      $ref: '#/components/schemas/currency'
                                      description: Currency code
                                    status:
                                      type: string
                                      enum:
                                        - INCLUDED
                                        - EXCLUDED
                                      description: Status of the item in the quote
                                  required:
                                    - type
                                    - currency
                            calculations:
                              type: array
                              description: >-
                                Step-by-step calculation breakdown showing
                                transformations (product pricing, discounts,
                                currency changes, etc.)
                              items:
                                type: object
                                properties:
                                  idx:
                                    type: integer
                                    description: Calculation step index
                                  currency:
                                    $ref: '#/components/schemas/currency'
                                    description: Currency for this calculation step
                                  calculation_type:
                                    type: string
                                    description: >-
                                      Type of calculation (PRODUCT, DISCOUNT,
                                      CURRENCY_CHANGE, TOTAL, etc.)
                                    enum:
                                      - PRODUCT
                                      - PAYMENT_INTENT
                                      - CURRENCY_CHANGE
                                      - DISCOUNT
                                      - TOTAL
                                      - TOTAL_USD
                                      - TOTAL_ORIGINAL
                                  title:
                                    type: string
                                    description: >-
                                      Human-readable title for this calculation
                                      step
                                  initial_price:
                                    type: string
                                    description: Price before this calculation step
                                  price:
                                    type: string
                                    description: Price after this calculation step
                                  price_delta:
                                    type: string
                                    description: Price change in this step
                                  initial_price_usd:
                                    type: string
                                    description: Price before this calculation step (USD)
                                  price_usd:
                                    type: string
                                    description: Price after this calculation step (USD)
                                  price_delta_usd:
                                    type: string
                                    description: Price change in this step (USD)
                                  initial_price_orig:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      Price before this calculation step
                                      (Original Currency)
                                  price_orig:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      Price after this calculation step
                                      (Original Currency)
                                  price_delta_orig:
                                    type:
                                      - string
                                      - 'null'
                                    description: >-
                                      Price change in this step (Original
                                      Currency)
                                  details:
                                    type: object
                                    description: >-
                                      Additional details specific to the
                                      calculation type
                                required:
                                  - idx
                                  - currency
                                  - calculation_type
                                  - title
                                  - initial_price
                                  - price
                                  - price_delta
                                  - details
                            total:
                              type: object
                              description: Final calculated total for this item
                              properties:
                                currency:
                                  $ref: '#/components/schemas/currency'
                                  description: Currency of the total
                                price:
                                  type: string
                                  description: Total price in the specified currency
                                price_usd:
                                  type: string
                                  description: Total price in USD
                    required:
                      - total
                      - currency
                      - items
                required:
                  - data
                examples:
                  - data:
                      currency: EUR
                      exchange_rate_timestamp: '2025-07-17 14:10:54'
                      total:
                        currency: EUR
                        price: '32.951697216289163687202823978002'
                        price_usd: '37.466313000185518054389028083023'
                      items:
                        - item:
                            type: PRODUCT
                            product_id: product_019814e9-b117-7e35-aa51-4ff1f9d1948f
                            quantity: 1
                            billing_schema_id: schema_019814e9-b119-780c-9f69-7bb0e6bf9886
                            currency: GBP
                          calculations:
                            - idx: 0
                              currency: GBP
                              calculation_type: PRODUCT
                              title: Product GBP 10$
                              initial_price: '10.000000000000000000000000000000'
                              price: '10.000000000000000000000000000000'
                              price_delta: '0'
                              initial_price_orig: '10.000000000000000000000000000000'
                              price_orig: '10.000000000000000000000000000000'
                              price_delta_orig: '0'
                              initial_price_usd: '13.535499554682065493724914679486'
                              price_usd: '13.535499554682065493724914679486'
                              price_delta_usd: '0'
                              details:
                                product_id: product_019814e9-b117-7e35-aa51-4ff1f9d1948f
                                currency: GBP
                                price: '10.000000000000000000000000000000'
                                quantity: 1
                            - idx: 1
                              currency: EUR
                              calculation_type: CURRENCY_CHANGE
                              title: Currency change GBP => EUR
                              initial_price: '10.000000000000000000000000000000'
                              price: '11.904498929341986033539547683847'
                              price_delta: '0'
                              initial_price_orig: '10.000000000000000000000000000000'
                              price_orig: '10.000000000000000000000000000000'
                              price_delta_orig: '0'
                              initial_price_usd: '13.535499554682065493724914679486'
                              price_usd: '13.535499554682065493724914679486'
                              price_delta_usd: '0'
                              details:
                                from: GBP
                                to: EUR
                                from_rate_usd: '0.738797999999999954'
                                to_rate_usd: '0.879502000000000005'
                          total:
                            currency: EUR
                            currency_original: GBP
                            price: '11.904498929341986033539547683847'
                            price_usd: '13.535499554682065493724914679486'
                            price_orig: '10.000000000000000000000000000000'
                        - item:
                            type: PRODUCT
                            product_id: product_01979cc2-6b9a-7cbf-9dbf-fa7dba4f0e50
                            quantity: 4
                            billing_schema_id: schema_01979cc2-6b9c-7062-80ca-97ddcd00fd29
                            currency: GBP
                          calculations:
                            - idx: 0
                              currency: GBP
                              calculation_type: PRODUCT
                              title: ONE_TIME PRODUCT
                              initial_price: '16.000000000000000000000000000000'
                              price: '16.000000000000000000000000000000'
                              price_delta: '0'
                              initial_price_orig: '16.000000000000000000000000000000'
                              price_orig: '16.000000000000000000000000000000'
                              price_delta_orig: '0'
                              initial_price_usd: '21.656799287491304789959863487177'
                              price_usd: '21.656799287491304789959863487177'
                              price_delta_usd: '0'
                              details:
                                product_id: product_01979cc2-6b9a-7cbf-9dbf-fa7dba4f0e50
                                currency: GBP
                                price: '4.000000000000000000000000000000'
                                quantity: 4
                            - idx: 1
                              currency: EUR
                              calculation_type: CURRENCY_CHANGE
                              title: Currency change GBP => EUR
                              initial_price: '16.000000000000000000000000000000'
                              price: '19.047198286947177653663276294155'
                              price_delta: '0'
                              initial_price_orig: '16.000000000000000000000000000000'
                              price_orig: '16.000000000000000000000000000000'
                              price_delta_orig: '0'
                              initial_price_usd: '21.656799287491304789959863487177'
                              price_usd: '21.656799287491304789959863487177'
                              price_delta_usd: '0'
                              details:
                                from: GBP
                                to: EUR
                                from_rate_usd: '0.738797999999999954'
                                to_rate_usd: '0.879502000000000005'
                          total:
                            currency: EUR
                            currency_original: GBP
                            price: '19.047198286947177653663276294155'
                            price_usd: '21.656799287491304789959863487177'
                            price_orig: '16.000000000000000000000000000000'
                        - item:
                            type: PAYMENT_INTENT
                            price: '2'
                            currency: EUR
                          calculations:
                            - idx: 0
                              currency: EUR
                              calculation_type: PAYMENT_INTENT
                              title: 'Payment Intent: N/A'
                              initial_price: '2.000000000000000000000000000000'
                              price: '2.000000000000000000000000000000'
                              price_delta: '0'
                              initial_price_orig: '2.000000000000000000000000000000'
                              price_orig: '2.000000000000000000000000000000'
                              price_delta_orig: '0'
                              initial_price_usd: '2.274014158012147770704249916360'
                              price_usd: '2.274014158012147770704249916360'
                              price_delta_usd: '0'
                              details:
                                payment_intent_id: null
                                currency: EUR
                                price: '2'
                                quantity: 1
                          total:
                            currency: EUR
                            currency_original: EUR
                            price: '2.000000000000000000000000000000'
                            price_usd: '2.274014158012147770704249916360'
                            price_orig: '2.000000000000000000000000000000'
                        - item:
                            type: TOTAL
                            currency: EUR
                            status: INCLUDED
                          calculations:
                            - idx: 0
                              currency: EUR
                              calculation_type: TOTAL
                              title: Total
                              initial_price: '32.951697216289163687202823978002'
                              price: '32.951697216289163687202823978002'
                              price_delta: '0'
                              initial_price_orig: null
                              price_orig: null
                              price_delta_orig: '0'
                              initial_price_usd: '37.466313000185518054389028083023'
                              price_usd: '37.466313000185518054389028083023'
                              price_delta_usd: '0'
                              details: []
                        - item:
                            type: TOTAL_USD
                            currency: USD
                            status: INCLUDED
                          calculations:
                            - idx: 0
                              currency: USD
                              calculation_type: TOTAL_USD
                              title: Total, USD
                              initial_price: '37.466313000185518054389028083023'
                              price: '37.466313000185518054389028083023'
                              price_delta: '0'
                              details: []
  schemas:
    calculateQuoteRequest:
      type: object
      description: Request body for calculating quote
      oneOf:
        - type: object
          description: Product calculation request
          properties:
            currency:
              $ref: '#/components/schemas/currency'
              description: >-
                Main currency for calculation (optional, can be determined from
                product)
            product:
              type: object
              description: Product calculation request
              properties:
                id:
                  type: string
                  description: Product ID
                product_id:
                  type: string
                  description: Alternative field name for product ID
                quantity:
                  type: integer
                  minimum: 1
                  description: Quantity of the product
                billing_schema_id:
                  type: string
                  description: Billing schema ID (optional if product has only one schema)
              required:
                - quantity
              anyOf:
                - required:
                    - id
                - required:
                    - product_id
          required:
            - product
        - type: object
          description: Invoice calculation request
          properties:
            currency:
              $ref: '#/components/schemas/currency'
              description: >-
                Main currency for calculation (optional, can be determined from
                invoice)
            invoice:
              type: object
              description: Invoice calculation request
              properties:
                id:
                  type: string
                  description: Invoice ID
              required:
                - id
          required:
            - invoice
        - type: object
          description: Items calculation request
          properties:
            currency:
              $ref: '#/components/schemas/currency'
              description: >-
                Main currency for calculation (optional, can be determined from
                items). You must specify currency if all items do not have the
                same currency
            items:
              type: array
              minItems: 1
              description: Array of items for calculation
              items:
                oneOf:
                  - type: object
                    description: Product item
                    properties:
                      type:
                        type: string
                        enum:
                          - PRODUCT
                        description: Type of item
                      product_id:
                        type: string
                        description: Alternative field name for product ID
                      quantity:
                        type: integer
                        minimum: 1
                        description: Quantity of the product
                      billing_schema_id:
                        type: string
                        description: >-
                          Billing schema ID (optional if product has only one
                          schema)
                      currency:
                        $ref: '#/components/schemas/currency'
                        description: >-
                          Currency for this item (optional, can be determined
                          from billing schema)
                    required:
                      - product_id
                      - type
                      - quantity
                  - type: object
                    description: Payment intent item
                    properties:
                      type:
                        type: string
                        enum:
                          - PAYMENT_INTENT
                        description: Type of item
                      price:
                        type:
                          - number
                          - string
                        description: Price amount
                      currency:
                        $ref: '#/components/schemas/currency'
                        description: Currency code
                      payment_intent_id:
                        type: string
                        description: Payment intent ID (optional)
                    required:
                      - type
                      - price
                      - currency
          required:
            - items
      examples:
        - currency: USD
          product:
            id: product_123
            quantity: 2
            billing_schema_id: schema_456
        - invoice:
            id: invoice_789
          currency: EUR
        - items:
            - type: PRODUCT
              id: product_123
              quantity: 1
              billing_schema_id: schema_456
            - type: PAYMENT_INTENT
              price: 100.5
              currency: USD
          currency: EUR
    Response200:
      type: object
      properties:
        status:
          type: integer
          enum:
            - 200
            - 201
            - 202
          description: Status code of the response
        data:
          type:
            - object
            - array
            - 'null'
          description: Response data containing the requested object
        error:
          type:
            - string
            - 'null'
          examples:
            - Invalid email address
          description: Error message of the response, human readable
        message:
          type:
            - string
            - 'null'
          examples:
            - Resource created successfully
          description: Message of the response, human readable
        env:
          type: string
          enum:
            - development
            - production
          description: API environment
        log:
          type:
            - string
            - object
            - 'null'
          examples:
            - request_id: req_1234567890
            - Some pertinent log message
          description: Useful informaiton, not always present, to debug the response
        validator:
          type:
            - object
            - 'null'
          examples:
            - email: Invalid email address
              password: Password is required
          description: >-
            Validator response object, each key is the field name and value is
            the error message
        support_id:
          type:
            - string
            - 'null'
          format: uuid
          examples:
            - support_uuidv7-something-else
          description: >-
            Support ID linked to the response, used to identify it when talking
            with our team
      required:
        - status
        - data
        - message
        - env
      examples:
        - status: 200
          data:
            id: '123'
          error: null
          log: null
          validator: null
          support_id: null
          message: Resource created successfully
          env: development
    currency:
      type: string
      enum:
        - BITCOIN
        - ETHEREUM
        - USDT
        - USDC
        - USDC_NATIVE
        - SOLANA
        - BINANCE_COIN
        - RIPPLE
        - POLYGON
        - TRON
        - LITECOIN
        - BITCOIN_CASH
        - DOGECOIN
        - USD
        - EUR
        - CHF
        - GBP
        - AUD
        - JPY
        - CNY
        - CAD
        - HKD
        - SGD
        - SEK
        - KRW
        - NOK
        - NZD
        - INR
        - MXN
        - TWD
        - ZAR
        - BRL
        - DKK
        - PLN
        - THB
        - ILS
        - IDR
        - CZK
        - AED
        - TRY
        - HUF
        - CLP
        - SAR
        - PHP
        - MYR
        - COP
        - RUB
        - RON
        - PEN
      examples:
        - GBP
        - BITCOIN
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Send your access token as header Authorization: Bearer {accessToken}'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your API key that starts with sk_live or sk_test. You can create yours
        at go.bitgpt.xyz/api-keys.

````