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

# Financial Reporting API

When a player makes a purchase, Appcharge processes the transaction. After the player is charged, Appcharge sends an update to the publisher with all the transaction details using a predefined webhook.

### Statuses Parameter Options

This table lists the possible values for the `statuses` parameter, each representing a different stage or outcome of a transaction. The values range from the initial creation of a transaction to the various stages of payment, refund, charge, and dispute processes.

| Status                                             | Description                                                                             |
| -------------------------------------------------- | --------------------------------------------------------------------------------------- |
| **created**                                        | The order has been created.                                                             |
| **payment\_pending**                               | The transaction has been initiated, but payment information has not yet been submitted. |
| **payment\_expired**                               | The checkout session has expired after being open for 1 hour.                           |
| **payment\_failed**                                | Failed to initiate a payment, and the award was not granted.                            |
| **payment\_refund\_pending**                       | Refund has been requested and is awaiting processing.                                   |
| **payment\_refund\_requires\_action**              | Additional action is needed to process the refund.                                      |
| **payment\_refunded**                              | Refund has been successfully processed.                                                 |
| **payment\_refund\_failed**                        | Refund attempt was unsuccessful.                                                        |
| **payment\_refund\_canceled**                      | Refund process has been canceled.                                                       |
| **payment\_canceled**                              | Payment has been canceled.                                                              |
| **charge\_pending**                                | The award is being processed but is not yet completed.                                  |
| **charge\_succeed**                                | Payment was successful, and the award was granted.                                      |
| **charge\_failed**                                 | The award attempt was unsuccessful.                                                     |
| **payment\_dispute\_open**                         | A dispute has been opened against the payment.                                          |
| **payment\_dispute\_lost**                         | The dispute has been resolved in favor of the customer.                                 |
| **payment\_dispute\_won**                          | The dispute has been resolved in favor of the merchant.                                 |
| **payment\_dispute\_evidence\_submitted**          | Evidence has been submitted for the dispute.                                            |
| **payment\_dispute\_inquiry\_open**                | An inquiry has been opened regarding a potential dispute.                               |
| **payment\_dispute\_inquiry\_evidence\_submitted** | Evidence has been submitted for the dispute inquiry.                                    |
| **payment\_dispute\_inquiry\_won**                 | The inquiry has been resolved in favor of the merchant.                                 |


## OpenAPI

````yaml openapi-financial-rep.json POST /reporting/reports/orders
openapi: 3.0.0
info:
  title: AppCharge API
  version: 1.0.0
servers:
  - url: https://api-sandbox.appcharge.com
security: []
paths:
  /reporting/reports/orders:
    post:
      summary: Get an Orders Report
      operationId: getOrdersReport
      parameters:
        - in: header
          name: x-publisher-token
          schema:
            type: string
          required: true
          description: The publisher token.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                startDate:
                  type: string
                  format: date-time
                  description: The start date of the query in UTC ISO 8601 time format.
                endDate:
                  type: string
                  format: date-time
                  description: The end date of the query in UTC ISO 8601 time format.
                recordLimit:
                  type: integer
                  description: The returned records limit to be used in pagination.
                offset:
                  type: integer
                  description: The bulk offset to be used in pagination.
                statuses:
                  type: array
                  items:
                    type: string
                    enum:
                      - created
                      - payment_pending
                      - payment_expired
                      - payment_failed
                      - payment_refund_pending
                      - payment_refund_requires_action
                      - payment_refunded
                      - payment_refund_failed
                      - payment_refund_canceled
                      - payment_canceled
                      - charge_pending
                      - charge_succeed
                      - charge_failed
                      - payment_dispute_open
                      - payment_dispute_lost
                      - payment_dispute_won
                      - payment_dispute_evidence_submitted
                      - payment_dispute_inquiry_open
                      - payment_dispute_inquiry_evidence_submitted
                      - payment_dispute_inquiry_won
                  description: >-
                    List of order statuses to filter by. Pass an empty list to
                    retrieve reports for all statuses.
                isFree:
                  type: boolean
                  description: >-
                    Query paid or free orders (false - query paid orders, true -
                    query free orders).
                  default: false
              required:
                - startDate
                - endDate
                - recordLimit
                - offset
                - statuses
      responses:
        '200':
          description: Get an Orders Report
          content:
            application/json:
              schema:
                type: object
                required:
                  - totalCount
                  - results
                properties:
                  totalCount:
                    type: integer
                    description: The total count of orders that were returned.
                  results:
                    type: array
                    items:
                      type: object
                      required:
                        - acOrderId
                        - publisherId
                        - currency
                        - currencyExchangeCost
                        - priceInCents
                        - priceInDollar
                        - priceNetInDollar
                        - subTotal
                        - originalPriceInDollar
                        - acOfferId
                        - publisherOfferId
                        - offerName
                        - createdAt
                        - playerId
                        - state
                        - offerDetails
                        - playerGeo
                        - tax
                        - taxInDollar
                        - paymentMethod
                        - zipCode
                        - playerEmail
                        - estimatedPublisherNetAmount
                        - estimatedAppchargeFee
                        - receiptId
                      properties:
                        acOrderId:
                          type: string
                          description: AppCharge order Id.
                        publisherId:
                          type: string
                          description: The publisher Id.
                        currency:
                          type: string
                          description: >-
                            The ISO 4217 currency code that the player paid
                            with.
                        currencyExchangeCost:
                          type: number
                          description: >-
                            The cost of the currency exchange, sent only if the
                            local currency requires a conversion to USD.
                        priceInCents:
                          type: number
                          description: >-
                            The player paid price amount in cents of the local
                            currency.
                        priceInDollar:
                          type: number
                          description: >-
                            The paid price without taxes converted in real-time
                            to USD dollars cents.
                        priceNetInDollar:
                          type: number
                          description: Price in dollar with no tax.
                        subTotal:
                          type: number
                          description: >-
                            The price paid by the player in their local currency
                            without taxes.
                        originalPriceInDollar:
                          type: number
                          description: The base price of the offer.
                        currencySymbol:
                          type: string
                        acOfferId:
                          type: string
                          description: AppCharge offer Id.
                        publisherOfferId:
                          type: string
                          description: The publisher offer Id as was reported to AppCharge.
                        offerName:
                          type: string
                          description: The name of the offer.
                        createdAt:
                          type: string
                          format: date-time
                          description: The time when the order was created, in UTC.
                        playerId:
                          type: string
                          description: The ID of the player that placed the order.
                        state:
                          type: string
                          description: The status of the order.
                        reason:
                          type: string
                          description: The reason in case of a failure.
                        offerDetails:
                          type: object
                          required:
                            - products
                          properties:
                            products:
                              type: array
                              items:
                                type: object
                                required:
                                  - name
                                  - publisherProductId
                                  - amount
                                  - price
                                properties:
                                  name:
                                    type: string
                                    description: The name of the product.
                                  publisherProductId:
                                    type: string
                                    description: >-
                                      The Id that the publisher assigned to the
                                      product.
                                  amount:
                                    type: number
                                    description: The quantity of the product.
                                  price:
                                    type: number
                                    description: The price point (in USD) of the offer.
                                  currencyCode:
                                    type: string
                                  description:
                                    type: string
                                  sku:
                                    type: string
                                    description: The SKU identifier for the product.
                                  type:
                                    type: string
                                    description: The type of the offer (e.g., 'offer').
                                  sessionMetadata:
                                    type: string
                                    description: Metadata related to the session.
                            playerGeo:
                              type: object
                              description: The geographical details of the player.
                        tax:
                          type: number
                          description: >-
                            The player paid tax amount in cents of the local
                            currency.
                        taxInDollar:
                          type: number
                          description: The player paid tax amount in cents in USD.
                        paymentMethod:
                          type: string
                          description: The payment method used by the player.
                        zipCode:
                          type: string
                          description: The player's postal code.
                        playerEmail:
                          type: string
                          description: The player's email address.
                        estimatedPublisherNetAmount:
                          type: number
                          description: >-
                            The estimated amount the publisher receives after
                            all deductions.
                        estimatedAppchargeFee:
                          type: number
                          description: The estimated Appcharge fee for the transaction.
                        receiptId:
                          type: string
                          description: The receipt identifier for the order.
                        discount:
                          type: number
                          description: >-
                            The discount amount in the currency the order was
                            placed in.
                        discountRatePoints:
                          type: number
                          description: The rate of the discount as a percentage.
                        promoCodeName:
                          type: string
                          description: The name of the promo code being applied
                        pricePointMetaData:
                          type: integer
                          description: The base price of the price point in USD cents.
        '400':
          description: Wrong payload - bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                  error:
                    type: string
                  message:
                    type: array
                    items:
                      type: object
                      properties:
                        validationErrorNumber:
                          type: integer
                        error:
                          type: string
                        requestUrl:
                          type: string

````