planId is the id of a plan from GET /api/wholesale/esims/{iccid}/top-up. For an eSIM whose profileStatus is END_OF_LIFE or DELETED that list answers with an error; take the plan from GET /api/wholesale/plans instead.id, and its startTime and endTime stay null until it starts.END_OF_LIFE or DELETED, the plan is not added to it: a new eSIM with the plan is issued, and the answer is that new eSIM. You pay the price of the plan, the same as for a top-up. Always compare iccid in the answer with the ICCID you sent:iccid: the plan was added to the customer's eSIM;iccid: a new eSIM was issued. Store the new ICCID and give the customer its installation link (iosSetup or androidSetup), because the plan is not on the old eSIM.GET /api/wholesale/esims/{iccid} before you try again, so the top-up is not bought twice.Authorization: Apikey YOUR_API_KEY.curl --location 'https://api.veloesim.com:2053/api/wholesale/esims/8937204016163448888/top-up' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"planId": 5
}'{
"iosSetup": "https://esimsetup.apple.com/esim_qrcode_provisioning?carddata=LPA:1$address.test$K2-22XXXX-LCIUXQ",
"androidSetup": "https://esimsetup.android.com/esim_qrcode_provisioning?carddata=LPA:1$address.test$K2-22XXXX-LCIUXQ",
"iccid": "8937204016163448888",
"matchingId": "K2-22XXXX-LCIUXQ",
"smdpAddress": "address.test",
"profileStatus": "RELEASED",
"installedAt": null,
"assignedPlans": [
{
"id": 89,
"planId": 5,
"initialQuantityInBytes": 1000000000,
"remainingQuantityInBytes": 402593548,
"startTime": "2024-05-18T19:24:18.000Z",
"endTime": "2024-05-25T20:00:00.000Z",
"isExpired": false,
"areas": [
{
"id": 49,
"name": "Greece",
"region": "Europe",
"iso": "GR"
}
]
},
{
"id": 95,
"planId": 5,
"initialQuantityInBytes": 1000000000,
"remainingQuantityInBytes": 1000000000,
"startTime": null,
"endTime": null,
"isExpired": false,
"areas": [
{
"id": 49,
"name": "Greece",
"region": "Europe",
"iso": "GR"
}
]
}
]
}