{"id":2754,"date":"2022-07-11T16:46:05","date_gmt":"2022-07-11T16:46:05","guid":{"rendered":"https:\/\/www.reloadly.com\/blog\/?p=2754"},"modified":"2022-10-04T12:15:00","modified_gmt":"2022-10-04T12:15:00","slug":"how-to-check-your-wallet-balance-with-reloadlys-api","status":"publish","type":"post","link":"https:\/\/blog.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/","title":{"rendered":"How to check your wallet balance with Reloadly&#8217;s Airtime API"},"content":{"rendered":"\n<p>When working with Reloadly\u2019s Airtime API, your application makes top-ups, from your wallet balance. This creates the need to keep an eye on your balance in real time.<\/p>\n\n\n\n<p>That\u2019s what this guide is about &#8211; how to embed an API request in any of your airtime applications that shows you the data of your wallet\u2019s balance in real time. This can be useful in making key decisions such as how periodically you will recharge your wallet.<\/p>\n\n\n\n<p>The objective of this guide can be achieved with the following steps:<\/p>\n\n\n\n<ul><li>Getting your access token from the Airtime authentication service<\/li><li>Make the request for the wallet balance<\/li><\/ul>\n\n\n\n<p>You can get your access token by following the steps in this <a href=\"https:\/\/docs.reloadly.com\/airtime\/Authentication\/Create-Access-Token\" target=\"_blank\" rel=\"noreferrer noopener\">quickstart<\/a>. The cURL code sample below specifies how you can then use your access token to make a request to check your wallet balance.<\/p>\n\n\n\n<div style=\"height:32px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -i -X GET \\\n  https:\/\/topups.reloadly.com\/accounts\/balance \\\n  -H 'Authorization: Bearer &lt;YOUR_TOKEN_HERE&gt;'\n<\/code><\/pre>\n\n\n\n<div style=\"height:31px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>If your request is successful, you should receive a response similar to the following<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"balance\": 5000,\n  \"currencyCode\": \"USD\",\n  \"currencyName\": \"US Dollar\",\n  \"updatedAt\": \"2021-12-04 08:45:51\"\n}\n<\/code><\/pre>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>This response can be made functional in a number of ways. For instance, you can create an alert to occur when a particular threshold is crossed in the value of the balance property.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Resources<\/h3>\n\n\n\n<p><a href=\"https:\/\/docs.reloadly.com\/airtime\" target=\"_blank\" rel=\"noreferrer noopener\">Reloadly Airtime<\/a><a rel=\"noreferrer noopener\" href=\"https:\/\/docs.reloadly.com\/airtime\/\" target=\"_blank\"> <\/a><a href=\"https:\/\/docs.reloadly.com\/airtime\" target=\"_blank\" rel=\"noreferrer noopener\">API<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/developers.reloadly.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Reloadly Developer Documentation<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to check your wallet balance in real time by making API calls within your application. This guide was written with code samples in test mode. Code samples in responses may be abbreviated.<\/p>\n","protected":false},"author":17,"featured_media":2671,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[274],"tags":[11,314,275,390],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to check your wallet balance with Reloadly&#039;s Airtime API - Reloadly<\/title>\n<meta name=\"description\" content=\"Reloadly Resources. Insights, Info and Analysis For The Mobile Airtime API Community\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to check your wallet balance with Reloadly&#039;s Airtime API - Reloadly\" \/>\n<meta property=\"og:description\" content=\"Reloadly Resources. Insights, Info and Analysis For The Mobile Airtime API Community\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Reloadly\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-11T16:46:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-04T12:15:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.reloadly.com\/blog\/wp-content\/uploads\/2022\/04\/blog-image53-01.png\" \/>\n\t<meta property=\"og:image:width\" content=\"641\" \/>\n\t<meta property=\"og:image:height\" content=\"334\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"1 minute\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#organization\",\"name\":\"Reloadly\",\"url\":\"https:\/\/blog.reloadly.com\/blog\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/blog.reloadly.com\/blog\/wp-content\/uploads\/2020\/11\/logo-1.svg\",\"width\":100,\"height\":100,\"caption\":\"Reloadly\"},\"image\":{\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#website\",\"url\":\"https:\/\/blog.reloadly.com\/blog\/\",\"name\":\"Reloadly\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/blog.reloadly.com\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/blog.reloadly.com\/blog\/wp-content\/uploads\/2022\/04\/blog-image53-01.png\",\"width\":641,\"height\":334},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#webpage\",\"url\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/\",\"name\":\"How to check your wallet balance with Reloadly's Airtime API - Reloadly\",\"isPartOf\":{\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#primaryimage\"},\"datePublished\":\"2022-07-11T16:46:05+00:00\",\"dateModified\":\"2022-10-04T12:15:00+00:00\",\"description\":\"Reloadly Resources. Insights, Info and Analysis For The Mobile Airtime API Community\",\"breadcrumb\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.reloadly.com\/blog\/\",\"url\":\"https:\/\/blog.reloadly.com\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/\",\"url\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/\",\"name\":\"How to check your wallet balance with Reloadly&#8217;s Airtime API\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#webpage\"},\"author\":{\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#\/schema\/person\/2400042054e3b3009489e487224a6984\"},\"headline\":\"How to check your wallet balance with Reloadly&#8217;s Airtime API\",\"datePublished\":\"2022-07-11T16:46:05+00:00\",\"dateModified\":\"2022-10-04T12:15:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#primaryimage\"},\"keywords\":\"airtime,developers,reloadly,wallet\",\"articleSection\":\"Developer Blog\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-api\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#\/schema\/person\/2400042054e3b3009489e487224a6984\",\"name\":\"Raphael Ugwu\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/blog.reloadly.com\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/656844c0101d37e5695eee915ed3a49d?s=96&d=mm&r=g\",\"caption\":\"Raphael Ugwu\"},\"url\":\"https:\/\/blog.reloadly.com\/blog\/author\/fullstackmafia\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","authors":[{"term_id":359,"user_id":17,"is_guest":0,"slug":"fullstackmafia","display_name":"Raphael Ugwu"}],"_links":{"self":[{"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/posts\/2754"}],"collection":[{"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/comments?post=2754"}],"version-history":[{"count":7,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/posts\/2754\/revisions"}],"predecessor-version":[{"id":3599,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/posts\/2754\/revisions\/3599"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/media\/2671"}],"wp:attachment":[{"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/media?parent=2754"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/categories?post=2754"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/tags?post=2754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}