How to check your wallet balance with Reloadly’s Gift Card API

Raphael Ugwu

Raphael Ugwu

< 1

When building an application with Reloadly’s 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.

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’s balance in real time. With this, you can avoid running low when making multiple gift card orders

The objective of this guide can be achieved with the following steps:

  • Getting your access token from the Gift Card authentication service
  • Make the request for the wallet balance

You can get your access token by following the steps in this quickstart. The cURL code sample below specifies how you can then use your access token to make a request to check your wallet balance.

curl -i -X GET \  https://giftcards.reloadly.com/accounts/balance \  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'?

If your request is successful, you should receive a response similar to the following

{  "balance": 5000,  "currencyCode": "USD",  "currencyName": "US Dollar",  "updatedAt": "2021-12-04 08:45:51"}?

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.

Resources

Reloadly Gift Cards API

Reloadly Developer Documentation

This might also interest you:

Content by developers to developers.

Subscribe to The Monthly Reload for Developers and start receiving all the developers’ updates.

The Monthly Reload: the newsletter for you

Subscribe to our Newsletter and don’t miss any news about our industry and products.

It’s time to build, make your first API call today