Charge Status

GET https://api.e-guma.ch/v1/vouchers/{code}/charge_status.json?apikey={api-key}

Parameters

AttributeDescription
code requiredThe code of the voucher. Vouchers issued by e-guma have 12 characters. You can pass the code with (e.g. ABCD-ABCD-ABCD) or without (e.g. ABCDABCDABCD) dashes. Imported vouchers from a previous system can have another length and format, for example a 16-digit card number. Pass the code as it is printed or scanned. Dashes and spaces are ignored. Please use url_encode for the code as it might contain special characters.
api-key required

Return

codeThe same voucher code as you provided as parameter
balance_in_centsThe current balance of the voucher in cents
can_be_chargedTrue if the voucher can be charged, otherwise false
messageMessage why the voucher can't be charged

Example

GET https://api.e-guma.ch/v1/vouchers/JWCPP7QV25S4/charge_status.json?apikey=510e32c594d84816a4af9df1
{
  "code":"JWCPP7QV25S4",
  "balance_in_cents": 10000,
  "can_be_charged": true,
  "message": ""
}