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

# Events - List

> List all Events associated with a Merchant Account or Profile.



## OpenAPI

````yaml get /events/{merchant_id}
openapi: 3.0.3
info:
  title: Vaultera Switch - API Documentation
  description: >

    ## Get started


    Vaultera Switch provides a collection of APIs that enable you to process and
    manage payments.

    Our APIs accept and return JSON in the HTTP body, and return standard HTTP
    response codes.


    You can consume the APIs directly using your favorite HTTP/REST library.


    We have a testing environment referred to "sandbox", which you can setup to
    test API calls without

    affecting production data.

    Currently, our sandbox environment is live while our production environment
    is under development

    and will be available soon.

    You can sign up on our Dashboard to get API keys to access Vaultera Switch
    API.


    ### Environment


    Use the following base URLs when making requests to the APIs:


    | Environment   |  Base URL                          |

    |---------------|------------------------------------|

    | Sandbox       | <https://sandbox.test.switch.vaultera.co>   |

    | Production    | <https://api.test.switch.vaultera.co>       |


    ## Authentication


    When you sign up on our [dashboard](https://app.test.switch.vaultera.co) and
    create a merchant

    account, you are given a secret key (also referred as api-key) and a
    publishable key.

    You may authenticate all API requests with Vaultera Switch server by
    providing the appropriate key in

    the request Authorization header.


    | Key             | 
    Description                                                                                 
    |

    |-----------------|-----------------------------------------------------------------------------------------------|

    | api-key         | Private key. Used to authenticate all API requests from
    your merchant server                  |

    | publishable key | Unique identifier for your account. Used to authenticate
    API requests from your app's client  |


    Never share your secret api keys. Keep them guarded and secure.
  contact:
    name: Vaultera Switch Support
    url: https://vaultera.co
    email: support@vaultera.co
  license:
    name: Apache-2.0
  version: 0.1.0
servers:
  - url: https://api.test.switch.vaultera.co
    description: Sandbox Environment
  - url: https://api.switch.vaultera.co
    description: Sandbox Environment
security: []
tags:
  - name: Merchant Account
    description: Create and manage merchant accounts
  - name: Profile
    description: Create and manage profiles
  - name: Merchant Connector Account
    description: Create and manage merchant connector accounts
  - name: Payments
    description: Create and manage one-time payments, recurring payments and mandates
  - name: Refunds
    description: Create and manage refunds for successful payments
  - name: Mandates
    description: Manage mandates
  - name: Customers
    description: Create and manage customers
  - name: Payment Methods
    description: Create and manage payment methods of customers
  - name: Disputes
    description: Manage disputes
  - name: API Key
    description: Create and manage API Keys
  - name: Payouts
    description: Create and manage payouts
  - name: payment link
    description: Create payment link
  - name: Routing
    description: Create and manage routing configurations
  - name: Event
    description: Manage events
paths:
  /events/{merchant_id}:
    get:
      tags:
        - Event
      summary: Events - List
      description: List all Events associated with a Merchant Account or Profile.
      operationId: List all Events associated with a Merchant Account or Profile
      parameters:
        - name: merchant_id
          in: path
          description: The unique identifier for the Merchant Account.
          required: true
          schema:
            type: string
        - name: created_after
          in: query
          description: >-
            Only include Events created after the specified time. Either only
            `object_id` must be specified, or one or more of `created_after`,
            `created_before`, `limit` and `offset` must be specified.
          required: false
          schema:
            type: string
            format: date-time
            nullable: true
        - name: created_before
          in: query
          description: >-
            Only include Events created before the specified time. Either only
            `object_id` must be specified, or one or more of `created_after`,
            `created_before`, `limit` and `offset` must be specified.
          required: false
          schema:
            type: string
            format: date-time
            nullable: true
        - name: limit
          in: query
          description: >-
            The maximum number of Events to include in the response. Either only
            `object_id` must be specified, or one or more of `created_after`,
            `created_before`, `limit` and `offset` must be specified.
          required: false
          schema:
            type: integer
            format: int64
            nullable: true
        - name: offset
          in: query
          description: |-
            The number of Events to skip when retrieving the list of Events.
                                       Either only `object_id` must be specified, or one or more of `created_after`, `created_before`, `limit` and `offset` must be specified.
          required: false
          schema:
            type: integer
            format: int64
            nullable: true
        - name: object_id
          in: query
          description: >-
            Only include Events associated with the specified object (Payment
            Intent ID, Refund ID, etc.). Either only `object_id` must be
            specified, or one or more of `created_after`, `created_before`,
            `limit` and `offset` must be specified.
          required: false
          schema:
            type: string
            nullable: true
        - name: profile_id
          in: query
          description: >-
            Only include Events associated with the Profile identified by the
            specified Profile ID.
          required: false
          schema:
            type: string
            nullable: true
        - name: is_delivered
          in: query
          description: Only include Events which are ultimately delivered to the merchant.
          required: false
          schema:
            type: boolean
            nullable: true
      responses:
        '200':
          description: List of Events retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TotalEventsResponse'
      security:
        - admin_api_key: []
components:
  schemas:
    TotalEventsResponse:
      type: object
      description: The response body of list initial delivery attempts api call.
      required:
        - events
        - total_count
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventListItemResponse'
          description: The list of events
        total_count:
          type: integer
          format: int64
          description: Count of total events
    EventListItemResponse:
      type: object
      description: The response body for each item when listing events.
      required:
        - event_id
        - merchant_id
        - profile_id
        - object_id
        - event_type
        - event_class
        - initial_attempt_id
        - created
      properties:
        event_id:
          type: string
          description: The identifier for the Event.
          example: evt_018e31720d1b7a2b82677d3032cab959
          maxLength: 64
        merchant_id:
          type: string
          description: The identifier for the Merchant Account.
          example: y3oqhf46pyzuxjbcn2giaqnb44
          maxLength: 64
        profile_id:
          type: string
          description: The identifier for the Business Profile.
          example: SqB0zwDGR5wHppWf0bx7GKr1f2
          maxLength: 64
        object_id:
          type: string
          description: The identifier for the object (Payment Intent ID, Refund ID, etc.)
          example: QHrfd5LUDdZaKtAjdJmMu0dMa1
          maxLength: 64
        event_type:
          $ref: '#/components/schemas/EventType'
        event_class:
          $ref: '#/components/schemas/EventClass'
        is_delivery_successful:
          type: boolean
          description: Indicates whether the webhook was ultimately delivered or not.
          nullable: true
        initial_attempt_id:
          type: string
          description: >-
            The identifier for the initial delivery attempt. This will be the
            same as `event_id` for

            the initial delivery attempt.
          example: evt_018e31720d1b7a2b82677d3032cab959
          maxLength: 64
        created:
          type: string
          format: date-time
          description: Time at which the event was created.
          example: '2022-09-10T10:11:12Z'
    EventType:
      type: string
      enum:
        - payment_succeeded
        - payment_failed
        - payment_processing
        - payment_cancelled
        - payment_authorized
        - payment_captured
        - action_required
        - refund_succeeded
        - refund_failed
        - dispute_opened
        - dispute_expired
        - dispute_accepted
        - dispute_cancelled
        - dispute_challenged
        - dispute_won
        - dispute_lost
        - mandate_active
        - mandate_revoked
        - payout_success
        - payout_failed
        - payout_initiated
        - payout_processing
        - payout_cancelled
        - payout_expired
        - payout_reversed
    EventClass:
      type: string
      enum:
        - payments
        - refunds
        - disputes
        - mandates
        - payouts
  securitySchemes:
    admin_api_key:
      type: apiKey
      in: header
      name: api-key
      description: >-
        Admin API keys allow you to perform some privileged actions such as
        creating a merchant account and Merchant Connector account.

````