Appearance
International Top-up
This flow applies only when service.id is intl (International Top-up API).
Mobile recharge for 50+ countries outside UAE.
How It Works
International top-up has a unique flow:
- Get available countries/operators using
/providers - Check returns available denominations for the operator
- Confirm requires selecting a specific denomination
Transaction Flow
Steps
1. Get Providers
Fetch available countries and operators.
2. Check Transaction
Get available denominations for the phone number.
3. Confirm Transaction
Execute the recharge with selected denomination.
4. Find Transaction
Get the final transaction status.
Example Flow
javascript
// 1. Get countries
const countries = await api.post('/providers', { auth });
// Returns: { countries: [{ id: "74", name: "Pakistan", phone_code: "+92" }, ...] }
// 2. Get operators for Pakistan
const operators = await api.post('/providers', {
auth,
country_id: 74
});
// Returns: { providers: [{ id: "46", name: "Ufone Pakistan" }, ...] }
// 3. Get denominations for Ufone
const amounts = await api.post('/providers', {
auth,
provider_id: 46
});
// Returns: { amounts: [{ amount: 100, currency: "PKR", price: 5.00 }, ...] }
// 4. Check transaction (use product: "intl")
const check = await api.post('/transaction/check', {
auth,
product: 'intl',
external_transaction_id: 'intl-12345',
fields: {
account: '+923001234567'
}
});
// Returns denominations in details.amounts[]
// 5. Confirm with selected amount
const confirm = await api.post('/transaction/confirm', {
auth,
external_transaction_id: 'intl-12345',
fields: {
amount: 100, // PKR amount from check response
type_id: 1 // 1 = Mobile (default)
}
});
// 6. Poll for result
const result = await waitForFinalState('intl-12345');Denomination Types
When checking/confirming, you can filter by type:
| type_id | Type |
|---|---|
| 1 | Mobile (default) |
| 2 | Data / Bundle / Package |
Key Differences
| Aspect | International | Direct Recharge |
|---|---|---|
| Product ID | Always intl | Specific ID (e.g., et-mc) |
| Check response | Includes details.amounts[] | Simple price range |
| Confirm request | Requires amount + optional type_id | Requires amount |
| Providers endpoint | Required to discover options | Not needed |