«

GET /customer/transactions?walletCode={code} - Danh sách lịch sử giao dịch của khách hàng

  • Header: X-Tenant Authorization
  • Path: code : Tài khoản ví của khách hàng
    • Given Dịch vụ chấp nhận thanh toán qua các hình thức sau
      paymentMethodpaymentNamecurrenciesenabled
      sabomallTài khoản trả trước CBPayVND, CNHtrue
    • And Số dư trong ví của tài khoản "pamiuoi" có thông tin
      walletCodecurrencybalance
      walletCodeCNHCNH1000
      walletCodeVNDVND10000000
  • Tags: @manual

    Trả về status có 200 và response rỗng khi khách hàng chưa có giao dịch nào

    • Given Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" chưa có giao dịch nào
    • When Request có header là
      X-Tenantm26
    • And Gửi request "GET" đến "/customer/transactions?walletCode=<walletCode>"
    • Then Tôi nhận được response có HTTP Status 200
    • And Response có body thỏa mãn giá trị như sau
      []

    Examples:

    walletCode
    ${walletCodeCNH}
    ${walletCodeVND}
  • Trả về danh sách giao dịch theo tài khoản ví của khách hàng

    • Given Có token của tài khoản "pamiuoi"
    • And Khách hàng "pamiuoi" có giao dịch với thông tin
      mã giao dịchloại giao dịchtài khoản vísố tiềnnội dung
      GD1397REFUND<account>3000Tạo qua api
    • When Request có header là
      X-Tenantm26
    • And Gửi request "GET" đến "/customer/transactions?walletCode=<walletCode>"
    • Then Tôi nhận được response có HTTP Status 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "data": [
          {
            "txid": "${GD1397}",
            "type": "REFUND"
          }
        ]
      }

    Examples:

    walletCode account
    ${walletCodeCNH} walletCodeCNH
    ${walletCodeVND} walletCodeVND
  • Có thể tìm kiếm giao dịch theo mã đơn đối với ví CNH

    • Given Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH001Chờ thanh toán
    • And Khách hàng "pamiuoi" đã tạo mã thanh toán có thông tin
      Mã thanh toánMã đơn hàngLoại thanh toánLoại tiền tệMap order
      001DH001CREATE_ORDERCNHM1_001
    • And Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có giao dịch thành công với thông tin
      Mã giao dịchMã thanh toán
      GD_01001
    • When Request có header là
      X-Tenantm26
    • And Gửi request "GET" đến "/customer/transactions?walletCode=${walletCodeCNH}&key=${M1_001}"
    • Then Tôi nhận được response có HTTP Status 200
    • And Response có body thỏa mãn giá trị như sau
      {
          "total": 1,
          "pageIndex": 1,
          "sizeResponse": 1,
          "data": [
              {
                  "memo": "Đặt cọc cho đơn #${M1_001}",
                  "type": "CHARGE"
              }
          ]
      }
  • Không thể tìm kiếm giao dịch theo mã đơn đối với ví VND

    • Given Tài khoản "pamiuoi" đã có đơn hàng với thông tin
      Mã đơnTrạng thái
      DH001Chờ thanh toán
    • And Khách hàng "pamiuoi" đã tạo mã thanh toán có thông tin
      Mã thanh toánMã đơn hàngLoại thanh toánLoại tiền tệMap order
      001DH001CREATE_ORDERVNDM1_001
    • And Có token của tài khoản "pamiuoi"
    • And Tài khoản "pamiuoi" đã có giao dịch thành công với thông tin
      Mã giao dịchMã thanh toán
      GD_01001
    • When Request có header là
      X-Tenantm26
    • And Gửi request "GET" đến "/customer/transactions?walletCode=${walletCodeVND}&key=${M1_001}"
    • Then Tôi nhận được response có HTTP Status 200
    • And Response có body thỏa mãn giá trị như sau
      {
          "total": 0,
          "pageIndex": 1,
          "pageSize": 25,
          "sizeResponse": 0
      }
  • Có thể tìm kiếm giao dịch theo mã giao dịch

    • Given Có token của tài khoản "pamiuoi"
    • And Khách hàng "pamiuoi" có giao dịch với thông tin
      mã giao dịchloại giao dịchtài khoản vísố tiềnnội dung
      GD1397REFUND<account>3000Tạo qua api
    • When Request có header là
      X-Tenantm26
    • And Gửi request "GET" đến "/customer/transactions?walletCode=<walletCode>&key=${GD1397}"
    • Then Tôi nhận được response có HTTP Status 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "total": 1,
        "pageIndex": 1,
        "sizeResponse": 1,
        "data": [
          {
            "txid": "${GD1397}",
            "type": "REFUND"
          }
        ]
      }

    Examples:

    walletCode account
    ${walletCodeVND} walletCodeVND
    ${walletCodeCNH} walletCodeCNH
  • Có thể tìm kiếm giao dịch theo thời gian tạo

    • Given Có token của tài khoản "pamiuoi"
    • And Khách hàng "pamiuoi" có giao dịch với thông tin
      mã giao dịchloại giao dịchtài khoản vísố tiềnnội dungthời gian tạo
      GD1397REFUND<account>3000Tạo qua api2023-05-25T09:00:00.303Z
      GD1398REFUND<account>3000Tạo qua api2023-05-30T23:59:59.303Z
    • When Request có header là
      X-Tenantm26
    • And Gửi request "GET" đến "/customer/transactions?walletCode=<walletCode>" với params
      fromDate<fromDate>
      toDate<toDate>
    • Then Tôi nhận được response có HTTP Status 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "data": [
          {
            "txid": "${GD1397}",
            "type": "REFUND"
          },
          {
            "txid": "${GD1398}",
            "type": "REFUND"
          }
        ]
      }

    Examples:

    walletCode account fromDate toDate
    ${walletCodeVND} walletCodeVND 2023-05-25T09:00:00.303Z 2023-05-30T23:59:59.303Z
    ${walletCodeVND} walletCodeVND 2023-05-25T09:00:00.303Z
    ${walletCodeVND} walletCodeVND 2023-05-30T23:59:59.303Z
    ${walletCodeCNH} walletCodeCNH 2023-05-25T09:00:00.303Z 2023-05-30T23:59:59.303Z
    ${walletCodeCNH} walletCodeCNH 2023-05-25T09:00:00.303Z
    ${walletCodeCNH} walletCodeCNH 2023-05-30T23:59:59.303Z
  • Có thể tìm kiếm giao dịch theo loại giao dịch

    • Given Có token của tài khoản "pamiuoi"
    • And Khách hàng "pamiuoi" có giao dịch với thông tin
      mã giao dịchloại giao dịchtài khoản vísố tiềnnội dung
      GD1397REFUND<account>3000Tạo qua api
      GD1398JUSTIFY<account>3000Tạo qua api
    • When Request có header là
      X-Tenantm26
    • And Gửi request "GET" đến "/customer/transactions?walletCode=<walletCode>&type=<type>"
    • Then Tôi nhận được response có HTTP Status 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "data": [
          {
            "txid": "<txid>",
            "type": "<type>"
          }
        ]
      }

    Examples:

    type txid account walletCode
    REFUND ${GD1397} walletCodeVND ${walletCodeVND}
    JUSTIFY ${GD1398} walletCodeVND ${walletCodeVND}
    REFUND ${GD1397} walletCodeCNH ${walletCodeCNH}
    JUSTIFY ${GD1398} walletCodeCNH ${walletCodeCNH}
  • Danh sách giao dịch có thể phân trang hoặc giới hạn số lượng bản ghi giao dịch trên trang

    • Given Có token của tài khoản "pamiuoi"
    • And Khách hàng "pamiuoi" có giao dịch với thông tin
      mã giao dịchloại giao dịchtài khoản vísố tiềnnội dung
      GD1397REFUND<account>3000Tạo qua api
      GD1398REFUND<account>3000Tạo qua api
    • When Request có header là
      X-Tenantm26
    • And Gửi request "GET" đến "/customer/transactions?walletCode=<walletCode>" với params
      pageSize2
    • Then Tôi nhận được response có HTTP Status 200
    • And Response có body thỏa mãn giá trị như sau
      {
        "pageIndex": 1,
        "pageSize": 2,
        "sizeResponse": 2
      }

    Examples:

    walletCode account
    ${walletCodeVND} walletCodeVND
    ${walletCodeCNH} walletCodeCNH