openapi: 3.0.0
x-stoplight:
  id: jm4x98wxs65c5
servers:
  - url: 'https://uat-mtms.mspayhub.com/api/v2'
    variables: {}
    description: API Server
info:
  version: v2
  title: Service REST APIs
  termsOfService: ''
  license:
    name: ''
  description: >-
    ### 1.Client Requests a Token:

    Login to [TMS portal](https://uat-mms.mspayhub.com), the TMS portal account
    from MineSec.

    Open the Settings item then click `KEY INFO` button, and copy `KEY For
    Service API` info.


    ### 2.Client Requests current information

    ```

    curl -X GET \
      -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
      https://uat-mtms.mspayhub.com/api/v2/current
    ```

    Server Validates the Token.
paths:
  /current:
    parameters: []
    get:
      summary: Bearer Token
      operationId: get-api-current
      responses:
        '200':
          description: Get current user
          content:
            application/json:
              schema:
                type: object
                properties:
                  msg:
                    type: string
                  code:
                    type: integer
                  data:
                    type: object
                    properties:
                      groupName:
                        type: string
                      messageFormat:
                        type: string
                      groupId:
                        type: string
                      logo:
                        type: string
                      timeZone:
                        type: string
                      emailSender:
                        type: string
                      updatedAt:
                        type: string
        '401':
          $ref: '#/components/responses/401'
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      description: 'If service api response 401, need check and validate token.'
      x-stoplight:
        id: g34aptkkojwhj
  /mchInfo:
    get:
      summary: Merchant List
      description: 'provide a list of merchants under this PBO(Payment Business Owner). '
      operationId: get-mchInfo
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
                properties:
                  msg:
                    type: string
                    description: response message
                  code:
                    type: integer
                    description: error code
                  data:
                    type: object
                    description: page result
                    properties:
                      total:
                        type: integer
                        description: total number of merchants
                      current:
                        type: integer
                        description: current page number
                      hasNext:
                        type: boolean
                        description: indicate if there is a next page
                      records:
                        type: array
                        description: current page results
                        items:
                          $ref: '#/components/schemas/MerchantExtract'
      x-stoplight:
        id: vpizxz40gunlm
      tags:
        - Merchant
    post:
      summary: Merchant Create
      description: >-
        The API allows PBO system to create a merchant by providing the
        necessary information. Please be reminded: providerReference should be
        unique per merchant or set it as null/empty
      operationId: ''
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
                properties:
                  msg:
                    type: string
                    description: response message
                  code:
                    type: Int
                    description: error code
                  data:
                    $ref: '#/components/schemas/MerchantExtract'
      x-stoplight:
        id: rhwosdf1a2tba
      tags:
        - Merchant
  '/mchInfo/{mchId}':
    get:
      summary: Merchant Detail
      description: Get the detail of merchant by providing mchId
      operationId: get-mchInfo-mchId
      parameters:
        - name: mchId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
                properties:
                  msg:
                    type: string
                    description: response message
                  code:
                    type: Int
                    description: error code
                  data:
                    $ref: '#/components/schemas/MerchantExtract'
      x-stoplight:
        id: 3wrwlhuf8alt8
      tags:
        - Merchant
    put:
      summary: Merchant Update
      description: Update the merchant configuration information
      operationId: put-mchInfo-mchId
      parameters:
        - name: mchId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MerchantExtract'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
                properties:
                  msg:
                    type: string
                    description: response message
                  code:
                    type: Int
                    description: error code
                  data:
                    $ref: '#/components/schemas/MerchantExtract'
      x-stoplight:
        id: y3ztjmrd0ktku
      tags:
        - Merchant
  /device:
    parameters: []
    get:
      summary: Terminal List
      responses:
        '200':
          $ref: '#/components/responses/Device-List'
      operationId: get-device
      description: 'The device id is activation code When start contain ''CD-'' '
      parameters:
        - schema:
            type: string
          in: query
          name: merchantId
          description: Merchant ID
          required: true
        - $ref: '#/components/parameters/Bearer-Token'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties: {}
      tags:
        - Terminal
    post:
      summary: Activation Code Generation
      operationId: post-device
      responses:
        '200':
          $ref: '#/components/responses/Device-Code'
        '201':
          description: Created
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  emvParams:
                    amexFloorLimit: '00000100'
                    terminalCountryCode: '0840'
                    txnCurrencyCode: '0840'
                    amexExReaderCapability: 18000
                    amexReaderCapability: C3
                    terminalType: '21'
                    terminalCapability: 0068C8
                    emvFlags: VMAUJDP
                  deviceName: test
                  deviceType: COTS
                  methodList: '{"all":{"tid":"11","mid":"11"}}'
                  merchantId: M1685504549
                  groupId: G-77936229
              required:
                - deviceName
                - deviceType
                - merchantId
                - groupId
              properties:
                emvParams:
                  type: object
                  properties:
                    amexFloorLimit:
                      type: string
                      default: '00000100'
                    terminalCountryCode:
                      type: string
                      default: '0840'
                    txnCurrencyCode:
                      type: string
                      default: '0840'
                    amexExReaderCapability:
                      type: number
                      default: 18000
                    amexReaderCapability:
                      type: string
                      default: C3
                    terminalType:
                      type: number
                      default: 21
                    terminalCapability:
                      type: string
                      default: 0068C8
                    emvFlags:
                      type: string
                      default: VMAUJDP
                deviceName:
                  type: string
                deviceType:
                  type: string
                  default: COTS
                methodList:
                  type: string
                extParams:
                  type: string
                  x-stoplight:
                    id: mt36j0fhwvsna
                  description: >-
                    { "subMid": "000", "clientId": "000", "jwtSecret": "000",
                    "acqMid": "000", "subTid": "000", "mid": "000", "acqTid":
                    "000" }
                merchantId:
                  type: string
                groupId:
                  type: string
          application/xml:
            schema:
              type: object
              properties: {}
        description: ''
      tags:
        - Terminal
      description: ''
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
  '/device/{deviceId}':
    parameters:
      - schema:
          type: string
        name: deviceId
        in: path
        required: true
    delete:
      summary: Terminal Logout & Suspend
      operationId: delete-device-deviceid
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      tags:
        - Terminal
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
        - schema:
            type: integer
          in: query
          name: deviceStatus
          description: 0-Inactive; 1-Active; 2-Logout; 3-Decomission
      description: The device id is activation code When start contain 'CD-'
    put:
      summary: Terminal Update
      operationId: put-device-deviceId
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      tags:
        - Terminal
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  deviceType: COTS
                  appVersion: 2.00.000.015(262)
                  deviceAdmin: '123456'
                  deviceUpdate: 0
                  groupId: G-84960272
                  deviceId: 328f8c96be2122fa
                  deviceName: Pixel 4
                  uuid: M1687935515
                  deviceStatus: 2
                  deviceToken: ''
                  activesAt: '2023-06-08T09:46:52.386+00:00'
                  cardBdkId: '00150301'
                  createdAt: '2023-06-08T09:46:52.386+00:00'
                  pinBdkId: null
                  serverUrl: stage.theminesec.com
                  customerId: ec26fa25-bffa-42fa-a1e5-fb716f4d8e47
                  isDevice: true
                  emvParams:
                    amexFloorLimit: '00000100'
                    terminalCountryCode: '0840'
                    txnCurrencyCode: '0840'
                    amexExReaderCapability: 18000
                    amexReaderCapability: C3
                    terminalType: '21'
                    terminalCapability: 0068C8
                    emvFlags: VMAUJDP
                  methodList: '{"all":{"tid":"71001007","mid":"001007514956667"}}'
                  licenseId: 99815445-6b1f-4c5a-b152-992e896e7f46
                  signKeyId: >-
                    t4u8dk275e4qegb2k3gyknsqnybrib1w00rcqaumwjegwy28r816ne1g8y3pw6n3exwgdaszwdz2l4mn4d9uof5rho9x2ksvil3o2ts3yj3yte7r1ixrkq51gqkbq697
                  updatedAt: '2023-07-06T11:32:42.130+00:00'
                  merchantId: M1687935515
              properties:
                deviceType:
                  type: string
                  default: COTS
                deviceAdmin:
                  type: string
                  example: '123456'
                deviceName:
                  type: string
                emvParams:
                  type: string
                  example: >-
                    {"amexFloorLimit":"00000100","terminalCountryCode":"0840","txnCurrencyCode":"0840","amexExReaderCapability":"18E00003","amexReaderCapability":"C3","terminalType":"21","terminalCapability":"0068C8","emvFlags":"VMAUJDP"}
                methodList:
                  type: string
                  example: '{"all":{"tid":"71001007","mid":"001007514956667"}}'
                extParams:
                  type: string
                  example: '{"all":{"tid":"71001007","mid":"001007514956667"}}'
                  x-stoplight:
                    id: oifn1rqs9d190
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
  /order:
    parameters: []
    get:
      summary: Order history
      operationId: get-order
      responses:
        '200':
          $ref: '#/components/responses/OrderList'
      tags:
        - Transaction
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
        - schema:
            type: string
            format: date
          in: query
          name: createdStart
        - schema:
            type: string
            format: date
          in: query
          name: createdEnd
        - schema:
            type: string
          in: query
          name: transactionId
        - schema:
            type: string
          in: query
          name: acquirerRefNo
        - schema:
            type: string
          in: query
          name: deviceId
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
        - schema:
            type: number
          in: query
          name: settleState
          description: |-
            WAIT_FOR_SETTLE: 0,
            SETTLED: 1,
            SETTLE_FAILED: 2
        - schema:
            type: number
          in: query
          name: state
          description: >-
            INIT: 0, PROCESSING: 1, APPROVED: 2, DECLINED: 3, VOIDED: 4,
            REFUNDED: 5, CLOSED: 6, REVERSED: 7
      description: ''
  '/order/{transactionId}':
    parameters:
      - schema:
          type: string
        name: transactionId
        in: path
        required: true
    get:
      summary: Order Detail
      operationId: get-order-detail
      responses:
        '200':
          $ref: '#/components/responses/Order-Detail'
      tags:
        - Transaction
      description: ''
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
  '/order/email/{transactionId}':
    parameters:
      - schema:
          type: string
        name: transactionId
        in: path
        required: true
    post:
      summary: Order Email Receipt
      operationId: post-order-email-transactionId
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      tags:
        - Transaction
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  x-stoplight:
                    id: y13p0z6r9yghb
              required:
                - email
  '/order/void/{transactionId}':
    parameters:
      - schema:
          type: string
          example: M679204192768827393
        name: transactionId
        in: path
        required: true
        description: 'Note: this is transactionId'
    post:
      summary: Order Void
      operationId: post-order-void-transactionId
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      tags:
        - Transaction
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                adminPwd:
                  type: string
                  x-stoplight:
                    id: 6da0imkcpfky9
                  example: Base64(123456)
              required:
                - adminPwd
        description: ''
      description: Can void sale and refund order
  '/order/refund/{transactionId}':
    parameters:
      - schema:
          type: string
          example: M1679204192680747010
        name: transactionId
        in: path
        required: true
        description: 'Note: this is transactionId'
    post:
      summary: Order Refund
      operationId: post-order-refund-transactionId
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      tags:
        - Transaction
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                refundAmount:
                  type: number
                refundReason:
                  type: string
                adminPwd:
                  type: string
                  example: Base64(123456)
              required:
                - refundAmount
                - refundReason
                - adminPwd
        description: ''
      description: 'Can partial refund '
  /acquirer:
    parameters: []
    get:
      summary: Acquirer Profile List
      tags:
        - Acquirer Profile
      responses:
        '200':
          $ref: '#/components/responses/Acquirer-List'
      operationId: get-acquirer
      description: ''
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
        - schema:
            type: string
          in: query
          name: profileName
          description: Like query
        - $ref: '#/components/parameters/pageNumber'
        - $ref: '#/components/parameters/pageSize'
      requestBody:
        content: {}
    post:
      summary: Acquirer Profile Create
      operationId: post-acquirer
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  profileName: test
                  batchNo: '109800'
                  connExtraParams: ''
                  connInitBatchNo: ''
                  groupId: G-77936229
                  connMessageFormat: SIM-8583
                  connTimeout: 30
                  connRetryCount: 2
                  createdAt: '2023-04-19 04:10:19'
                  emvList:
                    '01':
                      - 3
                    '02':
                      - 1
                    '03':
                      - 5
                    '04':
                      - 9
                    '05':
                      - 7
                    '06':
                      - 4
                  connSync: 30
                  createdBy: '100000'
                  connNll: '10'
                  connUrl: 'https://test.cusomter.com'
                  currency: USD
                  methodList:
                    '01':
                      - Void
                      - Refund
                    '02':
                      - Capture
                      - Pre-Auth
                    '03':
                      - Sale
                      - Void
                      - Refund
                    '04':
                      - Sale
                      - Void
                      - Refund
                    '05':
                      - Sale
                      - Void
                      - Refund
                    '06':
                      - Sale
                      - Void
                      - Refund
                  updatedAt: '2023-04-19 04:10:19'
              required:
                - profileName
                - currency
                - groupId
                - connMessageFormat
                - connUrl
                - notifyUrl
                - emvList
                - methodList
              properties:
                profileName:
                  type: string
                currency:
                  type: string
                groupId:
                  type: string
                connMessageFormat:
                  type: string
                connUrl:
                  type: string
                notifyUrl:
                  type: string
                  x-stoplight:
                    id: yrj707tvcilrz
                connTimeout:
                  type: number
                connRequestTimeout:
                  type: number
                  x-stoplight:
                    id: pu8i8l8uyg6m2
                emvList:
                  type: object
                  properties:
                    '01':
                      type: array
                      items:
                        type: number
                    '02':
                      type: array
                      items:
                        type: number
                    '03':
                      type: array
                      items:
                        type: number
                    '04':
                      type: array
                      items:
                        type: number
                    '05':
                      type: array
                      items:
                        type: number
                    '06':
                      type: array
                      items:
                        type: number
                methodList:
                  type: object
                  properties:
                    '01':
                      type: array
                      items:
                        type: string
                    '02':
                      type: array
                      items:
                        type: string
                    '03':
                      type: array
                      items:
                        type: string
                    '04':
                      type: array
                      items:
                        type: string
                    '05':
                      type: array
                      items:
                        type: string
                    '06':
                      type: array
                      items:
                        type: string
          application/xml:
            schema:
              type: object
              properties: {}
        description: ''
      tags:
        - Acquirer Profile
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      description: |-
        Method: \
        01 (VISA) \
        02 (MC) \
        03 (UPI) \
        04 (AMEX) \
        05 (DISCOVER) \
        06 (JCB)
  '/acquirer/{profileId}':
    parameters:
      - schema:
          type: string
        name: profileId
        in: path
        required: true
    delete:
      summary: Acquirer Delete
      operationId: delete-acquirer-profileId
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      tags:
        - Acquirer Profile
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
    put:
      summary: Acquirer Update
      operationId: put-acquirer-profileId
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      description: |-
        Method: \
        01 (VISA) \
        02 (MC) \
        03 (UPI) \
        04 (AMEX) \
        05 (DISCOVER) \
        06 (JCB)
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  profileName: S2M_8583
                  batchNo: '000006'
                  connRequestTimeout: 30000
                  connExtraParams: ''
                  connInitBatchNo: ''
                  groupId: G-77936229
                  connMessageFormat: S2M_8583
                  connTimeout: 3000
                  connRetryCount: 1
                  createdAt: '2023-06-10 05:08:14'
                  emvList:
                    '01':
                      - 3
                    '02':
                      - 1
                    '03':
                      - 5
                    '04':
                      - 9
                    '05':
                      - 7
                    '06':
                      - 4
                  connSync: 3000
                  createdBy: '100017'
                  connNll: '1'
                  profileId: 8
                  connUrl: '1'
                  currency: USD
                  methodList:
                    '01':
                      - Sale
                      - Void
                      - Refund
                    '02':
                      - Sale
                      - Void
                      - Refund
                    '03':
                      - Sale
                      - Void
                      - Refund
                    '04':
                      - Sale
                      - Void
                      - Refund
                    '05':
                      - Sale
                      - Void
                      - Refund
                    '06':
                      - Sale
                      - Void
                      - Refund
                  updatedAt: '2023-06-10 05:08:14'
              required:
                - connMessageFormat
                - currency
              properties:
                profileName:
                  type: string
                connRequestTimeout:
                  type: number
                connMessageFormat:
                  type: string
                connTimeout:
                  type: number
                emvList:
                  type: object
                  properties:
                    '01':
                      type: array
                      items:
                        type: number
                    '02':
                      type: array
                      items:
                        type: number
                    '03':
                      type: array
                      items:
                        type: number
                    '04':
                      type: array
                      items:
                        type: number
                    '05':
                      type: array
                      items:
                        type: number
                    '06':
                      type: array
                      items:
                        type: number
                createdBy:
                  type: string
                connUrl:
                  type: string
                notifyUrl:
                  type: string
                  x-stoplight:
                    id: i20ot1hc5dih2
                currency:
                  type: string
                methodList:
                  type: object
                  properties:
                    '01':
                      type: array
                      items:
                        type: string
                    '02':
                      type: array
                      items:
                        type: string
                    '03':
                      type: array
                      items:
                        type: string
                    '04':
                      type: array
                      items:
                        type: string
                    '05':
                      type: array
                      items:
                        type: string
                    '06':
                      type: array
                      items:
                        type: string
      tags:
        - Acquirer Profile
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      security: []
  /emv:
    parameters: []
    get:
      summary: EMV List
      responses:
        '200':
          $ref: '#/components/responses/Emv-List'
      operationId: get-emv
      description: ''
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
      requestBody:
        content: {}
      tags:
        - EMV Profile
    post:
      summary: EMV Create
      operationId: post-emv
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  params:
                    aid: A000000003
                    appVersion: '0096'
                    clCVMLimit: 1000
                    clFloorLimit: 0
                    clTransLimit: 1000000
                    defaultDDOL: 039F3704
                    defaultTDOL: 0F9F02065F2A029A039C0195059F3704
                    isNewCVMRuleForMC: false
                    terminalRiskMgmtData: '00000000000000000000'
                    terminalTransactionQualifiers: '22804080'
                  emvName: test
                  paymentMethod: '01'
                  groupId: G-77936229
              required:
                - params
                - emvName
                - paymentMethod
                - groupId
              properties:
                params:
                  type: object
                  description: |-
                    ```
                    # visa example
                    {
                        "appVersion":"0096",
                        "clTransLimit":1000000,
                        "defaultDDOL":"039F3704",
                        "isNewCVMRuleForMC":false,
                        "clFloorLimit":0,
                        "terminalRiskMgmtData":"00000000000000000000",
                        "defaultTDOL":"0F9F02065F2A029A039C0195059F3704",
                        "clCVMLimit":1000,
                        "aid":"A000000003",
                        "terminalTransactionQualifiers":"26804080"
                    }
                    ```
                  properties:
                    aid:
                      type: string
                    appVersion:
                      type: string
                    clCVMLimit:
                      type: number
                    clFloorLimit:
                      type: number
                    clTransLimit:
                      type: number
                    defaultDDOL:
                      type: string
                    defaultTDOL:
                      type: string
                    isNewCVMRuleForMC:
                      type: boolean
                    terminalRiskMgmtData:
                      type: string
                    terminalTransactionQualifiers:
                      type: string
                emvName:
                  type: string
                paymentMethod:
                  type: string
                groupId:
                  type: string
            examples:
              params Example:
                value:
                  params:
                    aid: string
                    appVersion: string
                    clCVMLimit: 0
                    clFloorLimit: 0
                    clTransLimit: 0
                    defaultDDOL: string
                    defaultTDOL: string
                    isNewCVMRuleForMC: true
                    terminalRiskMgmtData: string
                    terminalTransactionQualifiers: string
                  emvName: string
                  paymentMethod: string
                  groupId: string
          application/xml:
            schema:
              type: object
              properties: {}
        description: ''
      tags:
        - EMV Profile
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      description: >
        | EMV AID Parameters | Object Key | Type | Comments |

        |---|---|---|---|

        | AID | aid | String | List of Application Identifiers (AID) |

        | App Version | appVersion | String | application version |

        | Terminal Transaction Qualifiers | terminalTransactionQualifiers |
        String | Not available for MC and Amex |

        | Contactless Floor Limit | clFloorLimit | Long | Contactless floor
        limit ,can keep it as 0 for online only |

        | Contactless Transaction Limit | clTransLimit | Long | Contactless
        transaction limit,transaction will be declined if auth amount is exceed
        this limit |

        | Contactless CVM Limit | clCVMLimit | Long | Contactless CVM limit,If
        the transaction amount is greater than or equal to the Reader CVM
        Required Limit, then the reader requires a CVM for the
        transaction,VISA/UPI/DISCOVER/JCB(greater or equal),MC/Amex(greater) |

        | Terminal Risk Management Data | terminalRiskMgmtData | String |
        Available for MC only |

        | Default DDOL | defaultDDOL | String | Dynamic Data Authentication Data
        Object List,,Can keep the value in json file as default or “039F3704“ |

        | Default TDOL | defaultTDOL | String | Default Transaction Certificate
        Data Object List,Can keep the value in json file as default or
        “0F9F02065F2A029A039C0195059F3704“ |

        | Kernel Configuration | kernelConfiguration | String | Tag DF811B
        Available for MC only |

        | Enable New MC CVM Rules | isNewCVMRuleForMC | boolean | Available for
        MC only,default is false |

        | CVM Capability – CVM Required | cvmCapabilityCVMRequired | String |
        Tag DF8118 |

        | CVM Capability – No CVM Required | cvmCapabilityNoCVM | String | Tag
        DF8119 |
  '/emv/{emvId}':
    parameters:
      - schema:
          type: string
        name: emvId
        in: path
        required: true
    delete:
      summary: EMV Delete
      operationId: delete-emv-emvId
      responses:
        '200':
          description: OK
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      tags:
        - EMV Profile
    put:
      summary: EMV Update
      operationId: put-emv-emvId
      responses:
        '200':
          description: OK
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  emvName: s2m-visa
                  createdAt: '2023-06-17 02:42:59'
                  createdBy: '100001'
                  groupId: G-77936229
                  paymentMethod: '01'
                  id: 15
                  params:
                    appVersion: '0096'
                    clTransLimit: 2000000
                    defaultDDOL: 039F3704
                    isNewCVMRuleForMC: false
                    clFloorLimit: 0
                    terminalRiskMgmtData: '00000000000000000000'
                    defaultTDOL: 0F9F02065F2A029A039C0195059F3704
                    clCVMLimit: 4000
                    aid: A000000003
                    terminalTransactionQualifiers: '26804080'
                  aid: A000000003
                  emvVersion: v1
                  updatedAt: '2023-06-17 03:13:19'
              properties:
                groupId:
                  type: string
                params:
                  type: object
                  required:
                    - clTransLimit
                    - clFloorLimit
                    - clCVMLimit
                    - terminalTransactionQualifiers
                  properties:
                    clTransLimit:
                      type: number
                    clFloorLimit:
                      type: number
                    clCVMLimit:
                      type: number
                    terminalTransactionQualifiers:
                      type: string
              required:
                - groupId
                - params
      tags:
        - EMV Profile
  /settlement:
    parameters: []
    get:
      summary: Settlement history
      operationId: get-settlement
      responses:
        '200':
          $ref: '#/components/responses/Settle'
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
        - schema:
            type: string
            format: date
          in: query
          name: createdStart
        - schema:
            type: string
            format: date
          in: query
          name: createdEnd
        - schema:
            type: string
          in: query
          name: batchId
        - $ref: '#/components/parameters/pageSize'
        - $ref: '#/components/parameters/pageNumber'
      description: ''
      tags:
        - Settlement
  '/settlement/{batchId}':
    parameters:
      - schema:
          type: string
        name: batchId
        in: path
        required: true
    get:
      summary: Settlement Detail
      operationId: get-settlement-batchid
      responses:
        '200':
          $ref: '#/components/responses/Settle-Detail'
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      description: ''
      tags:
        - Settlement
  /settlement/settle:
    parameters: []
    post:
      summary: Do Settlement
      operationId: post-settlement-settle
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  batchId: '100037'
                  groupId: G-84960272
              properties:
                batchId:
                  type: string
                groupId:
                  type: string
              required:
                - batchId
                - groupId
      tags:
        - Settlement
  /settlement/email:
    parameters: []
    post:
      summary: Settlement Email
      operationId: post-settlement-email
      responses:
        '200':
          $ref: '#/components/responses/Ok'
      parameters:
        - $ref: '#/components/parameters/Bearer-Token'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  batchId: '100037'
                  groupId: G-84960272
              properties:
                batchIds:
                  type: string
                  example: '[{ "batchId": "100128" }]'
                groupId:
                  type: string
                email:
                  type: string
                  x-stoplight:
                    id: t6aewm5ldni0b
                merchantId:
                  type: string
                  x-stoplight:
                    id: 6xlmg5x9qkozw
              required:
                - batchIds
                - groupId
                - email
                - merchantId
          application/xml:
            schema:
              type: object
              x-examples:
                Example 1:
                  email: hanzhen@theminesec.com
                  batchIds:
                    - batchId: '100037'
                  merchantId: M1687257224
                  groupId: G-84960272
              properties:
                email:
                  type: string
                batchIds:
                  type: array
                  items:
                    type: object
                    properties:
                      batchId:
                        type: string
                merchantId:
                  type: string
                groupId:
                  type: string
              required:
                - email
                - batchIds
                - merchantId
                - groupId
      tags:
        - Settlement
components:
  schemas:
    ProfilePaymentMethodBinding:
      type: object
      properties:
        paymentMethod:
          type: string
          description: Payment method.
          enum:
            - VISA
            - MASTERCARD
            - UNIONPAY
            - AMEX
            - JCB
            - DISCOVER
            - DINERS
            - ALIPAY
            - WECHAT
            - SHOPEE_PAY_QR
            - GRAB_PAY_QR
            - PAY_NOW
          example: VISA
        mchId:
          type: string
          description: merchant unique Id. (generated by MineSec)
          example: M1719393031
        groupId:
          type: string
          description: PBO unique Id.(generated by MineSec)
          example: G-01601130
        profileId:
          type: string
          description: acquire profile Id. (generated by MineSec)
          example: 316
    MerchantExtract:
      type: object
      properties:
        mchName:
          type: string
          description: merchant name
          example: Coffee Shop
        mchId:
          type: string
          description: merchant unique Id. generated by MineSec system.
          example: M1719393031
        providerReference:
          type: string
          description: >-
            PBO unique id for the merchant. If it is provided. it has to be
            unique per-merchant
          example: MID180045210008
        contactName:
          type: string
          description: contact name of merchant
          example: John.Haris
        contactEmail:
          type: string
          description: contact email of merchant
          example: John.Haris@CofeeShop.bz
        contactAddress:
          type: string
          description: >-
            contact address of merchant. the contact address (if it's set) will
            be presented in e-receipt.
          example: No.7 Rock Street Apt 567 Springfield IL 62174
        contactPhone:
          type: string
          description: contact phone of merchant
          example: 94635578
        mcc:
          type: string
          description: merchant category code ( refer to  ISO18245)
          example: 5812
        activated:
          type: boolean
          description: >-
            true - merchant is activated and allowed to do payment. false -
            merchant is inactivated and not allowed to do payment
        timeZone:
          type: string
          description: >-
            the timezone of merchant. if it is not provided. merchant timezone
            will be set to the same as PBO's timezone
          example: Asia/HongKong
        receiptLogo:
          type: string
          description: >-
            merchant logo URL or a base64-encoded image. It has to be a
            jpg/jpeg/png image.
          example: 'https://customer.website.link/merchant-log.png'
        extParams:
          type: object
          description: >-
            extra parameters. Each PBO has its own parameters. e.g MID/TID,
            SubMID,subTID,secret Token. MineSec will share a separated file for
            each PBO in terms of the data fields inside extParams
          example:
            MID: '1234567850001'
            TID: '0001252001'
            ZMKeyIndex: '0025114'
        terminalEmvParams:
          type: object
          description: >-
            EMV parameters for this merchant. if it's not provided. default
            setup will be used. Note:Update terminal parameters will not impact
            the settings for issued activation code.
          example:
            amexFloorLimit: '00000100'
            terminalCountryCode: '0840'
            txnCurrencyCode: '0840'
            amexExReaderCapability: 18E00003
            amexReaderCapability: C3
            terminalType: '21'
            terminalCapability: 0068C8
            ifdSN: '00001234'
            emvFlags: VMAUJDP
      required:
        - mchId
    MerchantRequest:
      type: object
      properties:
        mchName:
          type: string
          description: merchant name
          example: Coffee Shop
        providerReference:
          type: string
          description: >-
            provider reference. if it is provided. it has to be unique per
            merchant.
          example: MID180045210008
        profileId:
          type: string
          description: >-
            acquirer profile id. it's generated by MineSec when PBO
            initialization. If it is not provided,system will use the default
            profile Id under this PBO for the merchant
          example: 316
        contactName:
          type: string
          description: contact name of merchant.
          example: John.Haris
        contactEmail:
          type: string
          description: contact email of merchant.
          example: John.Haris@CofeeShop.bz
        contactAddress:
          type: string
          description: >-
            contact address of merchant. the contact address (if it's set) will
            be presented in e-receipt.
          example: No.7 Rock Street Apt 567 Springfield IL 62174
        contactPhone:
          type: string
          description: contact phone of merchant.
          example: 94635578
        mcc:
          type: string
          description: 4-digits merchant category code ( refer to  ISO18245). it's optional
          example: '5812 (Eating Places, Restaurants)'
        timeZone:
          type: string
          description: >-
            timeZone of merchant. if it is not provided. System will set it the
            same as PBO default timeZone.
          example: Asia/HongKong
        receiptLogo:
          type: string
          description: >-
            merchant logo URL or a base64-encoded image. It has to be a
            jpg/jpeg/png image.
          example: 'https://customer.website.link/merchant-log.png'
        supportedPaymentMethods:
          type: array
          description: >-
            set the payment methods allowed by this merchant. the listed payment
            methods has to be supported by the acquirer profile of the provided
            profileId. If it's not provided. the merchant will allow to use all
            payment methods under the specified profileId in default.
          items:
            type: string
            enum:
              - VISA
              - MASTERCARD
              - UNIONPAY
              - AMEX
              - JCB
              - DISCOVER
              - DINERS
              - ALIPAY
              - WECHAT
              - SHOPEE_PAY_QR
              - GRAB_PAY_QR
              - PAY_NOW
          example:
            - VISA
            - MASTERCARD
            - UNIONPAY
            - AMEX
            - JCB
            - DISCOVER
            - DINERS
            - ALIPAY
            - WECHAT
            - SHOPEE_PAY_QR
            - GRAB_PAY_QR
            - PAY_NOW
        extParams:
          type: object
          description: >-
            extra parameters. Each PBO has its own parameters. e.g MID/TID,
            SubMID,subTID,secret Token. MineSec will share a separated file for
            each PBO in terms of the data fields inside extParams
          example:
            MID: '1234567850001'
            TID: '0001252001'
            ZMKeyIndex: '0025114'
        terminalEmvParams:
          type: object
          description: >-
            EMV parameters for this merchant. if it's not provided. default
            setup will be used. Note:Update terminal parameters will not impact
            the settings for issued activation code.
          example:
            amexFloorLimit: '00000100'
            terminalCountryCode: '0840'
            txnCurrencyCode: '0840'
            amexExReaderCapability: 18E00003
            amexReaderCapability: C3
            terminalType: '21'
            terminalCapability: 0068C8
            ifdSN: '00001234'
            emvFlags: VMAUJDP
      required:
        - mchName
    Webhook:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 0d1f069d-43bb-489a-ad8c-7eb95592ba8e
          description: ID of the webhook
          readOnly: true
        name:
          type: string
          example: All events webhook
          description: Name of the webhook
        url:
          type: string
          format: uri
          example: 'https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e'
          description: URL the webhook will send events to
        events:
          type: array
          example:
            - meeting.started
            - meeting.ended
            - meeting.participantJoined
            - meeting.participantLeft
            - meeting.chatSynced
            - recording.statusUpdate
            - livestreaming.statusUpdate
          description: Events this webhook will send updates for
          items:
            type: string
            enum:
              - meeting.started
              - meeting.ended
              - meeting.participantJoined
              - meeting.participantLeft
              - meeting.chatSynced
              - recording.statusUpdate
              - livestreaming.statusUpdate
        created_at:
          type: string
          format: date-time
          example: '2022-05-28T07:01:53.075Z'
          description: Timestamp when this webhook was created
        updated_at:
          type: string
          format: date-time
          example: '2022-05-28T07:01:53.075Z'
          description: Timestamp when this webhook was updated
      required:
        - id
        - name
        - url
        - events
        - created_at
        - updated_at
    WebhookSuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/Webhook'
      required:
        - success
        - data
  responses:
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            type: object
            properties:
              msg:
                type: string
              code:
                type: number
            x-examples:
              Example 1:
                msg: Unauthorized
                code: 401
        application/xml:
          schema:
            type: object
            properties: {}
    Acquirer-List:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example 1:
                profileName: Phoebus Clebson Teste
                connRequestTimeout: 30000
                connExtraParams: ''
                groupId: G-17371558
                connMessageFormat: PH_JSON
                connTimeout: 3000
                connRetryCount: 1
                createdAt: '2024-06-03T12:27:27+0000'
                emvList: >-
                  {"01":[996],"02":[591],"03":[592],"04":[593],"05":[594],"06":[595],"07":[596]}
                connSync: 3000
                createdBy: '100101'
                profileId: 554
                connUrl: 'https://backendcertpaystore-eu.phoebus.com.br'
                notifyUrl: ''
                currency: USD
                methodList: >-
                  {"01":["Sale","Refund"],"02":["Sale","Refund"],"03":["Sale","Refund"],"04":["Sale","Refund"],"05":["Sale","Refund"],"06":["Sale","Refund"]}
                updatedAt: '2024-06-03T12:27:27+0000'
            properties:
              profileName:
                type: string
              connRequestTimeout:
                type: integer
              connExtraParams:
                type: string
              groupId:
                type: string
              connMessageFormat:
                type: string
              connTimeout:
                type: integer
              connRetryCount:
                type: integer
              emvList:
                type: string
              connSync:
                type: integer
              profileId:
                type: integer
              connUrl:
                type: string
              notifyUrl:
                type: string
              currency:
                type: string
              methodList:
                type: string
              createdBy:
                type: string
              createdAt:
                type: string
              updatedAt:
                type: string
        application/x-www-form-urlencoded:
          schema:
            type: object
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  Bearer-Token: >-
                    eyJhbGciOiJIUzUxMiJ9.eyJjYWNoZUtleSI6IlRPS0VOXzEwMDAwMF85ODUyMTgxNS1kNjYxLTQ3YzgtYTIzZS0zZGExYzU0ZGViOTQiLCJjcmVhdGVkIjoxNjgxODAzOTE3OTIwLCJzeXNVc2VySWQiOjEwMDAwMH0.kq3UazBJUWv4MhFFP1mwQyVcMbfeX5vx7Klve1vpLi0U-4U-A7mltJIdfSe1nd6IGNH-Q_wlscDeJW97vkMjKg
            properties:
              msg:
                type: string
              code:
                type: number
              data:
                type: object
    Ok:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              msg:
                type: string
              code:
                type: number
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
    Emv-List:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              msg:
                type: string
              code:
                type: number
              data:
                type: object
                properties:
                  total:
                    type: number
                  current:
                    type: number
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        emvName:
                          type: string
                        createdAt:
                          type: string
                        groupId:
                          type: string
                        paymentMethod:
                          type: string
                        id:
                          type: number
                        params:
                          type: string
                        emvVersion:
                          type: string
                        updatedAt:
                          type: string
                  hasNext:
                    type: boolean
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  total: 1
                  current: 1
                  records:
                    - emvName: dd
                      createdAt: '2023-04-12 10:10:58'
                      groupId: G-77936229
                      paymentMethod: dd
                      id: 1
                      params: dasss
                      emvVersion: dd
                      updatedAt: '2023-04-14 08:13:46'
                  hasNext: false
    Device-List:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              msg:
                type: string
              code:
                type: integer
              data:
                type: object
                properties:
                  total:
                    type: integer
                  current:
                    type: integer
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        deviceType:
                          type: string
                        appVersion:
                          type: string
                        deviceAdmin:
                          type: string
                        groupId:
                          type: string
                        extParams:
                          type: string
                          description: |-
                            {
                                "subMid": "000",
                                "clientId": "000",
                                "jwtSecret": "000",
                                "acqMid": "000",
                                "subTid": "000",
                                "mid": "000",
                                "acqTid": "000"
                            }
                        deviceId:
                          type: string
                        deviceName:
                          type: string
                        uuid:
                          type: string
                        deviceStatus:
                          type: integer
                        activesAt:
                          type: string
                        createdAt:
                          type: string
                        emvParams:
                          type: string
                        methodList:
                          type: string
                        updatedAt:
                          type: string
                        serverUrl:
                          type: string
                        customerId:
                          type: string
                        licenseId:
                          type: string
                        signKeyId:
                          type: string
                        cardBdkId:
                          type: string
                        profileId:
                          type: string
                        isDevice:
                          type: boolean
                  hasNext:
                    type: boolean
    Device-Code:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              msg:
                type: string
              code:
                type: number
              data:
                type: object
                properties:
                  activeCode:
                    type: string
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  activeCode: '501854254509'
    Mch-List:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              msg:
                type: string
              code:
                type: number
              data:
                type: object
                properties:
                  total:
                    type: number
                  current:
                    type: number
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        contactEmail:
                          type: string
                        contactName:
                          type: string
                        groupId:
                          type: string
                        receiptEmail:
                          type: number
                        mchName:
                          type: string
                        mcc:
                          type: string
                        type:
                          type: number
                        uuid:
                          type: string
                        createdAt:
                          type: string
                        transType:
                          type: string
                        createdBy:
                          type: string
                        receiptPrint:
                          type: number
                        receiptAutoPrint:
                          type: number
                        contactAddress:
                          type: string
                        state:
                          type: number
                        contactPhone:
                          type: string
                        region:
                          type: string
                        updatedAt:
                          type: string
                  hasNext:
                    type: boolean
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  total: 3
                  current: 1
                  records:
                    - contactEmail: eric.song@theminesec.com
                      contactName: '2222'
                      groupId: G-77936229
                      receiptEmail: 1
                      mchName: Eric
                      mcc: '2'
                      type: 2
                      uuid: M1681457865
                      createdAt: '2023-04-14 07:37:46'
                      transType: '["Refund","Pre-Auth","Void","Sale"]'
                      createdBy: '100000'
                      receiptPrint: 1
                      receiptAutoPrint: 1
                      contactAddress: '2'
                      state: 1
                      contactPhone: '2222'
                      region: '22'
                      updatedAt: '2023-04-14 11:27:23'
                    - contactEmail: stone.zhong@theminesec.com
                      contactName: '1111'
                      groupId: G-77936229
                      receiptEmail: 1
                      mchName: stone
                      mcc: '111'
                      type: 2
                      uuid: M1681457779
                      createdAt: '2023-04-14 07:36:21'
                      transType: '["Void","Refund","Sale"]'
                      createdBy: '100000'
                      receiptPrint: 1
                      receiptAutoPrint: 1
                      contactAddress: '1'
                      state: 1
                      contactPhone: '11111'
                      region: '1'
                      updatedAt: '2023-04-14 12:10:12'
                    - contactEmail: hanzhen@theminesec.com
                      contactName: test
                      groupId: G-77936229
                      receiptEmail: 1
                      mchName: test
                      mcc: dd
                      type: 2
                      uuid: M1681300442
                      createdAt: '2023-04-12 11:54:03'
                      transType: '["Sale","Void","Refund","Pre-Auth","Capture"]'
                      receiptPrint: 1
                      receiptAutoPrint: 1
                      contactAddress: dd
                      state: 1
                      contactPhone: dd
                      updatedAt: '2023-04-14 11:58:44'
                  hasNext: false
    Mch-Detail:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              msg:
                type: string
              code:
                type: number
              data:
                type: object
                properties:
                  groupId:
                    type: string
                  receiptEmail:
                    type: number
                  mcc:
                    type: string
                  type:
                    type: number
                  uuid:
                    type: string
                  createdAt:
                    type: string
                  contactAddress:
                    type: string
                  state:
                    type: number
                  updatedAt:
                    type: string
                  contactEmail:
                    type: string
                  contactName:
                    type: string
                  mchName:
                    type: string
                  transType:
                    type: string
                  emvList:
                    type: array
                    items:
                      type: string
                  receiptPrint:
                    type: number
                  profileId:
                    type: number
                  receiptAutoPrint:
                    type: number
                  contactPhone:
                    type: string
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  groupId: G-77936229
                  receiptEmail: 1
                  mcc: dd
                  type: 2
                  uuid: M1681300442
                  createdAt: '2023-04-12 11:54:03'
                  contactAddress: dd
                  state: 1
                  updatedAt: '2023-04-14 11:58:44'
                  contactEmail: hanzhen@theminesec.com
                  contactName: test
                  mchName: test
                  transType: '["Sale","Void","Refund","Pre-Auth","Capture"]'
                  emvList:
                    - '1'
                  receiptPrint: 1
                  profileId: 1
                  receiptAutoPrint: 1
                  contactPhone: dd
    OrderList:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  total: 17
                  current: 1
                  records:
                    - tranId: M1805869664354455554
                      amount:
                        currency: SGD
                        value: 332
                      approvalCode: '101785'
                      batchNo: '101393'
                      cvmPerformed: NO_CVM
                      appName: 4D617374657263617264
                      linkedTranId: M1805869664354455554
                      mchName: PBO User Shop
                      tsi: '4000'
                      acqTid: '001001'
                      rrn: '913383080339'
                      tc: 26B921B62E2D9D09
                      tranStatus: APPROVED
                      tranType: SALE
                      atc: 013A
                      tvr: '0020008001'
                      trace: '455554'
                      acqMid: '2024051717000'
                      accountMasked: '**** **** **** 0916'
                      sdkId: 515cd36f3f09bfc2
                      paymentMethod: MASTERCARD
                      hostMessageFormat: SIM_8583
                      aid: A0000000041010
                      entryMode: NFC
                  hasNext: false
            properties:
              msg:
                type: string
              code:
                type: integer
              data:
                type: object
                properties:
                  total:
                    type: integer
                  current:
                    type: integer
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        tranId:
                          type: string
                        amount:
                          type: object
                          properties:
                            currency:
                              type: string
                            value:
                              type: integer
                        approvalCode:
                          type: string
                        batchNo:
                          type: string
                        cvmPerformed:
                          type: string
                          description: |-
                            CvmPerformed {
                                NO_CVM,
                                SIGNATURE,
                                PIN,
                                CDCVM,
                            }
                        appName:
                          type: string
                        linkedTranId:
                          type: string
                        mchName:
                          type: string
                        tsi:
                          type: string
                        acqTid:
                          type: string
                        rrn:
                          type: string
                        tc:
                          type: string
                        tranStatus:
                          type: string
                          description: |-
                            TranStatus {
                                PROCESSING,
                                APPROVED,
                                DECLINED,
                                VOIDED,
                                REVERSED,
                                AUTH_ONLY,
                                ADJUSTED
                            }
                        tranType:
                          type: string
                          description: |-
                            TranType {
                                SALE,
                                REFUND,
                                AUTH,
                            }
                        atc:
                          type: string
                        tvr:
                          type: string
                        trace:
                          type: string
                        acqMid:
                          type: string
                        accountMasked:
                          type: string
                        sdkId:
                          type: string
                        paymentMethod:
                          type: string
                          description: |-
                            PaymentMethod {
                                VISA,
                                MASTERCARD,
                                UNIONPAY,
                                AMEX,
                                JCB,
                                DISCOVER,
                                DINERS,

                                // UNIONPAY_APP,
                                ALIPAY,
                                WECHAT,
                                VISA_QR,
                                MASTERCARD_QR,
                                UNIONPAY_QR,

                                // SG
                                SHOPEE_PAY_QR,
                                GRAB_PAY_QR,
                                PAY_NOW,

                                UNKNOWN;
                            }
                        hostMessageFormat:
                          type: string
                        aid:
                          type: string
                        entryMode:
                          type: string
                  hasNext:
                    type: boolean
    Order-Detail:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  tranId: M1805836344509984770
                  approvalCode: '498392'
                  cvmPerformed: NO_CVM
                  tsi: '4000'
                  tranStatus: VOIDED
                  tranType: SALE
                  atc: 013A
                  trace: '984770'
                  acqMid: '2024051717000'
                  callbackUrl: ''
                  entryMode: NFC
                  amount:
                    currency: SGD
                    value: 202
                  batchNo: '101392'
                  appName: 4D617374657263617264
                  linkedTranId: M1805836344509984770
                  mchName: PBO User Shop
                  acqTid: '001001'
                  rrn: '073666223223'
                  tc: 26B921B62E2D9D09
                  tvr: '0020008001'
                  accountMasked: '**** **** **** 0916'
                  sdkId: 515cd36f3f09bfc2
                  paymentMethod: MASTERCARD
                  hostMessageFormat: SIM_8583
                  actions:
                    - tranId: M1805836344509984770
                      actionType: Void
                      reason: Void
                      amount:
                        currency: SGD
                        value: 202
                      trace: '383681'
                      actionStatus: APPROVED
                      hostRespCode: '00'
                      actionId: R1805836662765383681
                  aid: A0000000041010
            properties:
              msg:
                type: string
              code:
                type: integer
              data:
                type: object
                properties:
                  tranId:
                    type: string
                  approvalCode:
                    type: string
                  cvmPerformed:
                    type: string
                    description: |-
                      CvmPerformed {
                          NO_CVM,
                          SIGNATURE,
                          PIN,
                          CDCVM,
                      }
                  tsi:
                    type: string
                  tranStatus:
                    type: string
                    description: |-
                      TranStatus {
                          PROCESSING,
                          APPROVED,
                          DECLINED,
                          VOIDED,
                          REVERSED,
                          AUTH_ONLY,
                          ADJUSTED
                      }
                  tranType:
                    type: string
                    description: |-
                      TranType {
                          SALE,
                          REFUND,
                          AUTH,
                      }
                  atc:
                    type: string
                  trace:
                    type: string
                  acqMid:
                    type: string
                  callbackUrl:
                    type: string
                  entryMode:
                    type: string
                  amount:
                    type: object
                    properties:
                      currency:
                        type: string
                      value:
                        type: integer
                  batchNo:
                    type: string
                  appName:
                    type: string
                  linkedTranId:
                    type: string
                  mchName:
                    type: string
                  acqTid:
                    type: string
                  rrn:
                    type: string
                  tc:
                    type: string
                  tvr:
                    type: string
                  accountMasked:
                    type: string
                  sdkId:
                    type: string
                  paymentMethod:
                    type: string
                    description: |-
                      PaymentMethod {
                          VISA,
                          MASTERCARD,
                          UNIONPAY,
                          AMEX,
                          JCB,
                          DISCOVER,
                          DINERS,

                          // UNIONPAY_APP,
                          ALIPAY,
                          WECHAT,
                          VISA_QR,
                          MASTERCARD_QR,
                          UNIONPAY_QR,

                          // SG
                          SHOPEE_PAY_QR,
                          GRAB_PAY_QR,
                          PAY_NOW,

                          UNKNOWN;
                      }
                  hostMessageFormat:
                    type: string
                  actions:
                    type: array
                    items:
                      type: object
                      properties:
                        tranId:
                          type: string
                        actionType:
                          type: string
                        reason:
                          type: string
                        amount:
                          type: object
                          properties:
                            currency:
                              type: string
                            value:
                              type: integer
                        trace:
                          type: string
                        actionStatus:
                          type: string
                        hostRespCode:
                          type: string
                        actionId:
                          type: string
                  aid:
                    type: string
    Settle:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  current: 1
                  total: 8
                  hitCount: false
                  pages: 1
                  optimizeCountSql: true
                  size: 10
                  maxLimit: null
                  records:
                    - paymentAmt: 51648
                      profileName: S2M-8583
                      profileMessage: S2M_8583
                      refundCount: 0
                      uuid: M1687257224
                      acquirerMid: '001007514956667'
                      groupId: G-84960272
                      mchName: S2M-Test
                      voidAmt: 0
                      batchId: '100037'
                      createdAt: '2023-07-06T11:35:12.547+00:00'
                      successTime: null
                      currency: USD
                      acquirerTid: '71001007'
                      state: 0
                      acquirerRefNo: null
                      acquirerCode: null
                      paymentCount: 12
                      refundAmt: 0
                      updatedAt: '2023-07-07T02:07:58.071+00:00'
                      voidCount: 0
                    - paymentAmt: 0
                      profileName: SIM_8583
                      profileMessage: SIM_8583
                      refundCount: 0
                      uuid: M1687935515
                      acquirerMid: '001007514956667'
                      groupId: G-84960272
                      mchName: S2M Shop
                      voidAmt: 0
                      batchId: '100033'
                      createdAt: '2023-07-05T09:35:27.449+00:00'
                      successTime: null
                      currency: USD
                      acquirerTid: '71001007'
                      state: 0
                      acquirerRefNo: null
                      acquirerCode: null
                      paymentCount: 0
                      refundAmt: 0
                      updatedAt: '2023-07-05T09:35:56.924+00:00'
                      voidCount: 0
                    - paymentAmt: 0
                      profileName: SIM_8583
                      profileMessage: SIM_8583
                      refundCount: 1
                      uuid: M1687935515
                      acquirerMid: '001007514956667'
                      groupId: G-84960272
                      mchName: S2M Shop
                      voidAmt: 0
                      batchId: '100032'
                      createdAt: '2023-07-05T09:13:05.547+00:00'
                      successTime: null
                      currency: USD
                      acquirerTid: '71001007'
                      state: 2
                      acquirerRefNo: '459895337119'
                      acquirerCode: null
                      paymentCount: 0
                      refundAmt: 1000000
                      updatedAt: '2023-07-05T09:13:16.426+00:00'
                      voidCount: 0
                    - paymentAmt: 200000
                      profileName: SIM_8583
                      profileMessage: SIM_8583
                      refundCount: 1
                      uuid: M1687935515
                      acquirerMid: '001007514956667'
                      groupId: G-84960272
                      mchName: S2M Shop
                      voidAmt: 0
                      batchId: '100028'
                      createdAt: '2023-07-05T08:29:08.094+00:00'
                      successTime: null
                      currency: USD
                      acquirerTid: '71001007'
                      state: 2
                      acquirerRefNo: '422455604794'
                      acquirerCode: null
                      paymentCount: 2
                      refundAmt: 1000000
                      updatedAt: '2023-07-05T08:34:00.477+00:00'
                      voidCount: 0
                    - paymentAmt: 2110000
                      profileName: SIM_8583
                      profileMessage: SIM_8583
                      refundCount: 2
                      uuid: M1687935515
                      acquirerMid: '001007514956667'
                      groupId: G-84960272
                      mchName: S2M Shop
                      voidAmt: 0
                      batchId: '100018'
                      createdAt: '2023-07-05T04:01:46.016+00:00'
                      successTime: null
                      currency: USD
                      acquirerTid: '71001007'
                      state: 2
                      acquirerRefNo: '546823033772'
                      acquirerCode: null
                      paymentCount: 6
                      refundAmt: 1500000
                      updatedAt: '2023-07-05T08:17:20.778+00:00'
                      voidCount: 0
                    - paymentAmt: 1400000
                      profileName: SIM_8583
                      profileMessage: SIM_8583
                      refundCount: 1
                      uuid: M1687935515
                      acquirerMid: '001007514956667'
                      groupId: G-84960272
                      mchName: S2M Shop
                      voidAmt: 0
                      batchId: '100015'
                      createdAt: '2023-07-05T03:50:03.831+00:00'
                      successTime: null
                      currency: USD
                      acquirerTid: '71001007'
                      state: 2
                      acquirerRefNo: '390625526908'
                      acquirerCode: null
                      paymentCount: 7
                      refundAmt: 200000
                      updatedAt: '2023-07-05T03:52:11.559+00:00'
                      voidCount: 0
                    - paymentAmt: 0
                      profileName: SIM_8583
                      profileMessage: SIM_8583
                      refundCount: 1
                      uuid: M1687935515
                      acquirerMid: '001007514956667'
                      groupId: G-84960272
                      mchName: S2M Shop
                      voidAmt: 0
                      batchId: '100013'
                      createdAt: '2023-07-05T03:05:03.640+00:00'
                      successTime: null
                      currency: USD
                      acquirerTid: '71001007'
                      state: 2
                      acquirerRefNo: '631744963333'
                      acquirerCode: null
                      paymentCount: 0
                      refundAmt: 2000000
                      updatedAt: '2023-07-05T03:36:46.538+00:00'
                      voidCount: 0
                    - paymentAmt: 5882000
                      profileName: SIM_8583
                      profileMessage: SIM_8583
                      refundCount: 0
                      uuid: M1687935515
                      acquirerMid: '001007514956667'
                      groupId: G-84960272
                      mchName: S2M Shop
                      voidAmt: 0
                      batchId: '100011'
                      createdAt: '2023-07-04T10:13:34.413+00:00'
                      successTime: null
                      currency: USD
                      acquirerTid: '71001007'
                      state: 2
                      acquirerRefNo: '385647662898'
                      acquirerCode: null
                      paymentCount: 13
                      refundAmt: 0
                      updatedAt: '2023-07-05T02:51:18.753+00:00'
                      voidCount: 0
                  searchCount: true
                  orders: []
                  countId: null
                sign: null
            properties:
              msg:
                type: string
              code:
                type: integer
              data:
                type: object
                properties:
                  current:
                    type: integer
                  total:
                    type: integer
                  pages:
                    type: integer
                  size:
                    type: integer
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        paymentAmt:
                          type: integer
                        profileName:
                          type: string
                        profileMessage:
                          type: string
                        refundCount:
                          type: integer
                        uuid:
                          type: string
                        acquirerMid:
                          type: string
                        groupId:
                          type: string
                        mchName:
                          type: string
                        voidAmt:
                          type: integer
                        batchId:
                          type: string
                        createdAt:
                          type: string
                        currency:
                          type: string
                        acquirerTid:
                          type: string
                        state:
                          type: integer
                          description: |-
                            WAIT_FOR_SETTLE: 0,
                            SETTLED: 1,
                            SETTLE_FAILED: 2
                        acquirerRefNo:
                          type: string
                        acquirerCode:
                          type: string
                        paymentCount:
                          type: integer
                        refundAmt:
                          type: integer
                        updatedAt:
                          type: string
                        voidCount:
                          type: integer
    Settle-Detail:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  paymentAmt: 51648
                  profileName: S2M-8583
                  profileMessage: S2M_8583
                  refundCount: 0
                  uuid: M1687257224
                  acquirerMid: '001007514956667'
                  groupId: G-84960272
                  mchName: S2M-Test
                  voidAmt: 0
                  batchId: '100037'
                  transactions:
                    - amount: 51648
                      transType: Sale
                      count: 12
                      paymentMethod: Visa
                  createdAt: '2023-07-06T11:35:12.547+00:00'
                  successTime: null
                  currency: USD
                  acquirerTid: '71001007'
                  state: 0
                  acquirerRefNo: null
                  acquirerCode: null
                  paymentCount: 12
                  refundAmt: 0
                  updatedAt: '2023-07-07T02:07:58.071+00:00'
                  voidCount: 0
                sign: null
            properties:
              msg:
                type: string
              code:
                type: integer
              data:
                type: object
                properties:
                  paymentAmt:
                    type: integer
                  profileName:
                    type: string
                  profileMessage:
                    type: string
                  refundCount:
                    type: integer
                  uuid:
                    type: string
                  acquirerMid:
                    type: string
                  groupId:
                    type: string
                  mchName:
                    type: string
                  voidAmt:
                    type: integer
                  batchId:
                    type: string
                  transactions:
                    type: array
                    items:
                      type: object
                      properties:
                        amount:
                          type: integer
                        transType:
                          type: string
                        count:
                          type: integer
                        paymentMethod:
                          type: string
                  createdAt:
                    type: string
                  successTime:
                    nullable: true
                  currency:
                    type: string
                  acquirerTid:
                    type: string
                  state:
                    type: integer
                    description: |-
                      WAIT_FOR_SETTLE: 0,
                      SETTLED: 1,
                      SETTLE_FAILED: 2
                  acquirerRefNo:
                    nullable: true
                  acquirerCode:
                    nullable: true
                  paymentCount:
                    type: integer
                  refundAmt:
                    type: integer
                  voidCount:
                    type: integer
    Mch-Payment:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              msg:
                type: string
              code:
                type: integer
              data:
                type: object
                properties:
                  total:
                    type: integer
                  current:
                    type: integer
                  records:
                    type: array
                    items:
                      type: object
                      properties:
                        profileName:
                          type: string
                        createdAt:
                          type: string
                        cfgType:
                          type: string
                        profileId:
                          type: integer
                        groupId:
                          type: string
                        paymentMethod:
                          type: string
                        cfgId:
                          type: string
                        uuid:
                          type: string
                  hasNext:
                    type: boolean
            x-examples:
              Example 1:
                msg: SUCCESS
                code: 0
                data:
                  total: 1
                  current: 1
                  records:
                    - profileName: SIM_8583
                      createdAt: '2024-01-26T13:28:49+0000'
                      cfgType: ACQ
                      profileId: 5
                      groupId: G-51705797
                      paymentMethod: all
                      cfgId: '5'
                      uuid: M1706275729
                  hasNext: false
  securitySchemes: {}
  requestBodies:
    Accquirer-post:
      content:
        application/json:
          schema:
            type: object
            x-examples:
              Example 1:
                state: 1
                profileName: test
                currency: USD
                connUrl: 'https://test.cusomter.com'
                connNll: '10'
                connMessageFormat: JSON
                connTimeout: '30'
                connSync: '30'
                connRetryCount: '2'
                batchNo: '109800'
                groupId: G-77936229
            properties:
              state:
                type: number
              profileName:
                type: string
              currency:
                type: string
              connUrl:
                type: string
              connNll:
                type: string
              connMessageFormat:
                type: string
              connTimeout:
                type: string
              connSync:
                type: string
              connRetryCount:
                type: string
              batchNo:
                type: string
              groupId:
                type: string
  parameters:
    Bearer-Token:
      name: Authorization
      in: header
      schema:
        type: string
      description: Bearer Token
      required: true
    pageNumber:
      name: pageNumber
      in: query
      required: false
      schema:
        type: number
      description: Default 1
    pageSize:
      name: pageSize
      in: query
      required: false
      schema:
        type: number
      description: 'Default 10,  query all use -1'
tags:
  - name: Acquirer Profile
  - name: EMV Profile
  - name: Terminal
  - name: Merchant
  - name: Transaction
  - name: Settlement
externalDocs:
  url: 'https://doc.mspayhub.com'
  description: ''
x-internal: false
