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

# Create eSIM Order

> Create an eSIM order and charge the merchant wallet



## OpenAPI

````yaml api-reference/vaas-services-openapi.json POST /vaas/api/v1/esim/orders
openapi: 3.1.0
info:
  title: PayVessel Value-Added Services API
  description: >-
    API reference for PayVessel biller reseller, eSIM, gift card, and flight
    services.
  version: 1.0.0
servers:
  - url: https://api.payvessel.com
  - url: https://sandbox.payvessel.com
security:
  - apiKey: []
    apiSecret: []
paths:
  /vaas/api/v1/esim/orders:
    post:
      tags:
        - eSIM
        - eSIM
      summary: Create eSIM Order
      description: Create an eSIM order and charge the merchant wallet
      operationId: create_order_vaas_api_v1_esim_orders_post
      parameters:
        - name: api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Key
        - name: api-secret
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Api-Secret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api__esim__schema__CreateOrderRequestSchema'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api__esim__schema__CreateOrderResponseSchema
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    api__esim__schema__CreateOrderRequestSchema:
      properties:
        reference:
          type: string
          maxLength: 64
          title: Reference
          description: Unique merchant order reference
        package_code:
          type: string
          maxLength: 64
          title: Package Code
      additionalProperties: false
      type: object
      required:
        - reference
        - package_code
      title: CreateOrderRequestSchema
    api__esim__schema__CreateOrderResponseSchema:
      properties:
        status:
          type: boolean
          title: Status
        message:
          type: string
          title: Message
        data:
          $ref: '#/components/schemas/api__esim__schema__OrderSchema'
      type: object
      required:
        - status
        - message
        - data
      title: CreateOrderResponseSchema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    api__esim__schema__OrderSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        reference:
          type: string
          title: Reference
        provider_order_no:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Order No
        package_code:
          type: string
          title: Package Code
        package_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Package Slug
        package_name:
          type: string
          title: Package Name
        location:
          type: string
          title: Location
        currency_code:
          type: string
          title: Currency Code
        quantity:
          type: integer
          title: Quantity
        amount_usd:
          type: number
          title: Amount Usd
        amount_naira:
          type: number
          title: Amount Naira
        status:
          $ref: '#/components/schemas/EsimOrderStatus'
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        profiles:
          items:
            $ref: '#/components/schemas/AllocatedEsimProfileSchema'
          type: array
          title: Profiles
        created_datetime:
          type: string
          format: date-time
          title: Created Datetime
        updated_datetime:
          type: string
          format: date-time
          title: Updated Datetime
        completed_datetime:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed Datetime
      type: object
      required:
        - id
        - reference
        - provider_order_no
        - package_code
        - package_slug
        - package_name
        - location
        - currency_code
        - quantity
        - amount_usd
        - amount_naira
        - status
        - error_message
        - created_datetime
        - updated_datetime
        - completed_datetime
      title: OrderSchema
    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
    EsimOrderStatus:
      type: string
      enum:
        - pending
        - processing
        - completed
        - failed
      title: EsimOrderStatus
    AllocatedEsimProfileSchema:
      properties:
        esim_tran_no:
          anyOf:
            - type: string
            - type: 'null'
          title: Esim Tran No
        order_no:
          anyOf:
            - type: string
            - type: 'null'
          title: Order No
        imsi:
          anyOf:
            - type: string
            - type: 'null'
          title: Imsi
        iccid:
          anyOf:
            - type: string
            - type: 'null'
          title: Iccid
        sms_status:
          anyOf:
            - type: integer
            - type: 'null'
          title: Sms Status
        msisdn:
          anyOf:
            - type: string
            - type: 'null'
          title: Msisdn
        ac:
          anyOf:
            - type: string
            - type: 'null'
          title: Ac
        qr_code_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Qr Code Url
        short_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Url
        smdp_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Smdp Status
        eid:
          anyOf:
            - type: string
            - type: 'null'
          title: Eid
        active_type:
          anyOf:
            - type: integer
            - type: 'null'
          title: Active Type
        data_type:
          anyOf:
            - type: integer
            - type: 'null'
          title: Data Type
        activate_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Activate Time
        installation_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Installation Time
        expired_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Expired Time
        total_volume:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Volume
        total_duration:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Duration
        duration_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Duration Unit
        order_usage:
          anyOf:
            - type: integer
            - type: 'null'
          title: Order Usage
        esim_status:
          anyOf:
            - type: string
            - type: 'null'
          title: Esim Status
        pin:
          anyOf:
            - type: string
            - type: 'null'
          title: Pin
        puk:
          anyOf:
            - type: string
            - type: 'null'
          title: Puk
        apn:
          anyOf:
            - type: string
            - type: 'null'
          title: Apn
        ip_export:
          anyOf:
            - type: string
            - type: 'null'
          title: Ip Export
        support_top_up_type:
          anyOf:
            - type: integer
            - type: 'null'
          title: Support Top Up Type
        fup_policy:
          anyOf:
            - type: string
            - type: 'null'
          title: Fup Policy
        packages:
          items:
            $ref: '#/components/schemas/AllocatedPackageSchema'
          type: array
          title: Packages
      type: object
      title: AllocatedEsimProfileSchema
    AllocatedPackageSchema:
      properties:
        package_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Package Name
        package_code:
          type: string
          title: Package Code
        slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Slug
        duration:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration
        volume:
          anyOf:
            - type: integer
            - type: 'null'
          title: Volume
        location_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Location Code
        create_time:
          anyOf:
            - type: string
            - type: 'null'
          title: Create Time
      type: object
      required:
        - package_code
      title: AllocatedPackageSchema
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: api-key
      description: Your PayVessel business API key.
    apiSecret:
      type: apiKey
      in: header
      name: api-secret
      description: Your PayVessel business API secret.

````