Get account balance
You can use the API to check your account balance.
Request
import requests
response = requests.get("https://api-us1.stannp.com/v1/accounts/balance?api_key={API_KEY}")
print(response.text)
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.
Request
import requests
data = {
"net": "100.00",\n
}
response = requests.post("https://api-us1.stannp.com/v1/accounts/topup?api_key={API_KEY}", data=data)
print(response.text)
Response
{ "success": true, "data": { "receipt_pdf": "https:\/\/www.stannp.com\/invoice\/12345--abcdefg-uhusdsfsi34545-fgfdfdb.pdf" } }