Account Balance¶
Overview¶
Most Guest websites or mobile applications show the guest’s balance immediately after log on. Other websites or integrations have the sole purpose of displaying the guests balance given a card number and registration code.
Authentication¶
This flow supports the following authentication types: guest, card, OAuth. Depending on the authentication type, more fields may be required. See this page for details: API Authentication Styles
Flow¶
Integration gathers information from the user. The information to gather will depend on the authentication type
Integration sends accountInformation call
The Paytronix System returns a success, failure or invalid_status
- If the result is success then the integration should use the server response to display the balance information
- If the result is failure then the integration should inform the guest of the failure. It is suggested that the integration uses the error code and error message returned by the system to inform the guest of the problem, though the merchant should decide on the exact message
- If the result is invalid_status, then this card is in a state where displaying a balance may not be helpful - Typically the guest would not be able to use the balance in this situation. The merchant should decide on the exact message to be displayed in these situations.
Example¶
Request Body
{
"printedCardNumber": "6000301000418000",
"merchantId": 777777,
"authentication": "oauth",
"access_token": "rIe7dgL5pthisisnotarealtokenqrFbA268pw5GP"
}
Response
{
"result": "success",
"accountStatus": "ACTIVE",
"additionalCards": [
],
"cardTemplateCode": 3,
"cardTemplateLabel": "Loyalty Card",
"enrollmentStore": {
"code": "corp",
"label": "Corporate"
},
"fields": {
"enrollDate": "2014-07-29",
"externalAccounts": [
],
"favoriteStore": {
"code": "corp",
"label": "Corporate"
},
"perks": [
]
},
"isRegistered": true,
"pointBalances": [
{
"balance": "1",
"name": "Visits",
"walletCode": 5
},
{
"balance": "0",
"name": "Points",
"walletCode": 3
}
],
"primaryCard": {
"maskedCardNumber": "418000",
"printedCardNumber": "6000301000418000",
"status": "ACTIVE"
},
"queryCardStatus": "ACTIVE",
"rewardBalances": [
],
"tierCode": 1,
"tierLabel": "REGISTERED",
"username": "GuestREST"
}
API Reference¶
Please see the following API reference page for more technical details: Guest Service