X

Get account balance

You can use the API to check your account balance.


[GET] https://api-eu1.stannp.com/v1/accounts/balance

Request

                using RestSharp;

var client = new RestClient("https://api-eu1.stannp.com/v1/accounts/balance?api_key={API_KEY}");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
            

Response

{
    "success": true,
    "data": {
        "balance": "214.42"
    }
}

Top up balance

You can use the API to top up your balance if you have a saved card and set one to default.


[POST] https://api-eu1.stannp.com/v1/accounts/topup

Parameters

net mandatory The amount to top up. Eg: "10.00". Be aware tax may be added on after.

Request

                using RestSharp;

var client = new RestClient("https://api-eu1.stannp.com/v1/accounts/topup?api_key={API_KEY}");
var request = new RestRequest(Method.POST);

request.AddParameter("net", "10.00");


IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
            

Response

{
    "success": true,
    "data": {
        "receipt_pdf": "https:\/\/www.stannp.com\/invoice\/12345-uhusdsfsi34545-fgfdfdb.pdf"
    }
}