> ## 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 Top-Up

> Add a compatible package to an existing eSIM



## OpenAPI

````yaml api-reference/vaas-services-openapi.json POST /vaas/api/v1/esim/topups
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/topups:
    post:
      tags:
        - eSIM
        - eSIM
      summary: Top Up an eSIM
      description: Purchase a compatible top-up package for an eSIM issued to the merchant
      operationId: create_topup_vaas_api_v1_esim_topups_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__CreateTopupRequestSchema'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/api__esim__schema__CreateTopupResponseSchema
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    api__esim__schema__CreateTopupRequestSchema:
      properties:
        reference:
          type: string
          maxLength: 64
          title: Reference
          description: Unique merchant top-up reference
        package_code:
          type: string
          maxLength: 64
          title: Package Code
        iccid:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Iccid
        esim_tran_no:
          anyOf:
            - type: string
              maxLength: 64
            - type: 'null'
          title: Esim Tran No
        period_num:
          anyOf:
            - type: integer
              minimum: 1
            - type: 'null'
          title: Period Num
      additionalProperties: false
      type: object
      required:
        - reference
        - package_code
      title: CreateTopupRequestSchema
    api__esim__schema__CreateTopupResponseSchema:
      properties:
        status:
          type: boolean
          title: Status
        message:
          type: string
          title: Message
        data:
          $ref: '#/components/schemas/api__esim__schema__TopupSchema'
      type: object
      required:
        - status
        - message
        - data
      title: CreateTopupResponseSchema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    api__esim__schema__TopupSchema:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        reference:
          type: string
          title: Reference
        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
        target_iccid:
          type: string
          title: Target Iccid
        target_esim_tran_no:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Esim Tran No
        provider_topup_esim_tran_no:
          anyOf:
            - type: string
            - type: 'null'
          title: Provider Topup Esim Tran No
        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
        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
        - package_code
        - package_slug
        - package_name
        - location
        - target_iccid
        - target_esim_tran_no
        - provider_topup_esim_tran_no
        - amount_usd
        - amount_naira
        - status
        - error_message
        - created_datetime
        - updated_datetime
        - completed_datetime
      title: TopupSchema
    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
  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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.