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

# Get the webhook event envelope schema

> Returns a representative example of the signed webhook payload every endpoint receives. Useful when building and type-checking a webhook handler; the live `type` will be one of the values from `event-types`.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/sdk/webhooks/event-schema
openapi: 3.0.0
info:
  contact: {}
  description: The SolvaPay REST API specification
  title: SolvaPay REST API
  version: '1.0'
servers: []
security: []
tags: []
paths:
  /v1/sdk/webhooks/event-schema:
    get:
      tags:
        - Webhooks
      summary: Get the webhook event envelope schema
      description: >-
        Returns a representative example of the signed webhook payload every
        endpoint receives. Useful when building and type-checking a webhook
        handler; the live `type` will be one of the values from `event-types`.
      operationId: WebhookSdkController_getEventSchema
      parameters: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEventDto'
          description: ''
      security:
        - SecretKey: []
components:
  schemas:
    WebhookEventDto:
      properties:
        api_version:
          description: API version that produced the event payload.
          example: '2024-01-01'
          type: string
        created:
          description: Unix timestamp (seconds) when the event was created.
          example: 1717000000
          type: number
        data:
          allOf:
            - $ref: '#/components/schemas/WebhookEventDataDto'
          description: Event payload envelope.
        id:
          description: Unique event ID.
          example: evt_1A2B3C4D
          type: string
        livemode:
          description: True for live-mode events, false for sandbox.
          example: true
          type: boolean
        request:
          allOf:
            - $ref: '#/components/schemas/WebhookEventRequestDto'
          description: Context about the triggering API request.
        type:
          $ref: '#/components/schemas/WebhookEventType'
          example: purchase.created
      required:
        - id
        - type
        - created
        - api_version
        - data
        - livemode
        - request
      type: object
    WebhookEventDataDto:
      properties:
        object:
          additionalProperties: true
          description: The resource that the event relates to.
          type: object
        previous_attributes:
          additionalProperties: true
          description: For *.updated events, the previous values of changed attributes.
          nullable: true
          type: object
      required:
        - object
      type: object
    WebhookEventRequestDto:
      properties:
        id:
          description: ID of the API request that triggered the event.
          nullable: true
          type: object
        idempotency_key:
          description: Idempotency key of the triggering request.
          nullable: true
          type: object
      required:
        - id
        - idempotency_key
      type: object
    WebhookEventType:
      description: Event type.
      enum:
        - customer.created
        - customer.updated
        - customer.deleted
        - purchase.created
        - purchase.activated
        - purchase.updated
        - purchase.trial_ending
        - purchase.trial_converted
        - purchase.suspended
        - purchase.past_due
        - purchase.cancellation_scheduled
        - purchase.cancelled
        - purchase.reactivated
        - purchase.expired
        - purchase.renewed
        - purchase.renewal_reminder
        - purchase.refunded
        - purchase.plan_changed
        - payment.succeeded
        - payment.failed
        - payment.refunded
        - payment.refund_failed
        - payment.refund_pending
        - payment.canceled
        - payment.disputed
        - payment.dispute_closed
        - payout.paid
        - payout.failed
        - checkout_session.created
        - checkout_session.completed
        - checkout_session.expired
        - customer.credit.topped_up
        - customer.credit.low_balance
        - customer.credit.exhausted
        - customer.credit.debited
        - customer.credit.granted
        - customer.credit.adjusted
        - customer.credit.auto_topup_failed
        - usage.charged
        - usage.recorded
        - usage.reset
        - product.created
        - product.updated
        - product.archived
        - plan.created
        - plan.updated
        - plan.archived
      type: string
  securitySchemes:
    SecretKey:
      bearerFormat: JWT
      description: >-
        Provider secret API key (sk_live_… / sk_test_…) supplied as a Bearer
        token.
      scheme: bearer
      type: http

````