Purchase eSIM
Purchase
Purchase eSIM
Purchase an eSIM package with wallet or card payment
POST
Purchase eSIM
Endpoint
Description
Purchase an eSIM package using your wallet balance or card payment. This endpoint creates an order and returns payment information if needed.Authentication
API Key for authentication
Request Body
Package code to purchase (e.g., “US_5GB_30D”)Get available package codes from
/api/esim/packagesPayment method to use:
WALLET- Pay with wallet balanceCARD- Pay with credit/debit card (Paystack)BANK_TRANSFER- Pay via bank transferMOBILE_MONEY- Pay with mobile moneyAPPLE_PAY- Pay with Apple Pay
Type of purchase:
BASE- New eSIM purchaseTOPUP- Top-up existing eSIM
Existing eSIM ID to top up (required when packageType is
TOPUP)Response
Unique transaction ID for this purchase
Order status:
SUCCESS, PENDING, PROCESSINGPackage details including price and data allowance
Payment URL for card/online payments (if payment method requires it)
Bank account details for bank transfer payments
eSIM details (only when payment method is WALLET and eSIM is created immediately)
Example Request
Example Response
Payment Methods
| Method | Processing Time | Notes |
|---|---|---|
| WALLET | Instant | eSIM created immediately |
| CARD | 1-5 minutes | Redirects to payment gateway |
| BANK_TRANSFER | 10-30 minutes | Manual verification required |
| MOBILE_MONEY | 2-10 minutes | Country-specific |
| APPLE_PAY | Instant | iOS devices only |
Payment Flow
Handle Response
- SUCCESS: eSIM created (wallet payment)
- PENDING: Payment required (card/bank transfer)
Complete Payment
For pending payments:
- Card: Redirect to
paymentUrl - Bank Transfer: Show bank account details
Error Handling
Insufficient Balance
Insufficient Balance
Code:
INSUFFICIENT_BALANCESolution: Check wallet balance before purchase or prompt user to fund walletPackage Not Available
Package Not Available
Code:
PACKAGE_NOT_FOUND or PACKAGE_UNAVAILABLESolution: Refresh package list or show alternative packagesPayment Failed
Payment Failed
Code:
PAYMENT_FAILEDSolution: Retry payment or try different payment methodTop-Up Validation
Top-Up Validation
Code:
INVALID_TOPUPSolution: Verify eSIM ID and package compatibilityWebhooks
Set up a webhook to receive real-time notifications about purchase status:Next Steps
Confirm Payment
Confirm pending payments
Get My eSIMs
View purchased eSIMs
Webhooks
Set up payment notifications
Error Handling
Handle purchase errors
