1. Top up eSIM
Roamic API v2
  • Topics
    • Authentication
      • Verify token
    • Browse packages
      • List countries and regions
      • List packages
      • Get a package
    • Manage orders
      • Get an order
      • List orders
      • Create new order
    • Manage eSIMs
      • List eSIMs
      • Get an eSIM / installation details
      • Cancel an eSIM
      • Revoke an eSIM
    • Monitor usage
      • Get data usage
    • Top up eSIM
      • List top-up packages for an eSIM
        GET
      • Place a top-up order
        POST
    • Billing details
      • Get billing details
    • Notifications
      • List webhook event types
      • Create a webhook subscription
      • Update a webhook subscription
      • Get a webhook subscription
      • List webhook subscriptions
      • Delete a webhook subscription
      • List deliveries
      • Get a delivery
      • List notifications sent for an eSIM
      • Retry a delivery
      • Send a test event
  • Raíz
  • Schemas
    • Paginated
    • EsimIdentifier
    • OrderType
    • EsimStatus
    • OrderStatus
    • Result
    • FinancialStatus
    • Error
    • FulfillmentStatus
    • ValidationErrorBody
    • Order
    • TopupStatus
    • StoreOrder
    • WebhookDeliveryStatus
    • Customer
    • WebhookEventType
    • Billing
    • User
    • OrderLineItem
    • Esim
    • BillingFull
    • Topup
    • Settings
    • BillingInput
    • Country
    • Package
    • Product
    • TopupPackage
    • CreateOrder
    • CreateTopupOrder
    • NotificationLog
    • WebhookSubscription
    • WebhookSubscriptionInput
    • WebhookDelivery
  1. Top up eSIM

Place a top-up order

POST
/api/v1/orders/topups
Adds data to eSIMs you already own. Each line identifies the eSIM by its code (never by ICCID) and the
top-up package by sku (or package_id), which must be one of the packages returned by
GET /esims/{code}/topups. It creates a real purchase, so Idempotency-Key is required.
The customer is taken from the original order of each eSIM, so you normally do not send customer.
Send it only to override it (or when the eSIMs in the request belong to different customers).
external_order_id and billing work like in POST /orders. The same 50-unit limit applies.

Solicitud

Autorización
Bearer Token
Proporciona tu token bearer en el encabezado
Authorization
al realizar solicitudes a recursos protegidos.
Ejemplo:
Authorization: Bearer ********************
or
Parámetros de Header

Parámetros del Body application/jsonRequerido

Ejemplos

Respuestas

🟢201
application/json
Top-up order created.
Bodyapplication/json

Solicitud Ejemplo de Solicitud
Shell
JavaScript
Java
Swift
curl --location '/api/v1/orders/topups' \
--header 'Idempotency-Key: 7b1f3b9e-5d0e-4d6e-9a0c-2d7a9a9d0001' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "external_order_id": "TOP-2026-0001",
    "line_items": [
        {
            "esim_code": "01JABCDEFGHJKMNPQRSTVWXYZ0",
            "sku": "TOPUP-ES-1GB-7D",
            "quantity": 1
        }
    ]
}'
Respuesta Ejemplo de Respuesta
{
    "data": {
        "code": "20261028-000045",
        "external_order_id": "TOP-2026-0001",
        "type": "topup",
        "status": "open",
        "financial_status": "paid",
        "fulfillment_status": "unfulfilled",
        "customer": {
            "email": "ana.perez@example.com",
            "first_name": "Ana",
            "last_name": "Pérez",
            "phone": "+34600111222",
            "external_id": "cust_8841",
            "locale": "es"
        },
        "currency": "EUR",
        "subtotal": "3.50",
        "discount_total": "0.00",
        "tax_total": "0.00",
        "total": "3.50",
        "billing": {
            "name": "Acme Travel S.L.",
            "email": "billing@acme-travel.example",
            "country_iso": "ESP",
            "address": "Calle Mayor 1",
            "city": "Madrid",
            "zip_code": "28013",
            "phone": "+34910000000",
            "id_document": "B12345678"
        },
        "note": null,
        "cancel_reason": null,
        "line_items": [
            {
                "id": 5530,
                "package_id": 9120,
                "product_id": 118,
                "sku": "TOPUP-ES-1GB-7D",
                "name": "Spain 1GB 7 Days Top-up",
                "product_name": "Spain",
                "esimaccess_package_code": "PKG-ES-1GB-7D-TOPUP",
                "is_unlimited": false,
                "quantity": 1,
                "unit_price": "3.50",
                "subtotal": "3.50",
                "currency": "EUR",
                "fulfillment_status": "unfulfilled",
                "esims": [],
                "topups": [
                    {
                        "code": "01JTOPUPABCDEFGHJKMNPQRST",
                        "status": "pending",
                        "iccid": "8934076500002589174",
                        "esim_code": "01JABCDEFGHJKMNPQRSTVWXYZ0",
                        "esimaccess_package_code": "PKG-ES-1GB-7D-TOPUP",
                        "provider_order_no": null,
                        "failure_reason": null,
                        "applied_at": null
                    }
                ]
            }
        ],
        "paid_at": "2026-10-28T09:00:00Z",
        "cancelled_at": null,
        "created_at": "2026-10-28T09:00:00Z",
        "updated_at": "2026-10-28T09:00:00Z"
    }
}
Modificado en 2026-10-28 09:24:46
Anterior
List top-up packages for an eSIM
Siguiente
Get billing details
Built with