User Information

Overview

The userInformation call obtains demographic and registration information for a single guest account. The username must be supplied in the request, and only a single account may be queried at a time. If a username cannot be supplied, you may specify the printed card number instead by using a userInformationbyPrintedCardNumber call. Unlike the accountInformation request, a card’s balances and wallet names are not returned by this call. Instead, the Paytronix reply will include all available demographic information associated with the specified account, including username, email address, and first name. There is no option for obtaining the guest’s current password.

Some useful implementations of the userInformation call include:

  • Display the guest’s name at the top of each page
  • Pre-populate an edit account form with the current demographic information

The userInformation reply includes a result string and two objects. The first is a “fields” object that includes a collection of key/values, where the key corresponds the demographic field name and the value corresponds to the guest’s recorded information for that field. Please note that field names are case sensitive and must match our documentation exactly. If the guest’s value for a field is blank, Paytronix will exclude that field from the reply. The second object is a key/value pair of all primary card numbers for the account. While it is possible for a single account to have multiple primary card numbers if the guest has attached but not combined multiple cards, this is relatively unusual and typically not necessary information for most mobile or website integrations. Even if an account has multiple primary card numbers associated with it, this does not affect the amount of demographic information returned in the fields object.

Authentication

This flow supports the following authentication types: B2B, guest, OAuth. Depending on the authentication type, more fields may be required. See this page for details: API Authentication Styles

Flow

../_images/user_Information.png
  1. Integration gathers information from the user. The information to gather will depend on the authentication type

  2. Integration sends userInformation call

  3. The Paytronix System returns a success, failure or more_info

    1. If the result is success then the integration should use the server response to display the user’s information
    2. 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

Example

Request Body

{
  "authentication": "oauth",
  "access_token": "rIe7dgL5pthisisnotarealtokenqrFbA268pw5GP",
  "username": "john.doe",
  "merchantId": 777777
}

Response

{
  "result": "success",
  "fields": {
        "email": "[email protected]",
        "emailVerified": false,
        "mobilePhone": "1234567910",
        "optIn": true,
        "smsOptInVerified": false,
        "textCampaignOptIn": false,
        "username": "john.doe"
  },
  "primaryCardNumbers": [
        "600030100143243"
  ]
}

API Reference

Please see the following API reference page for more technical details: Guest Service