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

# Get the timeline of an invoice

> Every recorded event of the invoice, oldest first: creation, payment attempts per gateway, status changes, deliveries, emails, refunds, disputes and webhook calls, each with its time and actor.



## OpenAPI

````yaml /openapi.json get /dev/v1/invoices/{uniqid}/timeline
openapi: 3.0.3
info:
  title: Shoppex Developer API
  description: Mintlify-compatible Developer API reference for Shoppex.
  version: 1.0.0
  contact:
    name: Shoppex Support
    email: support@shoppex.io
    url: https://shoppex.io
servers:
  - url: https://api.shoppex.io
security:
  - bearerAuth: []
paths:
  /dev/v1/invoices/{uniqid}/timeline:
    get:
      tags:
        - Invoices
      summary: Get the timeline of an invoice
      description: >-
        Every recorded event of the invoice, oldest first: creation, payment
        attempts per gateway, status changes, deliveries, emails, refunds,
        disputes and webhook calls, each with its time and actor.
      operationId: getDevV1InvoicesByUniqidTimeline
      parameters:
        - name: uniqid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - events
                    properties:
                      events:
                        type: array
                        description: Oldest first.
                        items:
                          type: object
                          required:
                            - id
                            - type
                            - occurred_at
                            - actor
                            - status
                            - previous_status
                            - gateway
                            - amount
                            - currency
                            - previous_amount
                            - line_item_id
                            - product_title
                            - recipient
                            - sender
                            - template
                            - channel
                            - origin
                            - field
                            - reason
                            - reference
                            - outcome
                            - note
                            - webhook
                            - discord
                            - serial_pairs
                            - ends_at
                            - previous_ends_at
                            - file_name
                            - country
                          properties:
                            id:
                              type: string
                              description: >-
                                Stable id of the event, unique within the
                                invoice.
                            type:
                              type: string
                              enum:
                                - created
                                - total_changed
                                - payment_started
                                - payment_failed
                                - payment_cancelled
                                - payment_held
                                - payment_notice_missing
                                - marked_paid
                                - status_changed
                                - voided
                                - line_delivered
                                - shipped
                                - email_queued
                                - email_sent
                                - keys_revealed
                                - downloaded
                                - downloads_extended
                                - downloads_reset
                                - downloads_revoked
                                - downloads_restored
                                - access_granted
                                - access_revoked
                                - member_removal
                                - refund_requested
                                - dispute_opened
                                - dispute_won
                                - dispute_lost
                                - buyer_details_changed
                                - note_edited
                                - webhook
                            occurred_at:
                              type: string
                              format: date-time
                              description: When it happened, ISO 8601 in UTC.
                            actor:
                              type: object
                              description: >-
                                Who caused the event; null when the source
                                recorded nobody.
                              nullable: true
                              required:
                                - type
                                - user_id
                                - name
                              properties:
                                type:
                                  type: string
                                  enum:
                                    - merchant
                                    - support
                                    - api
                                    - buyer
                                    - provider
                                    - system
                                user_id:
                                  type: string
                                  description: >-
                                    The team member who acted; only on merchant
                                    actors.
                                  nullable: true
                                name:
                                  type: string
                                  description: The team member's name, username or email.
                                  nullable: true
                              additionalProperties: false
                            status:
                              type: string
                              description: >-
                                The invoice status the event set
                                (status_changed, voided, dispute_lost).
                              nullable: true
                            previous_status:
                              type: string
                              description: The status before, when recorded.
                              nullable: true
                            gateway:
                              type: string
                              description: >-
                                Payment gateway of the payment, refund or
                                dispute.
                              nullable: true
                            amount:
                              type: string
                              description: >-
                                Decimal amount in `currency`: the charge,
                                refund, disputed amount or new total.
                              nullable: true
                            currency:
                              type: string
                              description: >-
                                ISO 4217 currency of `amount` and
                                `previous_amount`.
                              nullable: true
                            previous_amount:
                              type: string
                              description: The total before a total_changed event.
                              nullable: true
                            line_item_id:
                              type: string
                              description: The order line the event concerns.
                              nullable: true
                            product_title:
                              type: string
                              description: Product title of a delivered line.
                              nullable: true
                            recipient:
                              type: string
                              description: >-
                                Email address of an email_queued or email_sent
                                event.
                              nullable: true
                            sender:
                              type: string
                              description: >-
                                Who sent a payment_held payment, as PayPal
                                reported it: the name in its email, or the
                                payer's email on IPN.
                              nullable: true
                            template:
                              type: string
                              description: Email template of an email_sent event.
                              nullable: true
                            channel:
                              type: string
                              description: >-
                                Access channel (discord, telegram), reveal
                                surface, download kind, where a replacement key
                                came from (stock, typed), or how PayPal reported
                                a held payment (ipn, email).
                              nullable: true
                            origin:
                              type: string
                              description: >-
                                Where a created invoice was placed (STOREFRONT,
                                DASHBOARD, API, ...).
                              nullable: true
                            field:
                              type: string
                              description: >-
                                The buyer detail that changed (customer_email,
                                shipping_address).
                              nullable: true
                            reason:
                              type: string
                              description: >-
                                Dispute reason, the reason code of a replacement
                                (REPLACEMENT_ISSUED), or the reversal (refund,
                                chargeback) that revoked downloads.
                              nullable: true
                            reference:
                              type: string
                              description: >-
                                Provider or carrier reference: dispute id,
                                refund id, PayPal transaction id or tracking
                                code.
                              nullable: true
                            outcome:
                              type: string
                              description: >-
                                Result of the step: refund request state, failed
                                for a failed access or email step, or for
                                member_removal kicked, already_left, kept
                                (another paid order still gives the buyer a role
                                on that server) or failed.
                              nullable: true
                            note:
                              type: string
                              description: The note recorded with the event.
                              nullable: true
                            webhook:
                              type: object
                              nullable: true
                              required:
                                - event
                                - url
                                - status
                                - attempts
                                - response_code
                                - error_message
                              properties:
                                event:
                                  type: string
                                url:
                                  type: string
                                  description: Endpoint origin and path.
                                  nullable: true
                                status:
                                  type: string
                                  description: >-
                                    PENDING and PROCESSING are still being sent
                                    (retries included); FAILED gave up.
                                  enum:
                                    - PENDING
                                    - PROCESSING
                                    - SUCCESS
                                    - FAILED
                                attempts:
                                  type: number
                                response_code:
                                  type: number
                                  nullable: true
                                error_message:
                                  type: string
                                  description: >-
                                    The endpoint's error text; null without
                                    permission to view delivered goods, which an
                                    endpoint can echo.
                                  nullable: true
                              additionalProperties: false
                            discord:
                              type: object
                              description: 'Discord rows only: what the step acted on.'
                              nullable: true
                              required:
                                - server_id
                                - role_id
                                - member_handle
                                - cause
                                - failure
                              properties:
                                server_id:
                                  type: string
                                  description: The Discord server id.
                                role_id:
                                  type: string
                                  description: >-
                                    The role given or removed; null on
                                    member_removal.
                                  nullable: true
                                member_handle:
                                  type: string
                                  description: >-
                                    The buyer's Discord username as their login
                                    recorded it.
                                  nullable: true
                                cause:
                                  type: string
                                  description: >-
                                    Why access ended (access_revoked,
                                    member_removal).
                                  nullable: true
                                  enum:
                                    - full_refund
                                    - lost_chargeback
                                    - dispute_opened
                                    - subscription_ended
                                failure:
                                  type: string
                                  description: Why a member_removal failed.
                                  nullable: true
                                  enum:
                                    - missing_permission
                                    - bot_not_installed
                                    - discord_error
                              additionalProperties: false
                            serial_pairs:
                              type: array
                              description: >-
                                The keys of a REPLACEMENT_ISSUED or
                                REPLACEMENT_REVERTED status change.
                              nullable: true
                              items:
                                type: object
                                required:
                                  - serial_id
                                  - replaced_serial_id
                                properties:
                                  serial_id:
                                    type: string
                                    description: >-
                                      A key the replacement handed out or took
                                      back.
                                  replaced_serial_id:
                                    type: string
                                    description: >-
                                      The key it replaced; null when not
                                      recorded.
                                    nullable: true
                                additionalProperties: false
                            ends_at:
                              type: string
                              description: >-
                                downloads_extended: the new end of downloads;
                                null opens them with no end date.
                              nullable: true
                            previous_ends_at:
                              type: string
                              description: 'downloads_extended: the end before the change.'
                              nullable: true
                            file_name:
                              type: string
                              description: >-
                                downloaded: the file; null without permission to
                                view delivered goods.
                              nullable: true
                            country:
                              type: string
                              description: >-
                                downloaded: the buyer's two-letter country, when
                                known.
                              nullable: true
                          additionalProperties: false
                    additionalProperties: false
                additionalProperties: true
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '404':
          description: Response for status 404
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '422':
          description: Response for status 422
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
        '429':
          description: Response for status 429
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: array
                        items:
                          type: object
                          required:
                            - field
                            - message
                          properties:
                            field:
                              type: string
                            message:
                              type: string
                          additionalProperties: true
                      subcode:
                        type: string
                    additionalProperties: true
                additionalProperties: true
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use your Shoppex API key in the Authorization header.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.