# Remove account token

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/aof/remove-account:
    post:
      summary: Remove account token
      deprecated: false
      description: >-
        This API allows you to **remove a customer's linked account token** from
        your platform. Once the token is **removed**, this action cannot be
        undone, and the token will no longer be valid for purchases.
      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:
                req_time:
                  type: string
                  description: Request date and time in UTC format as YYYYMMDDHHmmss.
                merchant_id:
                  type: string
                  description: A unique merchant key provided by ABA Bank.
                  maxLength: 20
                ctid:
                  type: string
                  description: >-
                    Your customer token. Each customer must have a unique
                    `ctid`.
                  maxLength: 250
                pwt:
                  type: string
                  description: Token generated by the payment gateway.
                  maxLength: 250
                hash:
                  type: string
                  description: >-
                    Base64-encoded HMAC-SHA512 hash of concatenated values 
                    `merchant_id`, `req_time`, `ctid`, and `pwt`, using
                    `public_key`.


                    **PHP Sample Code**


                    ```php

                    // public key provided by ABA Bank

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

                    // Prepare the data to be hashed

                    $b4hash =  $merchant_id . $req_time . $ctid . $pwt;

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

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

                    ```
              x-apidog-orders:
                - req_time
                - merchant_id
                - ctid
                - pwt
                - hash
              required:
                - req_time
                - merchant_id
                - ctid
                - pwt
                - hash
            example:
              req_time: '20250305114648'
              merchant_id: ec000002
              ctid: 522235C...C8FA2890C5378D7
              pwt: 522235462D55FA...6AF3DA7B968DD7B7F57A
              hash: K1g6XnbVSyN1L/...RM1HrsmPDgfdUzT/6Ru9HV+H/yn1qLow==
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: string
                        description: |
                          - `00` : Success
                          - `04` : Missing required parameter
                          - `29` : Invalid `ctid` or `pwt` value
                          - `500` : Server-side error   
                      message:
                        type: string
                        description: Please see more details on the property `code` above.
                    x-apidog-orders:
                      - code
                      - message
                    required:
                      - code
                      - message
                x-apidog-orders:
                  - status
                required:
                  - status
          headers: {}
          x-apidog-name: OK
      security: []
      x-apidog-folder: Credentials on File
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/831852/apis/api-14530830-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://checkout-sandbox.payway.com.kh/
    description: StillZeroBug
security: []

```
