# invoice.expired webhook

POST 

Sent when an open checkout invoice reaches its TTL and transitions to `EXPIRED`.


Reference: https://docs.gwop.io/api-reference/gwop-api/webhooks/invoice-expired-webhook

## OpenAPI 3.1 Webhook Specification

```yaml
openapi: 3.1.0
info:
  title: Gwop API
  version: 1.0.0
paths: {}
webhooks:
  invoice-expired-webhook:
    post:
      operationId: invoice-expired-webhook
      summary: invoice.expired webhook
      description: >
        Sent when an open checkout invoice reaches its TTL and transitions to
        `EXPIRED`.
      parameters:
        - name: X-Gwop-Signature
          in: header
          description: Verify `HMAC_SHA256("{timestamp}.{raw_body}", webhook_secret)`.
          required: true
          schema:
            type: string
        - name: X-Gwop-Event-Id
          in: header
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Gwop-Event-Type
          in: header
          required: true
          schema:
            $ref: '#/components/schemas/WebhookEventType'
      responses:
        '200':
          description: Webhook received successfully
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InvoiceExpiredWebhookEvent'
components:
  schemas:
    WebhookEventType:
      type: string
      enum:
        - invoice.paid
        - invoice.expired
        - invoice.canceled
      title: WebhookEventType
    InvoiceExpiredWebhookEventEventType:
      type: string
      enum:
        - invoice.expired
      title: InvoiceExpiredWebhookEventEventType
    Timestamp:
      type: string
      format: date-time
      title: Timestamp
    UUID:
      type: string
      format: uuid
      title: UUID
    PublicInvoiceId:
      type: string
      title: PublicInvoiceId
    WebhookInvoiceDataStatus:
      type: string
      enum:
        - PAID
        - EXPIRED
        - CANCELED
      title: WebhookInvoiceDataStatus
    MoneyUsdcString:
      type: string
      description: >-
        USDC amount in atomic units as a numeric string. Used in webhook
        payloads and auth challenges. "1000000" = 1.00 USDC.
      title: MoneyUsdcString
    Currency:
      type: string
      enum:
        - USDC
      title: Currency
    WebhookExpiredInvoiceDataStatus:
      type: string
      enum:
        - EXPIRED
      title: WebhookExpiredInvoiceDataStatus
    WebhookExpiredInvoiceData:
      type: object
      properties:
        invoice_id:
          $ref: '#/components/schemas/UUID'
          description: Merchant-side invoice UUID
        public_invoice_id:
          $ref: '#/components/schemas/PublicInvoiceId'
          description: Payer-facing invoice ID (`inv_*`)
        merchant_id:
          $ref: '#/components/schemas/UUID'
        status:
          $ref: '#/components/schemas/WebhookExpiredInvoiceDataStatus'
        amount_usdc:
          $ref: '#/components/schemas/MoneyUsdcString'
        currency:
          $ref: '#/components/schemas/Currency'
        merchant_reference:
          type: string
      required:
        - invoice_id
        - public_invoice_id
        - merchant_id
        - status
        - amount_usdc
        - currency
      title: WebhookExpiredInvoiceData
    InvoiceExpiredWebhookEvent:
      type: object
      properties:
        event_id:
          type: string
          format: uuid
        event_type:
          $ref: '#/components/schemas/InvoiceExpiredWebhookEventEventType'
        event_version:
          type: integer
        created_at:
          $ref: '#/components/schemas/Timestamp'
        data:
          $ref: '#/components/schemas/WebhookExpiredInvoiceData'
      required:
        - event_id
        - event_type
        - event_version
        - created_at
        - data
      title: InvoiceExpiredWebhookEvent

```