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

# Create a Checkout Session for this order

> Create a Ringup Checkout Session for this order, before taking payment. Returns the session id and payment_required, resolved per purchase from the merchant's settings and the amount.



## OpenAPI

````yaml /api-reference/openapi.json post /create_checkout
openapi: 3.1.0
info:
  title: Ringup tools API
  description: >-
    Five REST tools for taking payment on a voice call. Identity rides trusted
    headers; the model never types a phone number or merchant id.
  version: 1.0.0
servers:
  - url: https://ringup.dev/api/tools
security: []
paths:
  /create_checkout:
    post:
      summary: Create a Checkout Session for this order
      description: >-
        Create a Ringup Checkout Session for this order, before taking payment.
        Returns the session id and payment_required, resolved per purchase from
        the merchant's settings and the amount.
      operationId: create_checkout
      parameters:
        - $ref: '#/components/parameters/CallerNumber'
        - $ref: '#/components/parameters/Merchant'
        - $ref: '#/components/parameters/CallId'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                amount_cents:
                  type: number
                  description: The purchase amount in cents.
            example:
              amount_cents: 8500
      responses:
        '200':
          description: The policy decision for this purchase.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The Checkout Session id (cs_...).
                  payment_required:
                    type: string
                    enum:
                      - required
                      - optional
                      - none
                    description: >-
                      required: payment must complete before the call ends.
                      optional: offer once, never block. none: do not offer
                      payment at all; proceed as the business's normal flow.
                  reason:
                    type: string
                    description: >-
                      One sentence written for the model, telling the payment
                      step how to behave.
              example:
                id: cs_x9f2
                payment_required: required
                reason: amount over $50 requires payment before the call ends
components:
  parameters:
    CallerNumber:
      name: X-Caller-Number
      in: header
      required: true
      description: >-
        The caller's phone number in E.164, templated from the platform's
        caller-ID variable. Never model-generated.
      schema:
        type: string
        example: '+14155550142'
    Merchant:
      name: X-Ringup-Merchant
      in: header
      required: true
      description: >-
        The dialed number in E.164 (resolved to a merchant server-side) or an
        explicit merchant id.
      schema:
        type: string
        example: tonys-pizza
    CallId:
      name: X-Call-Id
      in: header
      required: false
      description: >-
        The platform's call id. Used for charge idempotency: retries within a
        call can never double-charge.
      schema:
        type: string

````