Sales Status API

Environment: Live

Check Airtime, Data or Insurance sales within one wallet using the original external reference, transaction ID, or returned reference. Includes txstatus 0–3, refunds, insurance policy fields, and ASS00–ASS09 application codes.

# Sales Status API

Check the status of an Airtime, Data or Insurance sale directly from the sales records. Only sales belonging to the wallet in accountnumber are searched. Look up the original external reference, transaction ID, or reference returned in the sale reply.

## Endpoint
- **Method**: POST
- **URL**: https://api.moolre.com/open/sales/status

## Headers
| Header | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| Content-Type | string | Yes | Send application/json. |
| X-API-USER | string | Yes | Your Moolre username. |
| X-API-KEY | string | Yes | Your Private API Key for the paying wallet. |

## Request Body
| Parameter | Type | Required | Description |
| :--- | :--- | :--- | :--- |
| type | integer | Yes | Sales status function. Must be 1. |
| accountnumber | string | Yes | Moolre wallet account number used for the sale, linked to your Sell on Our Platform Service. Only this wallet's sales are searched. |
| idtype | integer | Yes | Which identifier you send in id. Values: `1` externalref: the externalref or extid you sent with the sale; `2` transactionid: from the sale reply; `3` reference: from the sale reply. |
| id | string | Yes | Existing sale identifier corresponding to idtype. Do not generate a new external reference for a status lookup. |

## Response (200 Sent (ASS01))
Supplied Data sale status example: sent, with txstatus 1. Other outcomes are described below; exact response bodies for them were not supplied.

```json
{
  "status": "1",
  "code": "ASS01",
  "message": "Sale Successful",
  "data": {
    "txstatus": 1,
    "product": "data",
    "network": "mtn",
    "bundle": "RACT_Data_GHC_3_Others",
    "receiver": "233240000000",
    "amount": "3.00",
    "discount": "0.18",
    "charged": "2.82",
    "accountnumber": "10XXXXXXXXXXXX",
    "transactionid": "123456789",
    "refundid": null,
    "reference": "SALE-REFERENCE",
    "externalref": "your-extid",
    "thirdpartyref": "PROVIDER-REF",
    "ts": "2026-10-16 09:00:00",
    "updated": "2026-10-16 09:00:03"
  },
  "go": null,
  "meta": {
    "requestid": "req_c68f4c66115c26725c796242",
    "notices": []
  }
}
```

## Response (200 Insurance policy issued (ASS01))
An issued insurance sale (product insurance). The values are illustrative. A pending sale has txstatus 0 and policy null; see the insurance fields below.

```json
{
  "status": "1",
  "code": "ASS01",
  "message": "Policy Issued",
  "data": {
    "txstatus": 1,
    "stage": "issued",
    "product": "insurance",
    "network": "enterprise",
    "cover_code": "T",
    "receiver": "0240000000",
    "amount": "1250.00",
    "premium": "1250.00",
    "charged": "1250.00",
    "commission": "125.00",
    "commission_status": "paid",
    "accountnumber": "10XXXXXXXXXXXX",
    "transactionid": "123456789",
    "refundid": null,
    "reference": "SALE-REFERENCE",
    "externalref": "your-extid",
    "thirdpartyref": "POLICY-NUMBER",
    "provider_message": "Policy created",
    "policy": {
      "pol_no": "POLICY-NUMBER",
      "certificate_url": "https://example.com/certificate",
      "sticker_no": "STICKER-NUMBER",
      "sticker_url": "https://example.com/sticker",
      "brown_card_url": "https://example.com/brown-card"
    },
    "ts": "2026-12-01 09:00:00",
    "updated": "2026-12-01 09:00:12",
    "created_at": "2026-12-01T09:00:00Z",
    "updated_at": "2026-12-01T09:00:12Z"
  },
  "go": null,
  "meta": {
    "requestid": "req_c68f4c66115c26725c796242",
    "notices": []
  }
}
```

## Before you begin

Before using the Airtime or Data Sales APIs, you must create a Sell on Our Platform Service in the Moolre App.

**Use a linked wallet:** The accountnumber you send in every Sales request must be a Moolre wallet linked to your Sell on Our Platform Service. Requests using a wallet that is not linked to a sales service will not work.

[Open the Moolre App](https://app.moolre.com/).

## Special payment pricing

Special payment pricing is available for businesses that want to sell airtime and data. Contact Moolre Support to request this pricing.

[Contact Moolre Support](mailto:hello@moolre.com?subject=Airtime%20and%20Data%20Sales%20pricing).

## Look up an existing sale

This endpoint reads Airtime and Data sales records directly. Only sales belonging to the wallet in accountnumber are searched. Use data.txstatus and the application code to distinguish pending, sent, failed-and-refunded, and not-found outcomes. A pending or uncertain purchase must not be treated as delivered or blindly resubmitted with a new reference.

| idtype | Identifier | Guidance |
| --- | --- | --- |
| 1 | External reference | Use the original externalref (or extid) sent with the Airtime or Data sale. Do not generate a new reference for this lookup. |
| 2 | Transaction ID | Use the transactionid returned in the sale reply. |
| 3 | Sale reference | Use the reference returned in the sale reply, not an assumed value from the optional request narration. |

## Transaction status

| txstatus | Outcome | Meaning |
| --- | --- | --- |
| 0 | Pending | The sale is not yet final. Check its status again before deciding what to do next. |
| 1 | Sent | The airtime or data sale was sent. |
| 2 | Failed and refunded | refundid identifies the refund transaction. |
| 3 | Not found | No sale was found for this lookup in the selected wallet. Check the wallet, identifier type, and identifier. |

## Status application codes

These are application codes, not HTTP status codes. Exact response bodies for pending, failed/refunded, not-found, and error replies have not been supplied; do not infer their shapes from the sent example.

| Code | Meaning | Next step |
| --- | --- | --- |
| ASS01 | Sent. | The sale was sent; read data.txstatus and the recorded sale details. |
| ASS02 | Failed and refunded. | Read refundid for the refund transaction. |
| ASS03 | Pending. | Check the status again before treating the sale as complete or retrying a purchase. |
| ASS04 | Not found. | Check accountnumber, idtype, and id; only sales belonging to that wallet are searched. |
| ASS05 | Identifier type invalid. | Use idtype 1, 2, or 3 with the corresponding identifier. |
| ASS06 | Parameters incomplete. | Supply type, accountnumber, idtype, and id. |
| ASS07 | Type invalid. | Send type 1. |
| ASS08 | Unknown error. | The lookup did not establish a final outcome. Do not assume the purchase failed or automatically resubmit it. |
| ASS00 | Authentication error. | Check X-API-USER and X-API-KEY for the selected wallet and environment. |

## Recorded Data sale fields

| Field | Type | Meaning |
| --- | --- | --- |
| txstatus | integer | Where the sale is. |
| product | string | Recorded product; data in the supplied example. |
| network | string | Recorded network; mtn in the supplied example. |
| bundle | string | Recorded data bundle ID in the supplied Data sale example. |
| receiver | string | Phone number receiving the airtime or data. |
| amount | string | Sale amount as a decimal string. |
| discount | string | Recorded discount as a decimal string. |
| charged | string | Recorded wallet charge as a decimal string. |
| accountnumber | string | Wallet account number; masked in the supplied example. |
| transactionid | string | Sale transaction ID, used as id with idtype 2. |
| refundid | string or null | Refund transaction ID when failed and refunded; null in the supplied sent example. |
| reference | string | Reference returned in the sale reply, used as id with idtype 3. |
| externalref | string | Original externalref/extid supplied with the sale, used as id with idtype 1. |
| thirdpartyref | string | Reference recorded from the provider. |
| ts | string | Recorded sale timestamp. |
| updated | string | Last recorded update timestamp. |

## Insurance sales

An insurance sale is looked up the same way as airtime and data, with the original externalref (idtype 1), the transactionid or the reference. For an insurance sale the reply carries the insurance fields below as well as the common ones (product is insurance). txstatus 1 means the policy is issued; 2 means it was not issued and the charge was refunded; 0 means it is not final yet.

| Field | Type | Meaning |
| --- | --- | --- |
| stage | string | Where an insurance sale is. Values: `awaiting_insurer` Waiting for the insurer to confirm it (txstatus 0); `needs_review` Moolre is checking it (txstatus 0); `refund_pending` Not issued, and the refund is being processed (txstatus 0); `issued` The policy is issued (txstatus 1); `refunded` Refunded (txstatus 2). |
| cover_code | string | Cover code of the policy: T, TPA, F, C or CX. See Covers. |
| premium | string | Premium as a decimal string. Equal to amount and, once charged, to charged. |
| commission | string | Commission earned as a decimal string: 10% of the premium once the policy is issued, otherwise 0.00. |
| commission_status | string or null | paid or pending for an issued policy; null otherwise. Pending commission is paid later. |
| provider_message | string | The insurer message for the sale, when there is one. |
| policy | object or null | Once issued: pol_no (policy number), certificate_url, sticker_no, sticker_url and brown_card_url. A link is null when the insurer has not supplied it. null until the policy is issued. |
| created_at / updated_at | string | The same timestamps as ts and updated, in ISO 8601 (UTC). |

| Code | Meaning | Next step |
| --- | --- | --- |
| ASS01 | Policy Issued. | txstatus 1. Read policy and commission. |
| ASS02 | Policy not issued, the charge was refunded. | txstatus 2. Read refundid. A new purchase is safe. |
| ASS03 | Policy Pending. | txstatus 0 with stage awaiting_insurer or needs_review. Check again; do not buy again. |
| ASS09 | Policy not issued, the refund is pending. | txstatus 0 with stage refund_pending. Check again until txstatus is 2. |

[Sell airtime](https://docs.moolre.com/api/sales/airtime), [sell data](https://docs.moolre.com/api/sales/data) or [sell insurance](https://docs.moolre.com/api/sales/insurance); use their original sale identifiers for this lookup.

## Fields every response can carry

These fields are additive: existing fields keep their names, order and types.

| Field | Meaning |
| :--- | :--- |
| meta | Always present, last in the object. meta.replayed is true only when the response is the stored answer to a repeated Idempotency-Key (absent otherwise). meta.requestid is the unique id of the request (also the X-Request-Id response header): quote it when you contact support. meta.notices is always an array, empty when there is nothing to report; each notice is { code, message, docs? }, for example that a deprecated way of sending credentials was used. See [Deprecations](https://docs.moolre.com/guides/deprecations). |

There is no outcome field. Decide the result from status, code and, on payment and transfer endpoints, data.txstatus (0 pending, 1 succeeded, 2 failed). These codes mean the result is unknown and may still succeed, so treat them as pending and check the status: PY01, PY02, TR01, TR02, TP11, TP18, APY10, APY16, ASL06, IS30, SYS500. Status 1 with TR08, OBGH01, OTGH01, OBNG01, GHQ03 or OM03 is final success; any other status 1 is an accepted, unfinished request.

Send X-Moolre-Http-Status: strict to receive real HTTP status codes (400, 401, 403, 404, 409, 422, 429, 5xx) instead of HTTP 200. See [Responses and request IDs](https://docs.moolre.com/guides/responses).

Back to the Moolre AI documentation index