---
title: "Create a new eSIM invoice."
method: POST
path: "/esims"
tags: ["Invoices"]
---

# Create a new eSIM invoice.

`POST /esims`

## Request body

- object
  - `products` object
    - `product_id` string, required
    - `quantity` integer, required
    - `value` number — Value to purchase, on ranged products.
    - `esim_id` string — esim id that you want to top up, leave empty if it is new eSIM purchase.
  - `payment_method` string — Supported methods: 'balance', 'bitcoin', 'lightning', 'ethereum', 'usdc_base', 'eth_base', 'usdt_erc20', 'usdc_erc20', 'usdt_trc20', 'usdc_polygon', 'usdt_polygon', 'usdc_arbitrum', 'usdt_arbitrum', 'eth_arbitrum', 'usdc_solana', 'usdt_solana', 'solana', 'usdt_lightning', 'dogecoin', 'dash', 'litecoin', 'ton', 'usdt_ton'.
  - `email` string — Email to send the receipt to.
  - `send_email` boolean — If we should send an email to the provided `email` with the receipt. (Default: false)
  - `auto_pay` boolean — If the invoice should be paid right away. Only valid when payment_method is 'balance' (Default: false)

## Response `200`

Success

- object
  - `meta` object
    - `products` object[]
    - `payment_method` string
    - `auto_pay` boolean
    - `_endpoint` string
  - `data` Invoice
    - `id` string
    - `created_time` string
    - `completed_time` string
    - `status` string
    - `user` object
      - `id` string
      - `email` string
    - `payment` object
      - `method` string
      - `address` string
      - `currency` string
      - `price` number
      - `status` string
      - `commission` number
    - `orders` object[]
      - `id` string
      - `status` string
      - `product` object
        - `id` string
        - `name` string
        - `value` string
        - `currency` string
        - `image` string
        - `_href` string
      - `created_time` string
      - `delivered_time` string

## Other responses

- `400` — Various user errors. Please check the message and error_code for what went wrong specifically.

---

[API](https://skmtc.dev/bitrefill/apis/bitrefill-api-documentation.md) · [All operations](https://skmtc.dev/bitrefill/apis/bitrefill-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/bitrefill/bitrefill-api-documentation/revisions/09e1bde6bae5/schema)
