> ## Documentation Index
> Fetch the complete documentation index at: https://help-plum.xoxoday.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Payment Report API

> Fetch payment/transaction history within a date range.

**Note:** This endpoint uses a top-level `"data"` key instead of `"variables"`. Fields are passed directly under `data` (not nested as `data.data`).

**Real URL:** `POST https://stagingstores.xoxoday.com/chef/v1/oauth/api`


| Parameter | Type    | Description                                  |
| :-------- | :------ | :------------------------------------------- |
| startDate | String  | the start date of the report                 |
| endDate   | String  | the end date to which the report is required |
| limit     | Integer | the number of entries that are required      |
| page      | Integer | define the pagination to extract the report  |

## Response

```json theme={null}
{
 "data": {
 "h-0": "Parameter",
 "h-1": "Type",
 "h-2": "Description",
 "0-0": "invoice_number",
 "0-1": "Integer",
 "0-2": "This parameter provides the unique Invocie number \nwhenever a Invoice is generated",
 "1-0": "reference_id",
 "1-1": "Integer",
 "1-2": "This parameter provides Order reference ID for any \ndeductions or refunds",
 "2-0": "date",
 "2-1": "string",
 "2-2": "This parameter provides the transaction date",
 "3-0": "reason",
 "3-1": "string",
 "3-2": "This parameter provides the reason of the \ntransaction like Funds added, Refunded, Brand \nVoucher Issued",
 "4-0": "adjusted_amount",
 "4-1": "Integer",
 "4-2": "This parameter provides the information on amount \nadded or deducted from the Balance",
 "5-0": "closing_balance",
 "5-1": "Integer",
 "5-2": "This parameter provides the information on the \nclosing balance after every transaction",
 "6-0": "transaction_status",
 "6-1": "String",
 "6-2": "This provides information if the transaction status is \neither Cancelled or Complete"
 },
 "cols": 3,
 "rows": 7,
 "align": [
 "left",
 "left",
 "left"
 ]
}
```


## OpenAPI

````yaml specs/rewards-lounge.yaml POST /paymentHistory
openapi: 3.0.3
info:
  title: Xoxoday Rewards API – Lounge
  version: '1.2'
  description: >
    Lounge API endpoints for browsing the lounge catalog, placing orders, and
    reporting.


    All operations dispatch to `POST /v1/oauth/api`. Virtual path suffixes are
    used

    for playground differentiation since OpenAPI does not allow multiple POST
    operations

    on the same path.


    **Host split:**

    - `getFilters`, `getBalance`, `paymentHistory` → `stagingstores.xoxoday.com`

    - `getLoungesCatalog`, `placeOrder`, `getOrderDetails`, `getOrderHistory` →
    `accounts.xoxoday.com`


    **Get Balance** sends parameters as URL query string (not request body).
servers:
  - url: https://stagingstores.xoxoday.com/chef/v1/oauth/api
    description: Sandbox
  - url: https://accounts.xoxoday.com/chef/v1/oauth/api
    description: Production
  - url: https://canvas.xoxoday.com/chef/v1/oauth/api
    description: Testing
security:
  - BearerAuth: []
tags:
  - name: Catalog
  - name: Orders
  - name: Reporting
paths:
  /paymentHistory:
    post:
      tags:
        - Reporting
      summary: Get Payment Report API
      description: >
        Fetch payment/transaction history within a date range.


        **Note:** This endpoint uses a top-level `"data"` key instead of
        `"variables"`. Fields are passed directly under `data` (not nested as
        `data.data`).


        **Real URL:** `POST https://stagingstores.xoxoday.com/chef/v1/oauth/api`
      operationId: loungePaymentHistory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - query
                - tag
                - data
              properties:
                query:
                  type: string
                  enum:
                    - plumProAPI.mutation.paymentHistory
                  default: plumProAPI.mutation.paymentHistory
                tag:
                  type: string
                  enum:
                    - plumProAPI
                  default: plumProAPI
                data:
                  type: object
                  properties:
                    startDate:
                      type: string
                      description: 'Start date. Format: `YYYY-MM-DD`.'
                      example: '2024-01-01'
                    endDate:
                      type: string
                      description: 'End date. Format: `YYYY-MM-DD`.'
                      example: '2024-01-30'
                    limit:
                      type: integer
                      description: Number of entries to return.
                      example: 100
                    page:
                      type: integer
                      description: Page number for pagination.
                      example: 1
            example:
              query: plumProAPI.mutation.paymentHistory
              tag: plumProAPI
              data:
                startDate: '2024-01-01'
                endDate: '2024-01-30'
                limit: 100
                page: 1
      responses:
        '200':
          description: Payment report returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      invoice_number:
                        type: integer
                        description: Unique invoice number.
                      reference_id:
                        type: integer
                        description: Order reference ID.
                      date:
                        type: string
                        description: Transaction date.
                      reason:
                        type: string
                        description: >-
                          Reason (e.g. Funds added, Refunded, Brand Voucher
                          Issued).
                      adjusted_amount:
                        type: integer
                        description: Amount added or deducted.
                      closing_balance:
                        type: integer
                        description: Closing balance after the transaction.
                      transaction_status:
                        type: string
                        description: '`Cancelled` or `Complete`.'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '502':
          $ref: '#/components/responses/BadGateway'
components:
  responses:
    Unauthorized:
      description: Missing or invalid access token.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Unauthorized
    BadGateway:
      description: Upstream service error.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer <access_token>`'

````