iWAREHOUSE - PrePaid Card API

Prepaid Cards Assume the following:

  • Prepaid Cards can be sold from the Website or via POS.
    • On a successful sale (ie payment) the website should hit our prepaid card API and get a code returned.
    • That code should be emailed to the customer
  • The Code will be
    • generated as a random non-sequential code so that people can’t guess a valid code.
    • Ability to printed/scanned as a barcode and or typed into the POS.

CREATE NEW CARD

Example URL to create a new card:
http://ZZZ.iposwarehouse.com/core/sales/cards/prepaid/prepaid_api.asp?log=AAAA&pwd=BBBB&qty=CCCC&expiresyears=DDDD&prd=EEEE&site=FFFF

Returns:

{
    "CardKey": 55271,
    "CardCode": "PV8BEX540B",
    "CardActive": true,
    "SiteKey": 0,
    "CustomerKey": 0,
    "ProductKey": 1836,
    "DriveCampaignKey": 0,
    "CardOpeningDteTme": "19/03/2019",
    "CardOpeningBalance": 1,
    "CardOpeningBalanceManual": 0,
    "CardBalanceDteTme": "",
    "CardBalance": 1,
    "CardExpiryDate": "19/09/2019",
    "CardNotes": ""
}

READ EXISTING BALANCE

The API can also be used to read the balance of an existing card:
http://ZZZ.iposwarehouse.com/core/sales/cards/prepaid/prepaid_api.asp?log=AAAA&pwd=BBBB&card=PV055134

{
    "CardKey": 55272,
    "CardCode": "PVMQ7NJ236",
    "CardActive": true,
    "SiteKey": 0,
    "CustomerKey": 0,
    "ProductKey": 1836,
    "DriveCampaignKey": 0,
    "CardOpeningDteTme": "19/03/2019",
    "CardOpeningBalance": 1,
    "CardOpeningBalanceManual": 0,
    "CardBalanceDteTme": "",
    "CardBalance": 1,
    "CardExpiryDate": "19/09/2019",
    "CardNotes": ""
}

NOTES

  • The API creates one gift card at a time
  • The Code
  • has a prefix (in this case PV) but the prefix could be anything. (Allows the POS to recognise a card using the prefix)
  • is checked against the database before being returned so it us unique (not used before)
    • is always UPPER CASE
    • can be converted to a Barcode using a Barcode Font in an email or HTML page. (this is not the job of the API).
  • There are many fields returned, most of which you don’t need, the important fields are CardCode, CardBalance, and CardExpiryDate
  • Substitute AAAA and BBBB for your login details.
  • Substitute CCCC for the quantity.
  • Substitute EEEE for the product key.
  • Where FFFF is the site key
  • We suggest using POSTMAN to prove that the API works and you can use this to troubleshoot your code.
  • We suggest you log every call and response to the API so that we can compare logs if needed.
  • Be aware that JSON is case sensitive

OPTIONAL PARAMETERS

  • rego - attach the prepaid card to a REGO

EXPIRY

  • Other expiry options are expiresdays=X, expiresmonths=X, expiresyears=X, expires=date