Payment Status

How to track or obtain the IntaSend payment status

When sending a checkout request, on success, IntaSend will respond with several data fields including an invoice_id. We use the invoice_id to track the status of the transaction.

Payment Status Check

Parse invoice_id to the collection status method to retrieve the transaction status.

response = service.collect.status(invoice_id="<invoice-id>")
print(response)
$response = $collection->status(<invoice_id>)
print_r(response);
let collection = intasend.collection();
collection
   .status({
        invoiceID: '<INVOICE-ID>'
  })
  .then((resp) => {
    // Redirect user to URL to complete payment
     console.log(`Status Resp: ${resp}`);
    })
  .catch((err) => {
     console.error(`Status Resp error: ${err}`);
  });

Payment Status Sample Response

Please note the invoice_id under the invoice data set. We use the invoice_id to query for status when calling the status endpoint.

{
    "invoice": {
        "id": "XMSLWOS",
        "invoice_id": "XMSLWOS",
        "state": "PENDING",
        "provider": "M-PESA",
        "charges": "0.00",
        "net_amount": 10.36,
        "currency": "KES",
        "value": "10.36",
        "account": "[email protected]",
        "api_ref": "ISL_faa26ef9-eb08-4353-b125-ec6a8f022815",
        "host": "https://sandbox.intasend.com",
        "failed_reason": null,
        "created_at": "2021-04-11T08:37:15.781977+03:00",
        "updated_at": "2021-04-11T08:37:15.782011+03:00"
    },
    "meta": {
        "id": "5aec8e0b-8d96-429b-98b7-5361198160bd",
        "customer": {
            "id": "ZOEW022",
            "phone_number": "",
            "email": "[email protected]",
            "first_name": "FELIX",
            "last_name": "CHERUIYOT",
            "country": "KE",
            "address": "Westlands",
            "city": "Nairobi",
            "state": "Nairobi",
            "zipcode": "2020",
            "provider": "M-PESA",
            "created_at": "2020-08-06T16:24:06.247397+03:00",
            "updated_at": "2021-04-11T08:37:15.755013+03:00"
        },
        "customer_comment": "",
        "created_at": "2021-04-11T08:37:15.810438+03:00",
        "updated_at": "2021-04-11T08:37:15.810475+03:00"
    }
}