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

# Send test webhook by body

> Sends one signed test delivery using `webhookId` in the request body. This endpoint is equivalent to `POST /v1/webhooks/{webhookId}/test`.



## OpenAPI

````yaml /openapi/payfi-v1.json post /v1/webhooks/test
openapi: 3.0.0
info:
  title: PayFi Partner API
  description: >-
    Partner API for PayFi compliance document automation. Dashboard Partner
    access is the admin role for exactly one partner integration; public API
    requests remain authenticated with signed partner API keys.
  version: 0.1.0
  contact: {}
servers:
  - url: https://sandbox.payfi.global
    description: Sandbox
  - url: https://api.payfi.global
    description: Production
security: []
tags:
  - name: Customers
    description: Signed partner endpoints for customer records.
  - name: Operations
    description: Signed partner endpoints for operations, documents, and upload completion.
  - name: Webhooks
    description: Partner-managed webhook endpoints and signed callback tests.
paths:
  /v1/webhooks/test:
    post:
      tags:
        - Webhooks
      summary: Send test webhook by body
      description: >-
        Sends one signed test delivery using `webhookId` in the request body.
        This endpoint is equivalent to `POST /v1/webhooks/{webhookId}/test`.
      operationId: WebhooksController_testByBody
      parameters: []
      requestBody:
        required: true
        description: Webhook test options.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookTestByBodyRequest'
            examples:
              defaultEvent:
                value:
                  webhookId: whe_example
              actionRequired:
                value:
                  webhookId: whe_example
                  event: operation.action_required
      responses:
        '201':
          description: Test delivery attempted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookTestResponse'
              examples:
                analysisCompleted:
                  value:
                    webhookDeliveryId: whd_example
                    status: DELIVERED
                    responseStatus: 204
                    attemptedAt: '2026-05-20T12:00:00.000Z'
                    samplePayload:
                      eventId: evt_example
                      eventType: operation.analysis.completed
                      event: operation.analysis.completed
                      operationId: op_example
                      externalOperationId: acme-op-123
                      partnerOperationId: acme-op-123
                      status: READY_FOR_MANUAL_REVIEW
                      decisionPackId: dp_example
                      decisionSummary:
                        score: 8.2
                        riskLevel: LOW
                        recommendedStatus: READY_FOR_MANUAL_REVIEW
                        blockingReasons: []
                        actionItemsCount: 0
                      score0To100: 82
                      score1To10: 9
                      riskLevel: medium
                      missingDocumentTypes: []
                      actionRequired: false
                      manualApprovalRequired: true
                      analysisRunId: job_example
                      manualReviewDecision: null
                      processedAt: '2026-05-20T12:00:00.000Z'
                      occurredAt: '2026-05-20T12:00:00.000Z'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalidRequest:
                  value:
                    error:
                      code: INVALID_REQUEST
                      message: The request payload is invalid.
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  value:
                    error:
                      code: UNAUTHORIZED
                      message: Authentication failed.
      security:
        - PayFiApiKey: []
          PayFiNonce: []
          PayFiSignature: []
          PayFiIdempotencyKey: []
components:
  schemas:
    WebhookTestByBodyRequest:
      type: object
      properties:
        webhookId:
          type: string
          example: whe_example
        event:
          type: string
          enum:
            - operation.created
            - operation.requirements.ready
            - operation.documents.partial
            - operation.analysis.completed
            - operation.action_required
            - operation.manual_review.completed
            - operation.callback.failed
          example: operation.analysis.completed
      required:
        - webhookId
    WebhookTestResponse:
      type: object
      properties:
        webhookDeliveryId:
          type: string
          example: whd_example
        status:
          type: string
          example: DELIVERED
        responseStatus:
          type: number
          example: 204
        attemptedAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
        samplePayload:
          $ref: '#/components/schemas/WebhookEventPayload'
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: INVALID_SIGNATURE
            message:
              type: string
              example: The request signature is invalid.
    WebhookEventPayload:
      oneOf:
        - $ref: '#/components/schemas/WebhookOperationCreatedPayload'
        - $ref: '#/components/schemas/WebhookRequirementsReadyPayload'
        - $ref: '#/components/schemas/WebhookDocumentsPartialPayload'
        - $ref: '#/components/schemas/WebhookAnalysisCompletedPayload'
        - $ref: '#/components/schemas/WebhookActionRequiredPayload'
        - $ref: '#/components/schemas/WebhookManualReviewCompletedPayload'
        - $ref: '#/components/schemas/WebhookCallbackFailedPayload'
      discriminator:
        propertyName: event
        mapping:
          operation.created:
            $ref: '#/components/schemas/WebhookOperationCreatedPayload'
          operation.requirements.ready:
            $ref: '#/components/schemas/WebhookRequirementsReadyPayload'
          operation.documents.partial:
            $ref: '#/components/schemas/WebhookDocumentsPartialPayload'
          operation.analysis.completed:
            $ref: '#/components/schemas/WebhookAnalysisCompletedPayload'
          operation.action_required:
            $ref: '#/components/schemas/WebhookActionRequiredPayload'
          operation.manual_review.completed:
            $ref: '#/components/schemas/WebhookManualReviewCompletedPayload'
          operation.callback.failed:
            $ref: '#/components/schemas/WebhookCallbackFailedPayload'
    WebhookOperationCreatedPayload:
      type: object
      properties:
        eventId:
          type: string
          example: evt_example
        eventType:
          type: string
          enum:
            - operation.created
          example: operation.created
        event:
          type: string
          enum:
            - operation.created
          example: operation.created
        operationId:
          type: string
          example: op_example
        externalOperationId:
          type: string
          example: acme-op-123
        partnerOperationId:
          type: string
          example: acme-op-123
        status:
          type: string
          enum:
            - REQUIREMENTS_PENDING
          example: REQUIREMENTS_PENDING
        decisionPackId:
          type: string
          nullable: true
          example: dp_example
        decisionSummary:
          type: object
          properties:
            score:
              type: number
              nullable: true
              example: 8.2
            riskLevel:
              type: string
              enum:
                - LOW
                - MEDIUM
                - HIGH
                - CRITICAL
              nullable: true
              example: LOW
            recommendedStatus:
              type: string
              enum:
                - ACTION_REQUIRED
                - READY_FOR_MANUAL_REVIEW
              nullable: true
              example: READY_FOR_MANUAL_REVIEW
            blockingReasons:
              type: array
              items:
                type: string
              example: []
            actionItemsCount:
              type: number
              example: 0
        score0To100:
          type: number
          nullable: true
          example: null
        score1To10:
          type: number
          nullable: true
          example: null
        riskLevel:
          type: string
          nullable: true
          example: null
        missingDocumentTypes:
          type: array
          items:
            type: string
            enum:
              - invoice
              - bill_of_lading
              - packing_list
              - di_duimp
              - bank_details
              - proforma
              - service_contract
              - insurance_policy
            example: invoice
          example: []
        actionRequired:
          type: boolean
          example: false
        manualApprovalRequired:
          type: boolean
          example: false
        analysisRunId:
          type: string
          nullable: true
          example: null
        manualReviewDecision:
          type: string
          enum:
            - approved
            - rejected
            - changes_requested
          nullable: true
          example: null
        processedAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
        occurredAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
      required:
        - event
        - operationId
        - partnerOperationId
        - status
        - score0To100
        - score1To10
        - riskLevel
        - missingDocumentTypes
        - actionRequired
        - manualApprovalRequired
        - analysisRunId
        - manualReviewDecision
        - processedAt
    WebhookRequirementsReadyPayload:
      type: object
      properties:
        eventId:
          type: string
          example: evt_example
        eventType:
          type: string
          enum:
            - operation.requirements.ready
          example: operation.requirements.ready
        event:
          type: string
          enum:
            - operation.requirements.ready
          example: operation.requirements.ready
        operationId:
          type: string
          example: op_example
        externalOperationId:
          type: string
          example: acme-op-123
        partnerOperationId:
          type: string
          example: acme-op-123
        status:
          type: string
          enum:
            - REQUIREMENTS_REVIEW_REQUIRED
            - AWAITING_DOCUMENTS
          example: REQUIREMENTS_REVIEW_REQUIRED
        decisionPackId:
          type: string
          nullable: true
          example: dp_example
        decisionSummary:
          type: object
          properties:
            score:
              type: number
              nullable: true
              example: 8.2
            riskLevel:
              type: string
              enum:
                - LOW
                - MEDIUM
                - HIGH
                - CRITICAL
              nullable: true
              example: LOW
            recommendedStatus:
              type: string
              enum:
                - ACTION_REQUIRED
                - READY_FOR_MANUAL_REVIEW
              nullable: true
              example: READY_FOR_MANUAL_REVIEW
            blockingReasons:
              type: array
              items:
                type: string
              example: []
            actionItemsCount:
              type: number
              example: 0
        score0To100:
          type: number
          nullable: true
          example: null
        score1To10:
          type: number
          nullable: true
          example: null
        riskLevel:
          type: string
          nullable: true
          example: null
        missingDocumentTypes:
          type: array
          items:
            type: string
            enum:
              - invoice
              - bill_of_lading
              - packing_list
              - di_duimp
              - bank_details
              - proforma
              - service_contract
              - insurance_policy
            example: invoice
          example:
            - invoice
            - bill_of_lading
            - packing_list
        actionRequired:
          type: boolean
          example: false
        manualApprovalRequired:
          type: boolean
          example: false
        analysisRunId:
          type: string
          nullable: true
          example: null
        manualReviewDecision:
          type: string
          enum:
            - approved
            - rejected
            - changes_requested
          nullable: true
          example: null
        processedAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
        occurredAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
      required:
        - event
        - operationId
        - partnerOperationId
        - status
        - score0To100
        - score1To10
        - riskLevel
        - missingDocumentTypes
        - actionRequired
        - manualApprovalRequired
        - analysisRunId
        - manualReviewDecision
        - processedAt
    WebhookDocumentsPartialPayload:
      type: object
      properties:
        eventId:
          type: string
          example: evt_example
        eventType:
          type: string
          enum:
            - operation.documents.partial
          example: operation.documents.partial
        event:
          type: string
          enum:
            - operation.documents.partial
          example: operation.documents.partial
        operationId:
          type: string
          example: op_example
        externalOperationId:
          type: string
          example: acme-op-123
        partnerOperationId:
          type: string
          example: acme-op-123
        status:
          type: string
          enum:
            - DOCUMENTS_PARTIAL
          example: DOCUMENTS_PARTIAL
        decisionPackId:
          type: string
          nullable: true
          example: dp_example
        decisionSummary:
          type: object
          properties:
            score:
              type: number
              nullable: true
              example: 8.2
            riskLevel:
              type: string
              enum:
                - LOW
                - MEDIUM
                - HIGH
                - CRITICAL
              nullable: true
              example: LOW
            recommendedStatus:
              type: string
              enum:
                - ACTION_REQUIRED
                - READY_FOR_MANUAL_REVIEW
              nullable: true
              example: READY_FOR_MANUAL_REVIEW
            blockingReasons:
              type: array
              items:
                type: string
              example: []
            actionItemsCount:
              type: number
              example: 0
        score0To100:
          type: number
          nullable: true
          example: null
        score1To10:
          type: number
          nullable: true
          example: null
        riskLevel:
          type: string
          nullable: true
          example: null
        missingDocumentTypes:
          type: array
          items:
            type: string
            enum:
              - invoice
              - bill_of_lading
              - packing_list
              - di_duimp
              - bank_details
              - proforma
              - service_contract
              - insurance_policy
            example: invoice
          example:
            - bill_of_lading
            - bank_details
        actionRequired:
          type: boolean
          example: true
        manualApprovalRequired:
          type: boolean
          example: false
        analysisRunId:
          type: string
          nullable: true
          example: null
        manualReviewDecision:
          type: string
          enum:
            - approved
            - rejected
            - changes_requested
          nullable: true
          example: null
        processedAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
        occurredAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
      required:
        - event
        - operationId
        - partnerOperationId
        - status
        - score0To100
        - score1To10
        - riskLevel
        - missingDocumentTypes
        - actionRequired
        - manualApprovalRequired
        - analysisRunId
        - manualReviewDecision
        - processedAt
    WebhookAnalysisCompletedPayload:
      type: object
      properties:
        eventId:
          type: string
          example: evt_example
        eventType:
          type: string
          enum:
            - operation.analysis.completed
          example: operation.analysis.completed
        event:
          type: string
          enum:
            - operation.analysis.completed
          example: operation.analysis.completed
        operationId:
          type: string
          example: op_example
        externalOperationId:
          type: string
          example: acme-op-123
        partnerOperationId:
          type: string
          example: acme-op-123
        status:
          type: string
          enum:
            - READY_FOR_MANUAL_REVIEW
          example: READY_FOR_MANUAL_REVIEW
        decisionPackId:
          type: string
          nullable: true
          example: dp_example
        decisionSummary:
          type: object
          properties:
            score:
              type: number
              nullable: true
              example: 8.2
            riskLevel:
              type: string
              enum:
                - LOW
                - MEDIUM
                - HIGH
                - CRITICAL
              nullable: true
              example: LOW
            recommendedStatus:
              type: string
              enum:
                - ACTION_REQUIRED
                - READY_FOR_MANUAL_REVIEW
              nullable: true
              example: READY_FOR_MANUAL_REVIEW
            blockingReasons:
              type: array
              items:
                type: string
              example: []
            actionItemsCount:
              type: number
              example: 0
        score0To100:
          type: number
          example: 82
        score1To10:
          type: number
          example: 9
        riskLevel:
          type: string
          enum:
            - low
            - medium
            - high
            - critical
            - unknown
          example: medium
        missingDocumentTypes:
          type: array
          items:
            type: string
            enum:
              - invoice
              - bill_of_lading
              - packing_list
              - di_duimp
              - bank_details
              - proforma
              - service_contract
              - insurance_policy
            example: invoice
          example: []
        actionRequired:
          type: boolean
          example: false
        manualApprovalRequired:
          type: boolean
          example: true
        analysisRunId:
          type: string
          example: job_example
        manualReviewDecision:
          type: string
          enum:
            - approved
            - rejected
            - changes_requested
          nullable: true
          example: null
        processedAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
        occurredAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
      required:
        - event
        - operationId
        - partnerOperationId
        - status
        - score0To100
        - score1To10
        - riskLevel
        - missingDocumentTypes
        - actionRequired
        - manualApprovalRequired
        - analysisRunId
        - manualReviewDecision
        - processedAt
    WebhookActionRequiredPayload:
      type: object
      properties:
        eventId:
          type: string
          example: evt_example
        eventType:
          type: string
          enum:
            - operation.action_required
          example: operation.action_required
        event:
          type: string
          enum:
            - operation.action_required
          example: operation.action_required
        operationId:
          type: string
          example: op_example
        externalOperationId:
          type: string
          example: acme-op-123
        partnerOperationId:
          type: string
          example: acme-op-123
        status:
          type: string
          enum:
            - ACTION_REQUIRED
          example: ACTION_REQUIRED
        decisionPackId:
          type: string
          nullable: true
          example: dp_example
        decisionSummary:
          type: object
          properties:
            score:
              type: number
              nullable: true
              example: 8.2
            riskLevel:
              type: string
              enum:
                - LOW
                - MEDIUM
                - HIGH
                - CRITICAL
              nullable: true
              example: LOW
            recommendedStatus:
              type: string
              enum:
                - ACTION_REQUIRED
                - READY_FOR_MANUAL_REVIEW
              nullable: true
              example: READY_FOR_MANUAL_REVIEW
            blockingReasons:
              type: array
              items:
                type: string
              example: []
            actionItemsCount:
              type: number
              example: 0
        score0To100:
          type: number
          example: 22
        score1To10:
          type: number
          example: 3
        riskLevel:
          type: string
          enum:
            - low
            - medium
            - high
            - critical
            - unknown
          example: critical
        missingDocumentTypes:
          type: array
          items:
            type: string
            enum:
              - invoice
              - bill_of_lading
              - packing_list
              - di_duimp
              - bank_details
              - proforma
              - service_contract
              - insurance_policy
            example: invoice
          example:
            - invoice
        actionRequired:
          type: boolean
          example: true
        manualApprovalRequired:
          type: boolean
          example: false
        analysisRunId:
          type: string
          example: job_example
        manualReviewDecision:
          type: string
          enum:
            - approved
            - rejected
            - changes_requested
          nullable: true
          example: null
        processedAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
        occurredAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
      required:
        - event
        - operationId
        - partnerOperationId
        - status
        - score0To100
        - score1To10
        - riskLevel
        - missingDocumentTypes
        - actionRequired
        - manualApprovalRequired
        - analysisRunId
        - manualReviewDecision
        - processedAt
    WebhookManualReviewCompletedPayload:
      type: object
      properties:
        eventId:
          type: string
          example: evt_example
        eventType:
          type: string
          enum:
            - operation.manual_review.completed
          example: operation.manual_review.completed
        event:
          type: string
          enum:
            - operation.manual_review.completed
          example: operation.manual_review.completed
        operationId:
          type: string
          example: op_example
        externalOperationId:
          type: string
          example: acme-op-123
        partnerOperationId:
          type: string
          example: acme-op-123
        status:
          type: string
          enum:
            - MANUAL_REVIEW_APPROVED
            - MANUAL_REVIEW_REJECTED
            - MANUAL_REVIEW_CHANGES_REQUESTED
          example: MANUAL_REVIEW_APPROVED
        decisionPackId:
          type: string
          nullable: true
          example: dp_example
        decisionSummary:
          type: object
          properties:
            score:
              type: number
              nullable: true
              example: 8.2
            riskLevel:
              type: string
              enum:
                - LOW
                - MEDIUM
                - HIGH
                - CRITICAL
              nullable: true
              example: LOW
            recommendedStatus:
              type: string
              enum:
                - ACTION_REQUIRED
                - READY_FOR_MANUAL_REVIEW
              nullable: true
              example: READY_FOR_MANUAL_REVIEW
            blockingReasons:
              type: array
              items:
                type: string
              example: []
            actionItemsCount:
              type: number
              example: 0
        score0To100:
          type: number
          example: 82
        score1To10:
          type: number
          example: 9
        riskLevel:
          type: string
          enum:
            - low
            - medium
            - high
            - critical
            - unknown
          example: medium
        missingDocumentTypes:
          type: array
          items:
            type: string
            enum:
              - invoice
              - bill_of_lading
              - packing_list
              - di_duimp
              - bank_details
              - proforma
              - service_contract
              - insurance_policy
            example: invoice
          example: []
        actionRequired:
          type: boolean
          example: false
        manualApprovalRequired:
          type: boolean
          example: false
        analysisRunId:
          type: string
          nullable: true
          example: null
        manualReviewDecision:
          type: string
          enum:
            - approved
            - rejected
            - changes_requested
          example: approved
        processedAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
        occurredAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
      required:
        - event
        - operationId
        - partnerOperationId
        - status
        - score0To100
        - score1To10
        - riskLevel
        - missingDocumentTypes
        - actionRequired
        - manualApprovalRequired
        - analysisRunId
        - manualReviewDecision
        - processedAt
    WebhookCallbackFailedPayload:
      type: object
      properties:
        eventId:
          type: string
          example: evt_example
        eventType:
          type: string
          enum:
            - operation.callback.failed
          example: operation.callback.failed
        event:
          type: string
          enum:
            - operation.callback.failed
          example: operation.callback.failed
        operationId:
          type: string
          example: op_example
        externalOperationId:
          type: string
          example: acme-op-123
        partnerOperationId:
          type: string
          example: acme-op-123
        status:
          type: string
          example: PARTNER_CALLBACK_FAILED
        decisionPackId:
          type: string
          nullable: true
          example: dp_example
        decisionSummary:
          type: object
          properties:
            score:
              type: number
              nullable: true
              example: 8.2
            riskLevel:
              type: string
              enum:
                - LOW
                - MEDIUM
                - HIGH
                - CRITICAL
              nullable: true
              example: LOW
            recommendedStatus:
              type: string
              enum:
                - ACTION_REQUIRED
                - READY_FOR_MANUAL_REVIEW
              nullable: true
              example: READY_FOR_MANUAL_REVIEW
            blockingReasons:
              type: array
              items:
                type: string
              example: []
            actionItemsCount:
              type: number
              example: 0
        score0To100:
          type: number
          nullable: true
          example: null
        score1To10:
          type: number
          nullable: true
          example: null
        riskLevel:
          type: string
          nullable: true
          example: null
        missingDocumentTypes:
          type: array
          items:
            type: string
            enum:
              - invoice
              - bill_of_lading
              - packing_list
              - di_duimp
              - bank_details
              - proforma
              - service_contract
              - insurance_policy
            example: invoice
          example: []
        actionRequired:
          type: boolean
          example: false
        manualApprovalRequired:
          type: boolean
          example: false
        analysisRunId:
          type: string
          nullable: true
          example: null
        manualReviewDecision:
          type: string
          enum:
            - approved
            - rejected
            - changes_requested
          nullable: true
          example: null
        processedAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
        occurredAt:
          type: string
          example: '2026-05-20T12:00:00.000Z'
      required:
        - event
        - operationId
        - partnerOperationId
        - status
        - score0To100
        - score1To10
        - riskLevel
        - missingDocumentTypes
        - actionRequired
        - manualApprovalRequired
        - analysisRunId
        - manualReviewDecision
        - processedAt
  securitySchemes:
    PayFiApiKey:
      type: apiKey
      in: header
      name: X-PayFi-Api-Key
    PayFiNonce:
      type: apiKey
      in: header
      name: X-PayFi-Nonce
    PayFiSignature:
      type: apiKey
      in: header
      name: X-PayFi-Signature
    PayFiIdempotencyKey:
      type: apiKey
      in: header
      name: Idempotency-Key

````