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

# Create a checkout session



## OpenAPI

````yaml /openapi.json post /v1/checkout/sessions
openapi: 3.1.0
info:
  title: Duro API
  version: 1.0.0
  description: >-
    Recovery-first subscription billing. Authenticate with a secret key
    (sk_test_ / sk_live_) as a bearer token. Amounts are in integer minor units
    (kobo).
servers:
  - url: https://api.useduro.com
    description: Production (live)
  - url: https://sandbox.useduro.com
    description: Sandbox (test)
security:
  - bearerAuth: []
tags:
  - name: Plans
  - name: Promo Codes
  - name: Payment Links
  - name: Customers
  - name: Transactions
  - name: Subscriptions
  - name: Invoices
  - name: Recovery
  - name: Settings
  - name: Analytics
  - name: Checkout
  - name: Events
  - name: OAuth
  - name: Customer Checkout
  - name: Customer Identity
  - name: Customer Portal
paths:
  /v1/checkout/sessions:
    post:
      tags:
        - Checkout
      summary: Create a checkout session
      operationId: createCheckoutSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutCreate'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSession'
components:
  schemas:
    CheckoutCreate:
      type: object
      properties:
        planId:
          type: string
          description: Either planId or amount is required.
        amount:
          type: integer
        currency:
          type: string
          default: NGN
        customerEmail:
          type: string
          format: email
        customerPhone:
          type: string
        successUrl:
          type: string
          format: uri
        metadata:
          type: object
    CheckoutSession:
      type: object
      properties:
        id:
          type: string
        token:
          type: string
        url:
          type: string
        status:
          type: string
        kind:
          type: string
          enum:
            - subscription
            - one_time
        amount:
          type: integer
        currency:
          type: string
        planId:
          type: string
          nullable: true
        createdAt:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A secret key (sk_test_… / sk_live_…), OAuth token, or identity token.

````