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

# Create an order and start payment

> Creates an order for plans, domains or renewals. Card payments return a `payment_url`; Mobile Money sends a payment prompt to the phone. Free orders are provisioned immediately. Send an `Idempotency-Key` header to make retries safe.

CLI: `orbitlab buy …`



## OpenAPI

````yaml /api-reference/openapi.json post /v1/checkout
openapi: 3.1.0
info:
  title: OrbitLab API
  version: 1.0.0
  description: >-
    Manage OrbitLab services, deployments, domains, DNS, databases,
    organizations and billing programmatically. Authenticate with an API token:
    `Authorization: Bearer olab_…`.
servers:
  - url: https://orbitlab.dev/api
    description: Production
security: []
tags:
  - name: Authentication
    description: CLI device login.
  - name: User
    description: The authenticated user and their API tokens.
  - name: Organizations
    description: Organizations, members and invitations.
  - name: Catalog
    description: Plans and deployable templates.
  - name: Services
    description: 'Apps, WordPress sites and VPS: configuration, deployments and environment.'
  - name: Logs & metrics
    description: Build logs, runtime logs, request logs and resource usage.
  - name: Service domains
    description: Custom domains attached to a service.
  - name: Files
    description: File manager and SFTP access.
  - name: WordPress
    description: Managed actions (WP-CLI) and admin reset.
  - name: Hostings
    description: Shared hosting subscriptions and their websites.
  - name: Domains
    description: Domain registration, settings and DNS records.
  - name: Databases
    description: Managed databases.
  - name: Billing
    description: Checkout, orders, invoices, renewals and autopay.
  - name: GitHub
    description: GitHub App installations and repositories.
paths:
  /v1/checkout:
    post:
      tags:
        - Billing
      summary: Create an order and start payment
      description: >-
        Creates an order for plans, domains or renewals. Card payments return a
        `payment_url`; Mobile Money sends a payment prompt to the phone. Free
        orders are provisioned immediately. Send an `Idempotency-Key` header to
        make retries safe.


        CLI: `orbitlab buy …`
      operationId: postCheckout
      parameters:
        - $ref: '#/components/parameters/OrgHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        description: Item type.
                        enum:
                          - domain
                          - hosting
                          - vps
                          - application
                      planId:
                        type: string
                        description: Plan id (required except for domains).
                      domain:
                        type: string
                        description: Domain name (domain items).
                      label:
                        type: string
                        description: Name for the new service.
                      quantity:
                        type: integer
                        description: >-
                          Months (monthly) or years (yearly/domains). Defaults
                          to 1.
                      period:
                        type: string
                        description: Billing cycle.
                        enum:
                          - monthly
                          - yearly
                      renew:
                        type: boolean
                        description: Renew an existing resource (see billing/renewals).
                    required:
                      - type
                paymentMethod:
                  type: string
                  description: >-
                    Defaults to `mobile_money`, the only method that can collect
                    payment. Card payments are unavailable: `credit_card` is
                    accepted for free orders only.
                  enum:
                    - mobile_money
                    - credit_card
                mobileMoneyNetwork:
                  type: string
                  description: Provider code, e.g. `VODACOM_MPESA_COD` (Mobile Money).
                mobileMoneyPhone:
                  type: string
                  description: Phone number (Mobile Money).
                paymentCurrency:
                  type: string
                  description: Charge in `USD` or the local currency. Defaults to `local`.
                  enum:
                    - USD
                    - local
                enableAutopay:
                  type: boolean
                  description: Save the Mobile Money number for automatic renewals.
                appliedPromoCodeId:
                  type: string
                  description: Promo code id from the validate endpoint.
                  format: uuid
                billing:
                  type: object
                  properties:
                    firstName:
                      type: string
                      description: First name.
                    lastName:
                      type: string
                      description: Last name.
                    address:
                      type: string
                      description: Address.
                    country:
                      type: string
                      description: ISO 3166-1 alpha-2 country code.
                    phone:
                      type: string
                      description: Phone.
                  required:
                    - firstName
                    - lastName
                    - address
                    - country
                idempotencyKey:
                  type: string
                  description: Alternative to the Idempotency-Key header.
                lang:
                  type: string
                  description: Language of the payment page.
                  enum:
                    - fr
                    - en
              required:
                - items
      responses:
        '200':
          description: >-
            `orderId`, `paymentMethod`, `provider` and, for card payments,
            `payment_url`.
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing, invalid or expired credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Not allowed for this token or organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited; see the Retry-After header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
        - sessionCookie: []
components:
  parameters:
    OrgHeader:
      name: X-OrbitLab-Org
      in: header
      required: false
      description: >-
        Organization to act on (id or slug) for tokens that can access several
        organizations. Defaults to your first organization.
      schema:
        type: string
  schemas:
    Error:
      type: object
      properties:
        error:
          description: Error message (a string, or field errors for validation failures).
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token (`olab_…`) created in Settings → API tokens or with `orbitlab
        login`.
    sessionCookie:
      type: apiKey
      in: cookie
      name: authjs.session-token
      description: Dashboard browser session.

````