How does the “Get Top-up Status” endpoint work?

Raphael Ugwu

Raphael Ugwu

2 min read

Table of Contents

    Reloadly’s Airtime API enables you to fetch the real-time status of every airtime top-up you make. Response times from various operators may differ and due to this, we want to ensure that you have every information about the status of your top-ups.

    Top-ups can have one of the following four statuses:

    SUCCESSFUL: This applies when the top up is successfully made.

    PROCESSING: This applies while the top up is still being verified from the operator’s end.

    REFUNDED: This applies once the top up is not processed successfully from the airtime operator’s end. In this instance, any funds debited from a user’s wallet while attempting to make the top-up are automatically refunded. 

    FAILED: This applies when the top-up attempt fails due to an internal error from the operator’s end. In this instance, you should wait 30 minutes before reinitiating the top-up. Funds are not debited for a failed top-up attempt.

    We have added four code snippets that show what the JSON response of each of these statuses look like. This way, you can gain further insights on each of the statuses:

    SUCCESSFUL TOP-UP

    {
        "transactionId": 26523,
        "status": "SUCCESSFUL",
        "operatorTransactionId": null,
        "customIdentifier": "This is example identifier",
        "recipientPhone": "447951631337",
        "recipientEmail": null,
        "senderPhone": "11231231231",
        "countryCode": "GB",
        "operatorId": 535,
        "operatorName": "EE PIN England",
        "discount": 63.37,
        "discountCurrencyCode": "NGN",
        "requestedAmount": 3168.4,
        "requestedAmountCurrencyCode": "NGN",
        "deliveredAmount": 5,
        "deliveredAmountCurrencyCode": "GBP",
        "transactionDate": "2022-01-26 03:19:16",
        "pinDetail": {
            "serial": "558111",
            "info1": "DIAL *611",
            "info2": "DIAL *611",
            "info3": "Dial *233* and PIN #",
            "value": null,
            "code": "773709733097662",
            "ivr": "1-888-888-8888",
            "validity": "30 days"
        },
        "balanceInfo": {
            "oldBalance": 60387.41,
            "newBalance": 57282.38,
            "cost": 3105.03,
            "currencyCode": "NGN",
            "currencyName": "Nigerian Naira",
            "updatedAt": "2022-01-26 08:19:16"
        }
    }
    

    PROCESSING TOP-UP

    {
      "code":null,
      "message":null,
      "status":"PROCESSING",
      "transaction":null
    }
    

    REFUNDED TOP-UP

    {
      "code": "SERVICE_TO_OPERATOR_TEMPORARILY_UNAVAILABLE",
      "message": "The transaction failed due to an outage and / or connection issue with the operator",
      "status": "REFUNDED",
      "transaction": null
    }
    

    FAILED TOP-UP

    {
       "code":"PROVIDER_INTERNAL_ERROR",
       "message":"Please wait 30 minutes to purchase same product",
       "status":"FAILED",
       "transaction":null
    }
    

    Conclusion

    The Get Top-up Status service (https://topups.reloadly.com/topups/{transactionId}/status) enables you to have proper insight into the flow of each top-up you make. This guide aims to summarize and explain how it works. Should you have any questions, you can reach out to our engineers via our developer community.

    This might also interest you