{"id":3596,"date":"2022-10-04T12:14:52","date_gmt":"2022-10-04T12:14:52","guid":{"rendered":"https:\/\/www.reloadly.com\/blog\/?p=3596"},"modified":"2022-10-04T12:14:57","modified_gmt":"2022-10-04T12:14:57","slug":"how-to-check-your-wallet-balance-with-reloadlys-gift-card-api","status":"publish","type":"post","link":"https:\/\/blog.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/","title":{"rendered":"How to check your wallet balance with Reloadly&#8217;s Gift Card API"},"content":{"rendered":"\n<p id=\"block-a0e2e686-609c-4688-9ada-5d2a301af2b0\">When building an application with Reloadly\u2019s Gift Card API, your application makes gift card orders from your wallet balance. This creates the need to keep an eye on your balance in real time.<\/p>\n\n\n\n<p id=\"block-c30575b7-3d58-4b3d-9a3a-4545a1809e32\">This guide shows you how to how to embed an API request in any of your gift card applications that shows you the data of your wallet\u2019s balance in real time. With this, you can avoid running low when making multiple gift card orders<\/p>\n\n\n\n<p id=\"block-67212433-4c19-41c8-a7e5-856014b7e521\">The objective of this guide can be achieved with the following steps:<\/p>\n\n\n\n<ul id=\"block-3175c8a1-4b05-43bc-97cf-ec2d4c6748ca\"><li>Getting your access token from the Gift Card authentication service<\/li><li>Make the request for the wallet balance<\/li><\/ul>\n\n\n\n<p id=\"block-8ddbfa37-31f8-4d94-b4d3-b291ea20a229\">You can get your access token by following the steps in this <a href=\"https:\/\/docs.reloadly.com\/gift-cards\/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<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">curl -i -X GET \\  https:\/\/giftcards.reloadly.com\/accounts\/balance \\  -H 'Authorization: Bearer &lt;YOUR_TOKEN_HERE&gt;'?<\/pre>\n\n\n\n<p id=\"block-8632ffb6-67c1-4f22-b907-2cb892cd9afc\">If your request is successful, you should receive a response similar to the following<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{  \"balance\": 5000,  \"currencyCode\": \"USD\",  \"currencyName\": \"US Dollar\",  \"updatedAt\": \"2021-12-04 08:45:51\"}?<\/pre>\n\n\n\n<p id=\"block-e62482a0-2d86-465a-951a-4d043898916b\">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\" id=\"block-a66d1f19-09e1-43d1-8d74-5ec78ad05ab3\">Resources<\/h3>\n\n\n\n<p id=\"block-2772be9b-caa9-41c6-958b-4620aded7983\"><a href=\"https:\/\/docs.reloadly.com\/gift-cards\" target=\"_blank\" rel=\"noreferrer noopener\">Reloadly Gift Cards API<\/a><\/p>\n\n\n\n<p id=\"block-547ac0bd-7a13-491b-952c-c9bc660c70a0\"><a rel=\"noreferrer noopener\" href=\"https:\/\/developers.reloadly.com\/\" target=\"_blank\">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":2756,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[274],"tags":[314,435,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 Gift Card 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-gift-card-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 Gift Card 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-gift-card-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Reloadly\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-04T12:14:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-04T12:14:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.reloadly.com\/blog\/wp-content\/uploads\/2022\/07\/cover-image-blogs.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:\/\/www.reloadly.com\/blog\/#organization\",\"name\":\"Reloadly\",\"url\":\"https:\/\/www.reloadly.com\/blog\/\",\"sameAs\":[],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.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:\/\/www.reloadly.com\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/#website\",\"url\":\"https:\/\/www.reloadly.com\/blog\/\",\"name\":\"Reloadly\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.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-gift-card-api\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/blog.reloadly.com\/blog\/wp-content\/uploads\/2022\/07\/cover-image-blogs.png\",\"width\":641,\"height\":334},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/#webpage\",\"url\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/\",\"name\":\"How to check your wallet balance with Reloadly's Gift Card API - Reloadly\",\"isPartOf\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/#primaryimage\"},\"datePublished\":\"2022-10-04T12:14:52+00:00\",\"dateModified\":\"2022-10-04T12:14:57+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-gift-card-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/\",\"url\":\"https:\/\/www.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-gift-card-api\/\",\"url\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/\",\"name\":\"How to check your wallet balance with Reloadly&#8217;s Gift Card API\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/#\/schema\/person\/2400042054e3b3009489e487224a6984\"},\"headline\":\"How to check your wallet balance with Reloadly&#8217;s Gift Card API\",\"datePublished\":\"2022-10-04T12:14:52+00:00\",\"dateModified\":\"2022-10-04T12:14:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.reloadly.com\/blog\/how-to-check-your-wallet-balance-with-reloadlys-gift-card-api\/#primaryimage\"},\"keywords\":\"developers,giftcards,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-gift-card-api\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.reloadly.com\/blog\/#\/schema\/person\/2400042054e3b3009489e487224a6984\",\"name\":\"Raphael Ugwu\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.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\/3596"}],"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=3596"}],"version-history":[{"count":1,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/posts\/3596\/revisions"}],"predecessor-version":[{"id":3598,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/posts\/3596\/revisions\/3598"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/media\/2756"}],"wp:attachment":[{"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/media?parent=3596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/categories?post=3596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.reloadly.com\/blog\/wp-json\/wp\/v2\/tags?post=3596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}