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

# Create checkout session

> Create a hosted checkout session.



## OpenAPI

````yaml /openapi.yml post /checkout
openapi: 3.0.0
info:
  title: KulmiPay API
  description: >-
    Public API reference for KulmiPay collections, Send Money, wallets, refunds,
    and M-Pesa account configuration.
  version: 1.0.0
servers:
  - url: https://sandbox.kulmipay.com/api/v1
    description: Sandbox
  - url: https://app.kulmipay.com/api/v1
    description: Live
security:
  - SecretAPIKeyScheme: []
tags:
  - name: Collections
    description: >-
      Create hosted checkout sessions, M-Pesa STK Push requests, and payment
      status checks.
  - name: Send Money
    description: Initiate, approve, cancel, and track payout files.
  - name: Wallet as a Service
    description: Manage wallets, statements, wallet funding, and internal transfers.
  - name: Refunds
    description: Create and retrieve refund requests through the chargebacks API.
  - name: Bring Your M-Pesa Till/PayBill Number
    description: Configure M-Pesa Till and PayBill accounts.
  - name: Webhooks
    description: Retrieve webhook configuration and delivery events.
paths:
  /checkout:
    parameters: []
    post:
      tags:
        - Collections
      summary: Create checkout session
      description: Create a hosted checkout session.
      operationId: checkout_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CheckoutSer'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckoutSer'
components:
  schemas:
    CheckoutSer:
      type: object
      properties:
        id:
          title: Id
          type: string
          format: uuid
          readOnly: true
        url:
          title: Url
          type: string
          readOnly: true
          minLength: 1
        signature:
          title: Signature
          type: string
          readOnly: true
          minLength: 1
        first_name:
          title: First name
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 45
          nullable: true
        last_name:
          title: Last name
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 45
          nullable: true
        phone_number:
          title: Phone number
          type: string
          pattern: ^[0-9-_+ ]+$
          maxLength: 30
          nullable: true
        email:
          title: Email
          type: string
          format: email
          maxLength: 254
          nullable: true
        country:
          title: Country
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 2
          nullable: true
        address:
          title: Address
          type: string
          pattern: ^[a-zA-Z0-9-_ .,]+$
          maxLength: 140
          nullable: true
        city:
          title: City
          type: string
          pattern: ^[a-zA-Z0-9-_ .,]+$
          maxLength: 70
          nullable: true
        state:
          title: State
          type: string
          pattern: ^[a-zA-Z0-9-_ .,]+$
          maxLength: 70
          nullable: true
        zipcode:
          title: Zipcode
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 10
          nullable: true
        api_ref:
          title: Api ref
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 70
          nullable: true
        wallet_id:
          title: Wallet id
          type: string
          pattern: ^[a-zA-Z0-9-_ ]+$
          maxLength: 10
          nullable: true
        method:
          title: Method
          type: string
          enum:
            - M-PESA
            - PESALINK
          nullable: true
        host:
          title: Host
          type: string
          format: uri
          pattern: ^[a-zA-Z0-9-_./=:?# ]+$
          maxLength: 400
          nullable: true
        is_mobile:
          title: Is mobile
          type: boolean
        version:
          title: Version
          type: string
          readOnly: true
          minLength: 1
          nullable: true
        redirect_url:
          title: Redirect url
          type: string
          format: uri
          pattern: ^[a-zA-Z0-9-_./=:?# ]+$
          maxLength: 400
          nullable: true
        amount:
          title: Amount
          type: string
          format: decimal
        currency:
          title: Currency
          type: string
          enum:
            - KES
            - USD
            - EUR
            - GBP
        paid:
          title: Paid
          type: boolean
          readOnly: true
        mobile_tarrif:
          title: Mobile tarrif
          type: string
          enum:
            - BUSINESS-PAYS
            - CUSTOMER-PAYS
        bitcoin_tarrif:
          title: Bitcoin tarrif
          type: string
          enum:
            - BUSINESS-PAYS
            - CUSTOMER-PAYS
        ach_tarrif:
          title: Ach tarrif
          type: string
          enum:
            - BUSINESS-PAYS
            - CUSTOMER-PAYS
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
          nullable: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
          nullable: true
  securitySchemes:
    SecretAPIKeyScheme:
      type: http
      scheme: bearer
      description: Use your KulmiPay secret key as the Bearer token.
      x-default: ISSecretKey_test_xxxxxxxxxxxxxxxx

````