Skip to main content
POST
Buy an eSIM

Statuses

A failed order refunds itself, in the currency you were debited — never a fresh conversion. You do not need to claim anything back.

Paying from any currency

The plan is priced in USD, but the account may hold anything. A non-USD account needs an fxQuoteId from a quote; a USD account needs nothing. paid on the response is what actually left the account.

Idempotency

externalReference is the key, and reusing it returns the existing order whatever its status. A retry after a network failure is therefore safe: it returns the original order rather than buying a second eSIM.

Error codes

Authorizations

Authorization
string
header
required

A secret API key, sent as Authorization: Bearer sk_test_… in sandbox or Bearer sk_live_… in live.

Body

application/json

Provide exactly one of packageSlug or packageId.

debitAccountId
string
required

A 26-character ULID.

Required string length: 26
Pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
Example:

"01K2Z3AB4C5D6E7F8G9HJKMNPQ"

externalReference
string
required

Your idempotency key.

Required string length: 1 - 120
packageSlug
string
Maximum string length: 200
packageId
string

A 26-character ULID.

Required string length: 26
Pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
Example:

"01K2Z3AB4C5D6E7F8G9HJKMNPQ"

quantity
integer
default:1
Required range: 1 <= x <= 10
fxQuoteId
string

Required when the account is not USD. From the quote.

Required string length: 26
Pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
Example:

"01K2Z3AB4C5D6E7F8G9HJKMNPQ"

customerId
string

Assigns the eSIM to one of your customers.

Required string length: 26
Pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
Example:

"01K2Z3AB4C5D6E7F8G9HJKMNPQ"

Response

Successful response.

id
string
required

A 26-character ULID.

Required string length: 26
Pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
Example:

"01K2Z3AB4C5D6E7F8G9HJKMNPQ"

kind
enum<string>
required
Available options:
purchase,
topup
status
enum<string>
required

completed is the success state. A failure refunds itself.

Available options:
provisioning,
completed,
failed,
refunded,
partially_refunded
package
object
required
quantity
integer
required
Required range: x >= 1
customerId
string | null
required

A 26-character ULID.

Required string length: 26
Pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
Example:

"01K2Z3AB4C5D6E7F8G9HJKMNPQ"

price
object
required

The USD list price.

paid
object
required

What was debited, in the paying account’s own currency.

fee
object
required
refunded
object
required
rate
string | null
required
externalReference
string
required
failureReason
string | null
required
profileIds
string[]
required

The eSIMs this order allocated.

A 26-character ULID.

Required string length: 26
Pattern: ^[0-7][0-9A-HJKMNP-TV-Z]{25}$
completedAt
string<date-time> | null
required
Example:

"2026-08-14T09:00:00.000Z"

createdAt
string<date-time>
required
Example:

"2026-08-14T09:00:00.000Z"

updatedAt
string<date-time>
required
Example:

"2026-08-14T09:00:00.000Z"