1. Home
  2. Docs
  3. Get Balances By Brand
  4. Get Current Gift Card Balance By Brand

Get Current Gift Card Balance By Brand

Sample request for gift card balance lookup

GET https://mygiftcardbalance.us/api/v1/brands/{brandId}/balance?number=6167985302654843&pin=7943&api_key={api_key}

Sample successful response for gift card balance lookup

{
 "payload":{
 "balance": "0.00",
 "merchantId": "5cb0a8554831ac0057b6b57c",
 "name": "walmart",
 "status": 200,
 "success": true,
 "error": false,
 "hashed":{
  "number": "000c9692f753f0ffffd1e8eda1a2d4b1",
  "pin": "0163cceb20f5ca7b313419c068abd9dc"
},
"balanceHistory":[ //balance history lookup for a particular card number/pin combination
 {
  "timestamp": "2019-07-24T19:00:31.179Z",
  "balance": "0.00"
 }
]
  }
}

Sample successful response with invalid card/pin number

{
 "payload":{
   "balance": "", //balance will be an empty string if we detect a card/pin validation error
   "merchantId": "5cb0a8554831ac0057b6b57c",
   "name": "walmart",
   "status": 200,
   "success": true,
   "error": false,
   "details":{ //details will be an object that has a specific validation message you can display to your end user and a specific internal error code.
     "message": "gift card number or pin is invalid",
     "code": 1002
},
 "hashed":{
   "number": "9c28c13a7c65541acbaf489be9aaed6b",
   "pin": "0163cceb20f5ca7b313419c068abd9dc"
},
 "balanceHistory":[]
 }
}

Notes

  • Non 200 responses will not be billed to your account
  • All card numbers and pins are hashed for security
  • We will return gift card balance history for all lookups with card number/pin combination. (Can be useful if you need to determine if another user has looked up the same card/pin combination. )
  • If you need to figure out API request limits remaining for the month we send back headers “X-RateLimit-Remaining” that contains information with request limits remaining for the month.

Was this article helpful to you? Yes No

How can we help?