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

# Create Order

> Create a domain order without immediate payment.

This endpoint validates domain availability, retrieves pricing from the
registrar provider, and creates a pending order. The organization can
then submit a manual payment and allocate it to the order.

Returns order details including price, order_id, and payment instructions.



## OpenAPI

````yaml POST /api/v1/registrar/order
openapi: 3.1.0
info:
  title: Dotlet API
  description: >-
    The Dotlet API lets you search, register, and manage domains, configure DNS
    records, and embed domain purchasing flows in your own product.


    All endpoints are authenticated with an API key or bearer token, and all
    request and response bodies are JSON.
  version: 0.1.1
  contact:
    name: Dotlet Support
    url: https://dotlet.net/support
    email: support@dotlet.net
servers:
  - url: https://api.dotlet.net
    description: Production
security: []
tags:
  - name: Domains
    description: Search, price, register, renew, and manage domains.
  - name: Orders
    description: Create and track domain orders separately from immediate purchases.
  - name: DNS
    description: Manage DNS records for domains hosted with Dotlet.
  - name: Hosted Sessions
    description: Create embeddable, scoped sessions for end users in your own product.
paths:
  /api/v1/registrar/order:
    post:
      tags:
        - Orders
      summary: Create Order
      description: >-
        Create a domain order without immediate payment.


        This endpoint validates domain availability, retrieves pricing from the

        registrar provider, and creates a pending order. The organization can

        then submit a manual payment and allocate it to the order.


        Returns order details including price, order_id, and payment
        instructions.
      operationId: create_order_api_v1_registrar_order_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DomainOrderRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainOrderResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    DomainOrderRequest:
      properties:
        domain:
          type: string
          maxLength: 255
          minLength: 1
          title: Domain
        years:
          type: integer
          maximum: 10
          minimum: 1
          title: Years
          default: 1
        contact:
          $ref: '#/components/schemas/RegistrantContactSchema'
        payment_method:
          type: string
          enum:
            - wire
            - card
          title: Payment Method
          description: 'Payment method: ''wire'' or ''card'''
          default: card
        nameservers:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Nameservers
        privacy:
          type: boolean
          title: Privacy
          default: true
        auto_renew:
          type: boolean
          title: Auto Renew
          default: true
        registrar:
          type: string
          title: Registrar
          description: Registrar to use (currently only namecheap is supported)
          default: namecheap
        setup_dns:
          type: boolean
          title: Setup Dns
          description: Automatically setup DNS after purchase
          default: false
        dns_provider:
          type: string
          title: Dns Provider
          description: DNS provider to use for setup
          default: cloudflare
      type: object
      required:
        - domain
        - contact
      title: DomainOrderRequest
      description: Request to create a domain order (without immediate payment)
    DomainOrderResponse:
      properties:
        order_id:
          type: string
          format: uuid
          title: Order Id
        domain_name:
          type: string
          title: Domain Name
        years:
          type: integer
          title: Years
        price:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Price
        currency:
          type: string
          title: Currency
        status:
          $ref: '#/components/schemas/DomainOrderStatus'
        checkout_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Checkout Url
        banking_details:
          anyOf:
            - $ref: '#/components/schemas/BankDetails'
            - type: 'null'
      type: object
      required:
        - order_id
        - domain_name
        - years
        - price
        - currency
        - status
      title: DomainOrderResponse
      description: Response for domain order with payment status
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RegistrantContactSchema:
      properties:
        first_name:
          type: string
          maxLength: 100
          minLength: 1
          title: First Name
        last_name:
          type: string
          maxLength: 100
          minLength: 1
          title: Last Name
        email:
          type: string
          format: email
          title: Email
        phone:
          type: string
          maxLength: 20
          minLength: 10
          title: Phone
        address1:
          type: string
          maxLength: 255
          minLength: 1
          title: Address1
        city:
          type: string
          maxLength: 100
          minLength: 1
          title: City
        state:
          type: string
          maxLength: 100
          minLength: 1
          title: State
        postal_code:
          type: string
          maxLength: 20
          minLength: 1
          title: Postal Code
        country:
          type: string
          maxLength: 2
          minLength: 2
          title: Country
        organization:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Organization
        address2:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Address2
      type: object
      required:
        - first_name
        - last_name
        - email
        - phone
        - address1
        - city
        - state
        - postal_code
        - country
      title: RegistrantContactSchema
      description: Contact information for domain registration
    DomainOrderStatus:
      type: string
      enum:
        - pending
        - ready_to_process
        - price_changed
        - processing
        - completed
        - failed
        - cancelled
        - refunded
      title: DomainOrderStatus
    BankDetails:
      properties:
        bank_name:
          type: string
          title: Bank Name
        account_name:
          type: string
          title: Account Name
        account_number:
          type: string
          title: Account Number
        routing_number:
          type: string
          title: Routing Number
      type: object
      required:
        - bank_name
        - account_name
        - account_number
        - routing_number
      title: BankDetails
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    HTTPBearer:
      type: http
      scheme: bearer

````