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

# FE-return payment confirmation poll (BYO rent, pay-first)

> Checks for proof of payment for this eSIM's current rent and confirms it if found. If no proof is available yet, returns 200 with the eSIM unchanged rather than an error. Always returns the current eSIM state.



## OpenAPI

````yaml /api-reference/mobilerun-numbers.yaml post /numbers/esims/{id}/confirm-payment
openapi: 3.1.0
info:
  title: Mobilerun Numbers
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /numbers/esims/{id}/confirm-payment:
    post:
      tags:
        - Esims
      summary: FE-return payment confirmation poll (BYO rent, pay-first)
      description: >-
        Checks for proof of payment for this eSIM's current rent and confirms it
        if found. If no proof is available yet, returns 200 with the eSIM
        unchanged rather than an error. Always returns the current eSIM state.
      operationId: confirmEsimPayment
      parameters:
        - in: path
          name: id
          required: true
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/PublicEsim'
                required:
                  - data
                type: object
          description: >-
            Current eSIM state (payment confirmed if proof was found, unchanged
            otherwise)
        '401':
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Not Found
        '500':
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsimErrorResponse'
          description: >-
            Service Unavailable — esims are disabled for this deployment (see
            `reason`)
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const response = await
            client.esims.confirmPayment('550e8400-e29b-41d4-a716-446655440000');


            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            response = client.esims.confirm_payment(
                "550e8400-e29b-41d4-a716-446655440000",
            )
            print(response.data)
components:
  schemas:
    PublicEsim:
      properties:
        cancellationScheduled:
          type: boolean
        carrierName:
          type:
            - string
            - 'null'
        checkoutUrl:
          type:
            - string
            - 'null'
        countryCode:
          type:
            - string
            - 'null'
        createdAt:
          format: date-time
          type:
            - string
            - 'null'
        createdBy:
          type:
            - string
            - 'null'
        currentPeriodEnd:
          format: date-time
          type:
            - string
            - 'null'
        deviceId:
          format: uuid
          type:
            - string
            - 'null'
        deviceUuid:
          type:
            - string
            - 'null'
        exempt:
          type: boolean
        iccid:
          type:
            - string
            - 'null'
        id:
          format: uuid
          type: string
        msisdn:
          type:
            - string
            - 'null'
        name:
          type:
            - string
            - 'null'
        networkStatus:
          enum:
            - degraded
            - null
          type:
            - string
            - 'null'
        rentStatus:
          enum:
            - not_applicable
            - exempt
            - inactive
            - awaiting_payment
            - active
            - cancel_pending
            - refund_pending
            - retiring
            - billing_error
          type: string
        source:
          enum:
            - stocked
            - byo
          type: string
        status:
          enum:
            - in_stock
            - owned
            - installing
            - installed
            - install_failed
            - retired
          type: string
        subscriptionId:
          type:
            - integer
            - 'null'
        updatedAt:
          format: date-time
          type:
            - string
            - 'null'
      required:
        - id
        - status
        - source
        - carrierName
        - countryCode
        - iccid
        - subscriptionId
        - deviceId
        - deviceUuid
        - msisdn
        - name
        - createdBy
        - networkStatus
        - createdAt
        - updatedAt
      type: object
    EsimErrorResponse:
      properties:
        message:
          type: string
        reason:
          enum:
            - out_of_stock
            - owner_esim_cap
            - byo_disabled
            - byo_esim_cap
            - byo_daily_import_limit
            - byo_failed_limit
            - esim_not_owned
            - device_pool_empty
            - device_claim_cap
            - operator_resolution_required
            - idempotency_conflict
            - byo_awaiting_payment_cap
            - operator_review_required
            - byo_not_reassignable
            - product_disabled
          type: string
        success:
          enum:
            - false
          type: boolean
      required:
        - success
        - reason
        - message
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````