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

# Handle recovery action



## OpenAPI

````yaml v1.yaml POST /recovery_action
openapi: 3.0.1
info:
  title: Slicker Merchant Retry Webhook API
  version: '1.0'
  description: >
    API specification for the webhook endpoint that merchants need to expose for
    Slicker to trigger payment retries.

    This webhook will be called by Slicker when a retry should be executed based
    on Slicker's optimization algorithms.
  contact:
    name: Slicker Support
    url: https://support.slickerhq.com
servers:
  - url: https://api.your-company.com/slicker-webhook
    description: Example URL - replace with your actual webhook endpoint URL
security:
  - bearerAuth: []
  - basicAuth: []
paths:
  /recovery_action:
    post:
      summary: Receive payment retry instructions from Slicker
      description: >
        This endpoint is called by Slicker when its algorithms determine a
        payment should be retried.

        The merchant system should use this information to execute the
        appropriate retry action.
      operationId: receiveRetryInstructions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetryRequest'
            example:
              requestId: req_2uqkAo1bwllmzrgV2qtGv48DtGI
              invoiceId: inv_12345678
              subscriptionId: sub_12345678
              actionSuggestion: ACTION_SUGGESTION_RETRY
              idealRetryTime: '2023-01-18T09:30:00Z'
        required: true
      responses:
        '200':
          description: Retry instructions received successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RetryResponse'
              example:
                success: true
                message: Retry scheduled
        '400':
          description: Bad Request - The request contains invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error_code: invalid_request
                message: Missing required field or invalid format
        '401':
          description: Unauthorized - Authentication credentials are missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error_code: unauthorized
                message: Invalid or missing authentication credentials
        '429':
          description: Too Many Requests - The rate limit has been exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error_code: rate_limit_exceeded
                message: Too many requests, please try again later
        '500':
          description: Internal Server Error - An unexpected server error occurred
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                error_code: server_error
                message: An unexpected error occurred
      security:
        - bearerAuth: []
        - basicAuth: []
components:
  schemas:
    RetryRequest:
      type: object
      properties:
        requestId:
          type: string
          description: Unique identifier for the request from Slicker
          example: req_2uqkAo1bwllmzrgV2qtGv48DtGI
        invoiceId:
          type: string
          description: Identifier for the invoice that should be retried
          example: inv_12345678
        subscriptionId:
          type: string
          description: Identifier for the subscription associated with the invoice
          example: sub_12345678
        actionSuggestion:
          type: string
          description: Suggested action to take for this recovery attempt
          enum:
            - ACTION_SUGGESTION_UNSPECIFIED
            - ACTION_SUGGESTION_RETRY
            - ACTION_SUGGESTION_CARD_CHANGE
          example: ACTION_SUGGESTION_RETRY
        idealRetryTime:
          type: string
          format: date-time
          description: >-
            The optimal time to execute the retry according to Slicker's
            algorithms
          example: '2023-01-18T09:30:00Z'
      required:
        - requestId
        - invoiceId
        - actionSuggestion
        - idealRetryTime
    RetryResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates if the retry instruction was successfully received
          example: true
        message:
          type: string
          description: Additional information about the response
          example: Retry scheduled
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Always false for error responses
          example: false
        error_code:
          type: string
          description: Machine-readable error code
          example: invalid_request
        message:
          type: string
          description: Human-readable error message
          example: Missing required field or invalid format
      required:
        - success
        - error_code
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: |
        API key authentication using a Bearer token in the Authorization header.
        Example: `Authorization: Bearer YOUR_API_KEY`
    basicAuth:
      type: http
      scheme: basic
      description: |
        Basic authentication using username and password.
        Example: `Authorization: Basic base64(username:password)`

````