# Get token details

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/payment-credential/v3/token-management/get-token-details:
    post:
      summary: Get token details
      deprecated: false
      description: >-
        If you encounter issues with the callback and do not receive the details
        during **link account**, **link card**, or **token renewal**, you can
        manually retrieve the linked account or card information.
      tags:
        - Credentials on File
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: true
          example: application/json
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                request_time:
                  type: string
                  description: Request date and time in UTC format as YYYYMMDDHHmmss.
                hash:
                  type: string
                  description: >-
                    **PHP Sample Code**

                    ```js

                    // public key provided by ABA Bank

                    $api_key = "API KEY PROVIDED BY ABA BANK";


                    // Prepare the data to be hashed

                    $b4hash = $merchant_id . $request_time . $request_id;


                    // Generate the HMAC hash using SHA-512 and encode it in
                    Base64 

                    $hash = base64_encode(hash_hmac('sha512', $b4hash, $api_key,
                    true));

                    ```
                merchant_id:
                  type: string
                  description: A unique merchant key provided by ABA Bank.
                  maxLength: 20
                request_id:
                  type: string
                  description: >-
                    Your request id. The request id shall be unique from your
                    side. This id will be use to obtain the token details in the
                    future. We only return the last record. Length from 5 to 24
                    characters long, consisting only of letters (uppercase and
                    lowercase) and numbers, with no special characters or spaces
                    allowed.
              required:
                - hash
                - merchant_id
                - request_id
                - request_time
              x-apidog-orders:
                - request_time
                - request_id
                - merchant_id
                - hash
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                        description: '`00` - Success'
                      message:
                        type: string
                        description: >-
                          Please see the property reponse `code` for the
                          details.
                      trace_id:
                        type: string
                        x-apidog-mock: '{{$string.uuid}}'
                        description: >-
                          A log ID is generated by the system for debugging
                          purposes.
                    x-apidog-orders:
                      - code
                      - message
                      - trace_id
                    required:
                      - code
                      - message
                      - trace_id
                  data:
                    type: object
                    properties:
                      source_of_fund:
                        type: string
                        description: >-
                          This field displays either the card number or the ABA
                          account number, depending on the payer's selected
                          payment method. For security reasons, the number is
                          masked and only the last 4 digits are shown.
                        x-apidog-mock: '*1234'
                      type:
                        type: string
                        description: |-
                          Possible values 
                          - `Visa` - Visa card
                          - `MC` - Mastercard
                          - `CUP` - UnionPay card
                          - `JCB` - JCB card
                          - `ABA ACCOUNT` - ABA Account
                      status:
                        type: integer
                        format: int32
                        description: |-
                          - `0` -  Token has been removed.
                          - `1` - Token is active.
                          - `2` - Token has been frozen.
                      expired_at:
                        type: string
                        description: Expiry date of the token.
                        format: date-time
                      token_flag:
                        type: string
                        description: >-
                          Possible values: `CITI_FLEX`, `CITO_FLEX`, and
                          `CITR_FIX`.
                      frequency:
                        type: string
                        description: >-
                          This field will be empty if the token flag is
                          `CITI_FLEX` or `CITO_FLEX`. If the token flag is
                          `CITR_FIX`, the possible values are:

                          - `1W` – Weekly

                          - `1M` – Monthly

                          - `2M` – Every 2 months
                        nullable: true
                      amount_limit_per_tran:
                        type: number
                        description: >-
                          Token payment amount limit per transaction. If token
                          flag is `CITR_FIX` this value is equal to value of
                          `subscribed_amount`.
                        format: double
                      ctid:
                        type: string
                        title: ''
                        description: >-
                          This is your consumer identification number, which is
                          a unique code used to identify you in the system. The
                          string must be between 5 and 24 characters long and
                          can only contain letters and numbers — no spaces or
                          special characters.
                      pwt:
                        type: string
                        title: ''
                        description: >-
                          PWT (PayWay Token) is a unique token automatically
                          generated by the PayWay system and is used to complete
                          the purchase.
                      subscribed_amount:
                        type: number
                        description: >-
                          Refers to the fixed amount of money that the customer
                          agrees to pay regularly as part of a subscription or
                          recurring payment. 0 if token flag is `CITI_FLEX` or
                          `CITO_FLEX`.
                        format: double
                        x-apidog-mock: '{{$finance.amount}}'
                      currency:
                        type: string
                        description: Token currency.
                    x-apidog-orders:
                      - ctid
                      - pwt
                      - source_of_fund
                      - type
                      - status
                      - expired_at
                      - token_flag
                      - frequency
                      - subscribed_amount
                      - amount_limit_per_tran
                      - currency
                    required:
                      - subscribed_amount
                      - ctid
                      - pwt
                      - source_of_fund
                      - type
                      - token_flag
                      - status
                      - expired_at
                      - amount_limit_per_tran
                      - currency
                x-apidog-orders:
                  - status
                  - data
                required:
                  - status
                  - data
              examples:
                '1':
                  summary: Example 1
                  value:
                    status:
                      code: '00'
                      message: Success
                      trace_id: '175576519295871'
                    data:
                      ctid: 64513556cc930062e8cb3ae59eee8fbf459c53e
                      pwt: 6451355C97035CDE21FB13..E0945C21007136F3D423A1B
                      source_of_fund: '*****5312'
                      type: ABA ACCOUNT
                      status: 0
                      expired_at: '2019-08-24T14:15:22Z'
                      token_flag: CITI_FLEX
                      frequency: ''
                      subscribed_amount: 0
                      amount_limit_per_tran: 200
                      currency: USD
                '2':
                  summary: Example 1
                  value:
                    status:
                      code: '04'
                      message: The given data was invalid.
                      trace_id: 30a1b46c37.....6aad589ffaff8
                      errors:
                        additionalProp1:
                          - string
                        additionalProp2:
                          - string
                        additionalProp3:
                          - string
                '3':
                  summary: Example 1
                  value:
                    status:
                      code: '1'
                      message: Wrong Hash.
                      trace_id: 228c0ae0ca.....f088bc280fe09
          headers: {}
          x-apidog-name: OK
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                        description: '`04` - The given data was invalid.'
                        nullable: true
                      message:
                        type: string
                        description: >-
                          Please see the property reponse `errors` for the
                          details.
                        nullable: true
                      trace_id:
                        type: string
                        description: >-
                          A log ID is generated by the system for debugging
                          purposes.
                        nullable: true
                      errors:
                        type: object
                        additionalProperties:
                          type: array
                          items:
                            type: string
                        properties: {}
                        x-apidog-orders: []
                        description: |-
                          Error details:
                          **Sample**
                          ```js
                          "errors": {
                              "property1": [
                                  "string"
                              ],
                              "property2": [
                                  "string"
                              ]
                          }
                          ```
                        nullable: true
                    x-apidog-orders:
                      - code
                      - message
                      - trace_id
                      - errors
                x-apidog-orders:
                  - status
          headers: {}
          x-apidog-name: Bad Request
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                        description: |-
                          - `01` - Wrong hash.
                          - `98` - Merchant id not found.
                          - `104` - Data not found.
                        nullable: true
                      message:
                        type: string
                        description: >-
                          Please see the property reponse `code` for the
                          details.
                        nullable: true
                      trace_id:
                        type: string
                        x-apidog-mock: '{{$string.uuid}}'
                        description: >-
                          A log ID is generated by the system for debugging
                          purposes.
                        nullable: true
                    x-apidog-orders:
                      - code
                      - message
                      - trace_id
                x-apidog-orders:
                  - status
          headers: {}
          x-apidog-name: Forbidden
      security: []
      x-apidog-folder: Credentials on File
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/831852/apis/api-19336824-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://checkout-sandbox.payway.com.kh/
    description: StillZeroBug
security: []

```
