> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payluk.ng/llms.txt
> Use this file to discover all available pages before exploring further.

# Get payment history

> Returns the authenticated merchant customer's transaction history: money in and out across deposits, withdrawals, transfers, wallet transfers, and escrow payments. Each entry carries the amount, fee, status, type, and the type-specific detail object (`withdrawalDetails`, `walletDetails`, `escrowDetails`, etc.) for the matching transaction type.

By default the response is **paginated** (`{ pagination, data }`). Supplying any filter (`reference`, `fromDate`, or `toDate`) instead returns a **flat array** of the matching transactions. Requires the `customer-id` header.



## OpenAPI

````yaml openapi.json GET /v1/payment/history
openapi: 3.0.3
info:
  title: Payluk ThirdParty API
  version: 1.0.0
  description: >-
    Merchant / Business API for the Payluk escrow and payments platform.


    All routes are mounted under `/v1` and authenticated with a secret key.
    Every response uses the standard envelope `{ status, message, data }`.
  contact:
    name: Payluk Developer Support
    email: support@payluk.ng
    url: https://payluk.ng
servers:
  - url: https://staging.api.payluk.ng
    description: 'Staging: use sk_test_ keys here for safe testing'
  - url: https://api.payluk.ng
    description: 'Production: use sk_live_ keys'
security:
  - bearerAuth: []
tags:
  - name: Escrow
    description: Create and manage standard escrow payment links.
  - name: Milestone Escrow
    description: Escrows that release funds in parts as milestones are confirmed.
  - name: Vault Escrow
    description: >-
      Merchant-only pooled-stake escrows: customers stake from their wallets and
      the merchant declares the winner.
  - name: Categories
    description: Organise escrows into merchant-defined categories.
  - name: Merchant Customers
    description: Manage the buyers and sellers that transact under your merchant account.
  - name: Disputes
    description: Confirm deliveries, raise disputes and resolve them.
  - name: Payments
    description: Fund wallets and escrows, verify references and manage payout details.
  - name: Debit Cards
    description: List and remove customers' saved debit cards.
  - name: Crypto Whitelist
    description: Manage whitelisted crypto withdrawal addresses.
  - name: Misc
    description: Supporting reference data.
paths:
  /v1/payment/history:
    get:
      tags:
        - Payments
      summary: Get payment history
      description: >-
        Returns the authenticated merchant customer's transaction history: money
        in and out across deposits, withdrawals, transfers, wallet transfers,
        and escrow payments. Each entry carries the amount, fee, status, type,
        and the type-specific detail object (`withdrawalDetails`,
        `walletDetails`, `escrowDetails`, etc.) for the matching transaction
        type.


        By default the response is **paginated** (`{ pagination, data }`).
        Supplying any filter (`reference`, `fromDate`, or `toDate`) instead
        returns a **flat array** of the matching transactions. Requires the
        `customer-id` header.
      operationId: getPaymentHistory
      parameters:
        - $ref: '#/components/parameters/CustomerIdHeader'
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 0
          description: Page number for the paginated (unfiltered) response.
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - deposit
              - withdrawal
              - transfer
              - wallet_transfer
              - escrow
          description: Filter by transaction type.
        - name: reference
          in: query
          required: false
          schema:
            type: string
          description: Filter by a specific reference. Returns a flat array.
        - name: fromDate
          in: query
          required: false
          schema:
            type: string
            format: date
          description: Start of a date range (inclusive). Returns a flat array.
        - name: toDate
          in: query
          required: false
          schema:
            type: string
            format: date
          description: End of a date range (inclusive). Returns a flat array.
      responses:
        '200':
          description: >-
            Transactions retrieved. Paginated by default; a flat array when a
            filter is supplied.
          content:
            application/json:
              example:
                status: 200
                message: Transactions retrieved successfully
                data:
                  pagination:
                    count: 4
                    pages: 1
                    isLastPage: true
                    nextPage: null
                    previousPage: null
                  data:
                    - id: 694967685589d47015d23b27
                      amount: 1015
                      reference: '79994766547485'
                      fee: 15
                      transactionType: escrow
                      currency: NGN
                      transferDetails: null
                      depositDetails: null
                      walletDetails: null
                      withdrawalDetails: null
                      escrowDetails:
                        beneficiary:
                          name: Mary Patrick
                          phone: '08101264901'
                        description: Watches
                        amount: 1000
                        fee: 15
                        paymentToken: PY_zAPRJikk4252
                        purpose: Boxes
                        channel: API
                        callbackUrl: null
                      metadata: null
                      status: success
                      creditType: debit
                      createdAt: '2025-12-22T15:44:40.023Z'
                      updatedAt: '2025-12-22T15:44:41.260Z'
                    - id: 6949648e5589d47015d23ad3
                      amount: 1000
                      reference: 7ws5Gix7McIVYOoFqpR
                      fee: 0
                      transactionType: escrow
                      currency: NGN
                      transferDetails: null
                      depositDetails: null
                      walletDetails: null
                      withdrawalDetails: null
                      escrowDetails:
                        beneficiary:
                          name: Mary Patrick
                          phone: '08101264901'
                        description: Watches
                        amount: 1000
                        fee: 15
                        paymentToken: PY_bOffh0Ee2407
                        purpose: Boxes
                        channel: API
                        callbackUrl: null
                      metadata: null
                      status: success
                      creditType: credit
                      createdAt: '2025-12-22T15:32:30.903Z'
                      updatedAt: '2025-12-22T15:32:30.903Z'
                    - id: 694946c7cb570eeef762877f
                      amount: 1015
                      reference: '9364766547485'
                      fee: 15
                      transactionType: escrow
                      currency: NGN
                      transferDetails: null
                      depositDetails: null
                      walletDetails: null
                      withdrawalDetails: null
                      escrowDetails:
                        beneficiary:
                          name: Mary Patrick
                          phone: '08101264901'
                        description: Watches
                        amount: 1000
                        fee: 15
                        paymentToken: PY_bOffh0Ee2407
                        purpose: Boxes
                        channel: API
                        callbackUrl: null
                      metadata: null
                      status: success
                      creditType: debit
                      createdAt: '2025-12-22T13:25:27.501Z'
                      updatedAt: '2025-12-22T13:25:28.770Z'
                    - id: 6948fd20cb570eeef76286a4
                      amount: 1015
                      reference: '9500364766547485'
                      fee: 15
                      transactionType: escrow
                      currency: NGN
                      transferDetails: null
                      depositDetails: null
                      walletDetails: null
                      withdrawalDetails: null
                      escrowDetails:
                        beneficiary:
                          name: Mary Patrick
                          phone: '08101264901'
                        description: >-
                          Black Titanium, White Titanium, Natural Titanium,
                          Desert Titanium


                          Titanium design

                          Latest-generation Ceramic Shield front

                          Textured matt glass back
                        amount: 1000
                        fee: 15
                        paymentToken: PY_KrWLqPd90314
                        purpose: iPhone 13 Pro Max
                        channel: API
                        callbackUrl: null
                      metadata: null
                      status: success
                      creditType: debit
                      createdAt: '2025-12-22T08:11:12.605Z'
                      updatedAt: '2025-12-22T08:11:13.903Z'
components:
  parameters:
    CustomerIdHeader:
      name: customer-id
      in: header
      required: true
      description: The merchant customer this request acts on behalf of.
      schema:
        type: string
      example: 665f1b2c9a1e4d0012ab3c01
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your secret key as a Bearer token. The key prefix selects the
        environment: `sk_test_...` (test) or `sk_live_...` (live).

````