---
title: "Verify"
method: POST
path: "/token/verify"
tags: ["Token"]
deprecated: true
---

# Verify

`POST /token/verify`

> **Deprecated.**

This API method allows the calling application to verify a Token or Account that has been presented by a consumer.

These checks can be used for a variety of use cases in order to:
* Check it is genuine and valid within AIR. 
* Check it hasn't already been redeemed (for single use Tokens/Accounts).
* Check it's valid to redeem at that time (within the desired Valid-From & Valid-To range).
* Check if the parent Campaign is still active. 
* Check it hasn't been locked by another Outlet.
* Check if there is enough balance. 
* Check if the pin provided (passphrase) is correct (optional parameter).
* Optionally, to improve the customer experience and reduce the fraud risk. Verified Tokens or Accounts could be locked as part of this request if instructed to do so (please note Campaign settings could prevent them from being locked). 

  Locked Tokens/Accounts can be redeemed, credited or debited, without unlocking, as long as the location specified in the API key or explicit location 'override' remains the same; otherwise, the Token/Account should be unlocked by the calling application e.g if a Consumer changes their mind and no longer wishes to redeem it. 
  
  Alternatively, they will be automatically unlocked after reaching the defined lock time-out.
  This API is replaced by the POS Connect account APIs.

## Request body

- union — please note - one of the following attributes `accountId` or `token` is mandatory and has to be provided
  - object
    - `accountId` integer — EES AIR Account ID
    - `token` string, string, required — Token (Value)
    - `lock` boolean — Optional boolean flag to instruct AIR to lock this token to the particular location so it can not be verified, redeemed nor debited elsewhere, until the lock is present.
    - `pin` string, string — If this key is present in the Request payload, AIR will perform an additional check and only if this value matches the PIN stored in AIR then Verify action will be attempted. Up to the calling application to include PIN into a Request Payload or not.
    - `location` string, string — [Optional] Outlet incoming identifier where this Transaction has happened
    - `details` TransactionDetailsEntity — JSON Object without a fixed structure (EES AIR Meta-Data)
  - object
    - `accountId` integer, required — EES AIR Account ID
    - `token` string, string — Token (Value)
    - `lock` boolean — Optional boolean flag to instruct AIR to lock this token to the particular location so it can not be verified, redeemed nor debited elsewhere, until the lock is present.
    - `pin` string, string — If this key is present in the Request payload, AIR will perform an additional check and only if this value matches the PIN stored in AIR then Verify action will be attempted. Up to the calling application to include PIN into a Request Payload or not.
    - `location` string, string — [Optional] Outlet incoming identifier where this Transaction has happened
    - `details` TransactionDetailsEntity — JSON Object without a fixed structure (EES AIR Meta-Data)

## Response `201`

EES AIR successfully processed this request

- object
  - `accountId` integer, required — Account ID (EES Reference)
  - `accountTypeId` integer, required — Account Type ID (EES Internal Type Reference)
  - `accountType` 'Endpoints applicable to COUPON Account Type' | 'Endpoints applicable to STORED_VALUE Account Type', required — Account Type
  - `accountSubType` 'ECOUPON' | 'CONTINUITY' | 'PAPER' | 'VOUCHER' | 'DEBIT' | 'PLASTIC', required — Account Sub-type
  - `token` string, string, required — Generated Token
  - `tokenId` integer, required — Token ID (EES Reference)
  - `consumerId` integer — Consumer ID (EES Reference)
  - `issuerId` integer, required — Issuer ID
  - `barcodeImage` string, string — An base64-encoded Barcode Image of the generated Token. Please note currently 128C Barcode Type is supported only.
  - `accountStatus` 'ACTIVE' | 'BLOCKED' | 'CANCELLED' | 'DELETED' | 'EXPIRED' | 'INACTIVE' | 'INVALIDATED' | 'LOCKED' | 'STOLEN' | 'USED', required — Account status
  - `tokenStatus` 'INACTIVE' | 'ACTIVE' | 'REDEEMED' | 'CANCELLED' | 'EXPIRED' | 'INVALIDATED', required — Token status
  - `balances` AccountBalancesEntity, required — The object of balances. Some balances only apply to certain types of accounts. See notes below on balances.
    - `available` integer — The available balance. This is applicable for all account types, except POINTS and CONTINUITY, which uses its own balance keys. For ECOUPON account type this property will be returned and will be equal to zero.
    - `refundable` integer — The refundable balance. This is applicable for all account types except POINTS and CONTINUITY, but is not used during account creation. For an Account Entity, the amount displayed here is the total refundable balance available. Please note for ECOUPON account type this property will be returned and equal to zero.
    - `totalSpend` integer — The total spend balance. Applicable only to CONTINUITY type Accounts. If totalSpend is not provided on creation, this will be set to 0.
    - `transactionCount` integer — The transaction counter. Applicable only to CONTINUITY type Accounts. If transactionCount is not provided on creation, this will be set to 0.
    - `current` integer — The current balance. Applicable only to accounts of type POINTS and STAMP. If not provided on creation, this will be set to 0.
    - `usable` integer — The usable balance. Applicable only to accounts of type POINTS. If not provided on creation, this will be set to 0.
    - `locked` integer — The locked balance. Applicable only to accounts of type POINTS. If not provided on creation, this will be set to 0.
    - `lifetime` integer — The lifetime balance. Applicable only to accounts of type POINTS and STAMP. If not provided on creation, this will be set to 0.
  - `serialNumber` string, string — Token Serial Number. Please note this optional attribute is available for Stored Value Account only. This attribute will not show up in the Response unless appropriate Programme setting is turned on
  - `tokenDates` object, required
    - `start` string, date-time, required — Token Valid-From date-time - If using 'useOldMysqlDateTimes' unit setting, use MySQL datetime format instead.
    - `end` string, date-time, required — Token Valid-To date-time - If using 'useOldMysqlDateTimes' unit setting, use MySQL datetime format instead.
  - `resourceType` 'CAMPAIGN' | 'PROGRAMME', required — Resource Type
  - `resourceId` integer, required — Programme Id, Campaign Id
  - `pin` string, string — This JSON property would return randomly generated by the AIR PIN, if a referenced Resource (Campaign or Programme) is configured to support PINs. Because of security reasons AIR would return this PIN value only as part of Token Create Response
  - `overrides` TokenOverrideEntity — [Optional] Overrides for reward or continuityQualification of the Token. Both the Unit and Campaign must have overrides enabled to use this.
    - `reward` object — Reward overrides for the Token.
      - `discountAmount` integer — The amount that should be discounted.
      - `creditAmount` integer — The number of points to credit a Points Account with.
      - `finalAmount` integer — The final amount to override with.
      - `percentageAmount` number — A percentage amount to be discounted. This must be an integer unless `allowDecimal` is enabled in the Unit.
      - `discountValue` integer — The discount value to override with.
    - `continuityQualification` object — Continuity qualification overrides for the Token.
      - `totalTransactionUnits` integer — The number of units that are needed in the transaction to qualify for the reward.
      - `totalTransactionSpend` integer — The transaction spend amount needed to qualify for the reward.
      - `totalTransactionCount` integer — The number of Account Transactions needed to qualify for the reward.
  - `accountTransactionId` string, string, nullable, required — ID of the Account Transaction created as result of this API endpoint call (if applicable, as not all AIR operations would generate Account Transaction)

## Other responses

- `400` — EES AIR refuse to process that particular Request as there is something wrong with the Request (e.g. Request Payload is unprocessable, Mandatory Request Parameter value is not provided, etc.)
- `401` — EES AIR refuse to process that particular Request due to Authentication error(s). This could be caused by missing one or more of mandatory AUTH headers, invalid Hash calculation, invalid or inactive API Key used, etc.
- `403` — EES AIR refuse to process that particular Request due to Authorisation error(s). Please note nothing is wrong with Authentication nor hash Calculation, it is simply due to lack of permission to perform that particular action (e.g. Issuance Partner attempts to Redeem a Token or Redemption Partner attempts to Issue a Token, etc.)
- `404` — EES AIR refuse to process that particular Request as requested Resource could not be found or referenced Resource is not active.
- `415` — EES AIR refuse to process that particular Request as requested `Mime-Type` is not supported (Currently only `application/json` is supported
- `429` — Too Many Requests
- `500` — EES AIR is not able to process that particular Request due to Unexpected Server Error.

---

[API](https://skmtc.net/eagleeye/apis/wallet-api.md) · [All operations](https://skmtc.net/eagleeye/apis/wallet-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eagleeye/wallet-api/versions/90a122bb14cc/schema)
