> ## Documentation Index
> Fetch the complete documentation index at: https://dodopayments-mintlify-external-integration-datafast-autosen.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Event

> Get an event by its ID.



## OpenAPI

````yaml get /events/{event_id}
openapi: 3.1.0
info:
  title: public
  description: ''
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 1.61.5
servers:
  - url: https://test.dodopayments.com/
    description: Test Mode Server Host
  - url: https://live.dodopayments.com/
    description: Live Mode Server Host
security: []
tags:
  - name: Products
  - name: Payments
  - name: Subscriptions
  - name: Addons
  - name: Customers
  - name: Refunds
  - name: Disputes
  - name: Events
  - name: License Keys
  - name: Licenses
  - name: Discounts
  - name: Meters
  - name: Outgoing Webhooks
  - name: Checkout
  - name: Webhook Events
paths:
  /events/{event_id}:
    get:
      tags:
        - Events
      summary: Retrieve a specific event by its unique ID
      description: >-
        Fetch detailed information about a single event using its unique event
        ID. This endpoint is useful for:

        - Debugging specific event ingestion issues

        - Retrieving event details for customer support

        - Validating that events were processed correctly

        - Getting the complete metadata for an event


        ## Event ID Format:

        The event ID should be the same value that was provided during event
        ingestion via the `/events/ingest` endpoint.

        Event IDs are case-sensitive and must match exactly.


        ## Response Details:

        The response includes all event data including:

        - Complete metadata key-value pairs

        - Original timestamp (preserved from ingestion)

        - Customer and business association

        - Event name and processing information


        ## Example Usage:

        ```text

        GET /events/api_call_12345

        ```
      operationId: get_event_by_id
      parameters:
        - name: event_id
          in: path
          description: >-
            Unique event identifier (case-sensitive, must match the ID used
            during ingestion)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Event retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: >-
            Event not found - no event exists with the specified ID for your
            business
        '422':
          description: Unprocessable entity - invalid event ID format
      security:
        - API_KEY: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import DodoPayments from 'dodopayments';

            const client = new DodoPayments({
              bearerToken: 'My Bearer Token',
            });

            const event = await client.usageEvents.retrieve('event_id');

            console.log(event.business_id);
        - lang: Python
          source: |-
            from dodopayments import DodoPayments

            client = DodoPayments(
                bearer_token="My Bearer Token",
            )
            event = client.usage_events.retrieve(
                "event_id",
            )
            print(event.business_id)
        - lang: Go
          source: |
            package main

            import (
              "context"
              "fmt"

              "github.com/dodopayments/dodopayments-go"
              "github.com/dodopayments/dodopayments-go/option"
            )

            func main() {
              client := dodopayments.NewClient(
                option.WithBearerToken("My Bearer Token"),
              )
              event, err := client.UsageEvents.Get(context.TODO(), "event_id")
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", event.BusinessID)
            }
        - lang: Java
          source: >-
            package com.dodopayments.api.example;


            import com.dodopayments.api.client.DodoPaymentsClient;

            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient;

            import com.dodopayments.api.models.usageevents.Event;

            import
            com.dodopayments.api.models.usageevents.UsageEventRetrieveParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    DodoPaymentsClient client = DodoPaymentsOkHttpClient.fromEnv();

                    Event event = client.usageEvents().retrieve("event_id");
                }
            }
        - lang: Kotlin
          source: >-
            package com.dodopayments.api.example


            import com.dodopayments.api.client.DodoPaymentsClient

            import com.dodopayments.api.client.okhttp.DodoPaymentsOkHttpClient

            import com.dodopayments.api.models.usageevents.Event

            import
            com.dodopayments.api.models.usageevents.UsageEventRetrieveParams


            fun main() {
                val client: DodoPaymentsClient = DodoPaymentsOkHttpClient.fromEnv()

                val event: Event = client.usageEvents().retrieve("event_id")
            }
        - lang: Ruby
          source: |-
            require "dodopayments"

            dodo_payments = Dodopayments::Client.new(
              bearer_token: "My Bearer Token",
              environment: "test_mode" # defaults to "live_mode"
            )

            event = dodo_payments.usage_events.retrieve("event_id")

            puts(event)
components:
  schemas:
    Event:
      type: object
      required:
        - event_id
        - business_id
        - customer_id
        - event_name
        - timestamp
      properties:
        business_id:
          type: string
        customer_id:
          type: string
        event_id:
          type: string
        event_name:
          type: string
        metadata:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/EventMetadata'
        timestamp:
          type: string
          format: date-time
    EventMetadata:
      type: object
      title: EventMetadata
      description: >-
        Arbitrary key-value metadata. Values can be string, integer, number, or
        boolean.
      additionalProperties:
        oneOf:
          - type: string
            title: String
          - type: integer
            title: Integer
            format: int64
          - type: number
            title: Number
            format: double
          - type: boolean
            title: Boolean
        title: Event Metadata Value
        description: Metadata value can be a string, integer, number, or boolean
  securitySchemes:
    API_KEY:
      type: http
      scheme: bearer

````