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

# Retry Webhook

Manually retries a `FAILED` webhook notification, queuing it for immediate re-delivery to your configured webhook URL. The automatic retry cycle is reset and `manualRetryCount` is incremented.

***

## Important Notes

* **Status requirement**: The notification must be in `FAILED` status. Attempting to retry a `SENT`, `PENDING`, or `NOT_SENT` notification returns a `409`.
* **Manual retry limit**: Each notification allows a maximum of **3 manual retries**. Once reached, the endpoint returns `409` and the notification cannot be retried again.
* **Rate limit**: A maximum of **10 manual retries per partner per minute** is enforced. Exceeding this returns `429`.
* **Automatic retry reset**: On a successful retry request, `retryAttempts` is reset to `0` and `latestErrorPayload` is cleared, giving the notification a fresh delivery cycle.

***

## When to Retry vs. When to Contact Support

**Retry when:**

* Your endpoint was temporarily unavailable (e.g. a deployment, a transient 5xx).
* You fixed a bug in your webhook handler and need the event reprocessed.
* The `latestErrorPayload` shows a recoverable error (connection timeout, 503, etc.).

**Contact support when:**

* Your webhook URL has changed — update it first via [PUT /api/partner/v2/webhook-settings](/reference/partnerwebhooksettingsv2controller_update), then retry.
* The event payload is stale and the corresponding transaction has already been handled through another channel.
* You have exhausted all 3 manual retries and still cannot receive the notification.

***

## Error Codes

### Common Errors

| HTTP Status | Code                   | Message                            |
| ----------- | ---------------------- | ---------------------------------- |
| 401         | `UNAUTHORIZED`         | "API Key is missing"               |
| 401         | `UNAUTHORIZED`         | "Invalid API Key format"           |
| 401         | `UNAUTHORIZED`         | "Invalid API Key"                  |
| 403         | `INVALID_PARTNER_FLOW` | "The partner has an invalid flow." |

### Endpoint-Specific Errors

| HTTP Status | Code                | Message                                                                             |
| ----------- | ------------------- | ----------------------------------------------------------------------------------- |
| 404         | `NOT_FOUND`         | "Webhook notification not found"                                                    |
| 409         | `CONFLICT`          | "Notification is not in FAILED status"                                              |
| 409         | `CONFLICT`          | "Partner webhook notification has reached the maximum number of manual retries (3)" |
| 429         | `TOO_MANY_REQUESTS` | "Rate limit exceeded. Try again in a few seconds."                                  |


## OpenAPI

````yaml reference/openapi/PartnerWebhookNotificationV2Controller_retry.json POST /api/partner/v2/webhook-notifications/{id}/retry
openapi: 3.0.0
info:
  title: Capa Partner API - V2
  description: >-
    Partner API for integrating cryptocurrency on-ramp and off-ramp services
    using Capa's infrastructure. Enable your users to seamlessly convert between
    fiat and crypto.
  version: v2
  contact: {}
servers:
  - url: https://staging-api.capa.fi
  - url: https://production-api.capa.fi
security: []
paths:
  /api/partner/v2/webhook-notifications/{id}/retry:
    post:
      tags:
        - Webhook-Notifications
      summary: Retry a failed webhook notification
      operationId: PartnerWebhookNotificationV2Controller_retry
      parameters:
        - name: id
          required: true
          in: path
          description: The webhook notification ID to retry
          schema:
            example: 8374f327-38bd-4b0b-b8a7-2524599eb903
            type: string
      responses:
        '200':
          description: >-
            Notification successfully queued for re-delivery. Returns the
            updated notification with status reset to PENDING.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Notification identifier
                        example: 8374f327-38bd-4b0b-b8a7-2524599eb903
                      status:
                        type: string
                        description: >-
                          Delivery status — reset to PENDING after a successful
                          retry request
                        enum:
                          - PENDING
                          - FAILED
                          - SENT
                          - NOT_SENT
                        example: PENDING
                      retryAttempts:
                        type: number
                        description: >-
                          Number of automatic delivery attempts (reset to 0 on
                          manual retry)
                        example: 0
                      manualRetryCount:
                        type: number
                        description: Number of manual retries triggered by the partner
                        example: 2
                      payload:
                        type: object
                        description: Original payload delivered to the partner endpoint
                        example:
                          type: TRANSACTION
                          event: CREATED_ON_RAMP
                          externalUserId: 18c54df0-1e62-4fee-8864-9b7512a0748c
                          transactionId: 14f6ba28-d285-4658-8dd7-8a1d903838c8
                          firstName: Martin
                          lastName: Smith
                      latestErrorPayload:
                        type: object
                        nullable: true
                        description: Cleared to null after a successful retry request
                        example: null
                      lastManualRetryAt:
                        type: string
                        format: date-time
                        nullable: true
                        description: ISO timestamp of this manual retry
                        example: '2026-01-15T10:40:00.000Z'
                      version:
                        type: number
                        description: >-
                          Optimistic lock version for concurrent retry
                          prevention
                        example: 2
                      createdAt:
                        type: string
                        format: date-time
                        description: ISO timestamp when the notification was created
                        example: '2026-01-15T10:30:00.000Z'
                      updatedAt:
                        type: string
                        format: date-time
                        description: ISO timestamp when the notification was last updated
                        example: '2026-01-15T10:40:00.000Z'
                    required:
                      - id
                      - status
                      - retryAttempts
                      - manualRetryCount
                      - payload
                      - latestErrorPayload
                      - lastManualRetryAt
                      - version
                      - createdAt
                      - updatedAt
                    x-readme-ref-name: WebhookNotificationDetailResponse
              example:
                success: true
                data:
                  id: 8374f327-38bd-4b0b-b8a7-2524599eb903
                  status: PENDING
                  retryAttempts: 0
                  manualRetryCount: 2
                  payload:
                    type: TRANSACTION
                    event: CREATED_ON_RAMP
                    externalUserId: 18c54df0-1e62-4fee-8864-9b7512a0748c
                    transactionId: 14f6ba28-d285-4658-8dd7-8a1d903838c8
                    firstName: Martin
                    lastName: Smith
                  latestErrorPayload: null
                  lastManualRetryAt: '2026-01-15T10:40:00.000Z'
                  version: 2
                  createdAt: '2026-01-15T10:30:00.000Z'
                  updatedAt: '2026-01-15T10:40:00.000Z'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                UNAUTHORIZED:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: API Key is missing
                UNAUTHORIZED_2:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Invalid API Key format
                UNAUTHORIZED_3:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Invalid API Key
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: NOT_FOUND_ERROR
                message: Requested PartnerWebhookNotification was not found
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: CONCURRENT_RETRY_CONFLICT
                message: >-
                  Notification "{id}" was modified concurrently. Please reload
                  and try again.
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                INVALID_STATUS_FOR_RETRY:
                  value:
                    success: false
                    code: INVALID_STATUS_FOR_RETRY
                    message: >-
                      Notification "{id}" cannot be retried because its status
                      is "{status}". Only FAILED or NOT_SENT notifications can
                      be retried.
                MANUAL_RETRY_LIMIT_EXCEEDED:
                  value:
                    success: false
                    code: MANUAL_RETRY_LIMIT_EXCEEDED
                    message: >-
                      Notification "{id}" has reached the maximum number of
                      manual retries (3).
                WEBHOOK_URL_NOT_CONFIGURED:
                  value:
                    success: false
                    code: WEBHOOK_URL_NOT_CONFIGURED
                    message: >-
                      Partner has no webhook URL configured. Set a webhook URL
                      before retrying.
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: MANUAL_RETRY_RATE_LIMIT_EXCEEDED
                message: >-
                  Partner has exceeded the manual retry rate limit. Please wait
                  before retrying.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: INTERNAL_SERVER_ERROR
                message: Internal server error
      security:
        - PartnerApiKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error message.
        errors:
          type: array
          description: Optional per-field validation details.
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
      required:
        - success
        - code
        - message
  securitySchemes:
    PartnerApiKey:
      type: apiKey
      in: header
      name: partner-api-key
      description: API key for the affiliated partner performing the request.

````