Skip to Content
Mobile top up

Answer a line-debt question

POST
/v3/mobile/resolve-debt

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.

Authorization

AccessToken
headerX-Access-Token<token>

Your API key. Sandbox keys start with flx_test_, production keys with flx_live_.

Request Body

application/json
  1. body
ref?string

The ref of the DEBT_PENDING top-up. Send this or topupId.

Match^[A-Za-z0-9_.:-]{1,64}$
topupId?string

The topupId of the DEBT_PENDING top-up.

Length1 <= length <= 64
choice*string

PAY_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.

Value in"PAY_ALL""PAY_OPERATION_ONLY""PAY_DEBT_ONLY""CANCEL"

Response Body

The top-up after the decision

application/json
  1. response
success*true
Value intrue
data*
meta*
requestId*string
Example Request
curl -X POST 'https://api.flexyliktelecom.com/v3/mobile/resolve-debt' \  -H 'Content-Type: application/json' \  -d '{  "choice": "PAY_ALL"}'
Example Response
{  "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"}