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

# Get delivery history



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/bila/webhooks/{id}/deliveries
openapi: 3.0.0
info:
  title: Bila Payment Gateway API
  description: |-

    Bila Payment Gateway API - A payment processing API for Africa.

    ## Overview

    This API provides payment gateway functionality for:
    - **Account Management**: Manage payment accounts/wallets
    - **Bank Operations**: Access bank reference data
    - **Account Resolution**: Verify bank and mobile money accounts
    - **Transfer Recipients**: Manage saved transfer recipients
    - **Transfers (Payouts)**: Send money to bank accounts and mobile money
    - **Collections (Receive Payments)**: Collect payments via mobile money
    - **Transaction History**: View all transactions

    ## Mobile Money Providers

    - Airtel Money
    - MTN Mobile Money (MoMo)
    - Zamtel Kwacha

    ## Countries Supported

    - Zambia (zm)
    - Nigeria (ng)

    ## Authentication

    Use your merchant API key in the `x-api-key` header.
    You can generate API keys from your merchant dashboard.

    ## Base URL

    ```
    https://api.usebila.com/api/v1
    ```

    For sandbox/testing:
    ```
    https://sandbox.usebila.com/api/v1
    ```
        
  version: '2.0'
  contact: {}
servers:
  - url: https://api.usebila.com
    description: Production
  - url: https://sandbox.usebila.com
    description: Sandbox
security:
  - x-api-key: []
tags:
  - name: Accounts
    description: Account/wallet management endpoints
  - name: Banks
    description: Bank reference data endpoints
  - name: Resolve
    description: Account resolution/verification endpoints
  - name: Transfer Recipients
    description: Transfer recipient management endpoints
  - name: Transfers
    description: Payout/transfer operation endpoints
  - name: Collections
    description: Payment collection operation endpoints
  - name: Transactions
    description: Transaction history endpoints
  - name: Webhooks
    description: Webhook configuration and delivery history
paths:
  /api/v1/bila/webhooks/{id}/deliveries:
    get:
      tags:
        - Webhooks
      summary: Get delivery history
      operationId: BilaWebhooksController_deliveries
      parameters:
        - name: id
          required: true
          in: path
          description: Webhook config UUID
          schema:
            example: 68f11209-451f-4a15-bfcd-d916eb8b09f4
            type: string
        - name: eventType
          required: false
          in: query
          description: Filter by event type
          schema:
            example: payment.completed
            type: string
        - name: status
          required: false
          in: query
          description: Filter by status (QUEUED, DELIVERED, FAILED, RETRYING)
          schema:
            example: DELIVERED
            type: string
        - name: startDate
          required: false
          in: query
          description: ISO 8601 start of createdAt range (inclusive)
          schema:
            example: '2026-04-01T00:00:00.000Z'
            type: string
        - name: endDate
          required: false
          in: query
          description: ISO 8601 end of createdAt range (inclusive)
          schema:
            example: '2026-04-30T23:59:59.999Z'
            type: string
        - name: page
          required: false
          in: query
          description: Page number
          schema:
            minimum: 1
            default: 1
            example: 1
            type: number
        - name: perPage
          required: false
          in: query
          description: Items per page
          schema:
            minimum: 1
            maximum: 100
            default: 20
            example: 20
            type: number
      responses:
        '200':
          description: Deliveries retrieved
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BilaResponseDto'
                  - properties:
                      data:
                        $ref: >-
                          #/components/schemas/PaginatedWebhookDeliveriesResponseDto
      security:
        - x-api-key: []
components:
  schemas:
    BilaResponseDto:
      type: object
      properties:
        status:
          type: boolean
          description: Request success status
          example: true
        message:
          type: string
          description: Response message
          example: Operation completed successfully
      required:
        - status
        - message
    PaginatedWebhookDeliveriesResponseDto:
      type: object
      properties:
        data:
          description: List of webhook deliveries
          type: array
          items:
            $ref: '#/components/schemas/WebhookDeliveryResponseDto'
        meta:
          description: Pagination metadata
          allOf:
            - $ref: '#/components/schemas/PaginationMetaDto'
      required:
        - data
        - meta
    WebhookDeliveryResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Delivery UUID
          example: 68f11209-451f-4a15-bfcd-d916eb8b09f6
          format: uuid
        webhookConfigId:
          type: string
          description: Webhook config UUID
          example: 68f11209-451f-4a15-bfcd-d916eb8b09f4
          format: uuid
        eventType:
          type: string
          description: Webhook event type
          example: payment.completed
        payload:
          type: object
          description: Event payload JSON as stored for delivery
          example:
            id: 68f11209-451f-4a15-bfcd-d916eb8b09f7
            transactionId: 68f11209-451f-4a15-bfcd-d916eb8b09f8
            amount: '100.50'
            status: COMPLETED
        status:
          type: string
          description: Delivery status
          enum:
            - QUEUED
            - DELIVERED
            - FAILED
            - RETRYING
          example: DELIVERED
        responseStatus:
          type: number
          description: HTTP status code from the merchant endpoint
          nullable: true
          example: 200
        responseBody:
          type: string
          description: Response body from the merchant endpoint (truncated)
          nullable: true
          example: '{"received":true}'
        attempts:
          type: number
          description: Number of delivery attempts
          example: 1
        maxAttempts:
          type: number
          description: Maximum delivery attempts
          example: 5
        deliveredAt:
          type: object
          description: When the delivery succeeded
          nullable: true
          format: date-time
          example: '2026-04-15T14:30:05.000Z'
        failedAt:
          type: object
          description: When the delivery permanently failed
          nullable: true
          format: date-time
          example: null
        nextRetryAt:
          type: object
          description: When the next retry is scheduled
          nullable: true
          format: date-time
          example: null
        createdAt:
          format: date-time
          type: string
          example: '2026-04-15T14:30:00.000Z'
      required:
        - id
        - webhookConfigId
        - eventType
        - payload
        - status
        - responseStatus
        - responseBody
        - attempts
        - maxAttempts
        - deliveredAt
        - failedAt
        - nextRetryAt
        - createdAt
    PaginationMetaDto:
      type: object
      properties:
        total:
          type: number
          description: Total number of records
          example: 150
        perPage:
          type: number
          description: Items per page
          example: 50
        currentPage:
          type: number
          description: Current page number
          example: 1
        pageCount:
          type: number
          description: Total number of pages
          example: 3
      required:
        - total
        - perPage
        - currentPage
        - pageCount
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Merchant API key (e.g., sk_live_xxx or sk_test_xxx)

````