Answer a line-debt question
When a top-up is DEBT_PENDING the operator reported an unpaid line debt (SABBAQLI) and waits for a decision. Choose PAY_ALL, PAY_OPERATION_ONLY, PAY_DEBT_ONLY or CANCEL; debt_options on the top-up shows what each costs. The top-up then continues (PENDING → … → COMPLETED) or ends REFUNDED for CANCEL. Unanswered top-ups are cancelled at debt_expires_at.
AccessTokenX-Access-Token<token>Your API key. Sandbox keys start with flx_test_, production keys with flx_live_.
application/json- body
ref?stringThe ref of the DEBT_PENDING top-up. Send this or topupId.
^[A-Za-z0-9_.:-]{1,64}$topupId?stringThe topupId of the DEBT_PENDING top-up.
1 <= length <= 64choice*stringPAY_ALL: the top-up plus the debt. PAY_OPERATION_ONLY: the top-up only. PAY_DEBT_ONLY: pay the debt only (a top-up equal to the debt). CANCEL: cancel, nothing is charged.
"PAY_ALL""PAY_OPERATION_ONLY""PAY_DEBT_ONLY""CANCEL"The top-up after the decision
application/json- response
success*truetruedata*meta*requestId*stringcurl -X POST 'https://api.flexyliktelecom.com/v3/mobile/resolve-debt' \ -H 'Content-Type: application/json' \ -d '{ "choice": "PAY_ALL"}'{ "success": true, "data": { "_id": "F00012345", "ref": "order-10293", "status": "PENDING", "plan_code": "PREPAID_DJEZZY", "MSSIDN": "0700000009", "topup_amount": 500, "balance_amount": 500, "offer_name": "string", "debt_amount": 100, "debt_message": "string", "debt_options": [ { "choice": "PAY_ALL", "amount": 600, "available": true } ], "debt_expires_at": "string", "refund_message": "string", "suggested_offers": [ { "typename": "string", "plan_code": "string", "amount": 0 } ], "created_at": "2026-11-15T10:30:00.000Z" }, "meta": { "timestamp": "2026-11-15T10:30:00.000Z" }, "requestId": "req_8fK2mQx7Lp0aZ3nV1cWb"}List plans GET
Plans you can send. `dynamicPlans` take an `amount` between `min_amount` and `max_amount`. `offerPlans` (OFFER_*) need an `offer_id` from GET /v3/mobile/offers. Safe to cache for a few minutes.
Send a mobile top-up POST
Starts a top-up and returns at once with `topupId` and `topupRef`. The result comes later: poll check-id or check-ref until the status is final (COMPLETED, REFUNDED or UNKNOWN_ERROR). DEBT_PENDING means the line has an unpaid debt: answer with POST /v3/mobile/resolve-debt. Always send your own `ref`; if the call fails or times out, check that ref before sending again.