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

# Retry Transfer

> Retry a previously failed transfer within a bulk transfer batch

## Overview

The retry endpoint allows you to reattempt a failed transfer that is marked as retriable within a bulk transfer batch. This is useful when transfers fail due to temporary issues like network problems or bank system downtime.

> [!NOTE]
>
> Only transfers with `retryable: true` in their status can be retried. Non-retriable failures (like invalid account numbers) cannot be retried.

## Endpoint

```bash theme={null}
POST /bulk-transfers/{batch_id}/transfers/{id}/retry
```

### Path Parameters

**batch\_id** `string` *required*

The unique identifier of the bulk transfer batch

**id** `string` *required*

The unique identifier of the failed transfer to retry

## Example Request

```bash cURL theme={null}
curl -X POST "https://api.spendjuice.com/bulk-transfers/{batch_id}/transfers/{id}/retry" \
-H "Authorization:  YOUR_API_KEY"
```

```javascript Node.js theme={null}
const response = await fetch(
  `https://api.spendjuice.com/bulk-transfers/${batchId}/transfers/${transferId}/retry`,
  {
    method: 'POST',
    headers: {
      'Authorization': ` ${apiKey}`
    }
  }
);
```

```python Python theme={null}
import requests

response = requests.post(
    f'https://api.spendjuice.com/bulk-transfers/{batch_id}/transfers/{transfer_id}/retry',
    headers={'Authorization': f' {api_key}'}
)
```

## Response

**202 Accepted**

Retry request accepted successfully

## Error Responses

> **404 - Transfer Not Found**
>
> ```json theme={null}
> {
>   "error": {
>     "code": "transfer_not_found",
>     "message": "No transfer found with the provided ID"
>   }
> }
> ```

> **400 - Not Retriable**
>
> ```json theme={null}
> {
>   "error": {
>     "code": "not_retriable",
>     "message": "This transfer cannot be retried"
>   }
> }
> ```

> **409 - Already Being Retried**
>
> ```json theme={null}
> {
>   "error": {
>     "code": "retry_in_progress",
>     "message": "Transfer is already being retried"
>   }
> }
> ```

## Retry Limits

> * Maximum 3 retry attempts per transfer
> * 5-minute wait period between retries
> * 24-hour maximum retry window from initial failure
> * Retries count towards daily transfer limits

## Status Transitions

1. Initial failed status: `failed` with `retryable: true`
2. After retry request: `processing`
3. Final status:
   * Success: `succeeded`
   * Failure: `failed` (may be retriable again)

## Webhook Events

Monitor these events for retry status:

* `bulk.transfer.retry.started` - Retry attempt initiated
* `bulk.transfer.retry.succeeded` - Retry completed successfully
* `bulk.transfer.retry.failed` - Retry attempt failed

## Best Practices

1. **Retry Strategy**
   * Implement exponential backoff between retries
   * Track retry attempt count
   * Consider time of day for retries
   * Monitor success rates by failure reason

2. **Error Handling**
   * Log all retry attempts
   * Track retry outcomes
   * Handle webhook notifications
   * Monitor retry limits

3. **User Communication**
   * Notify users of retry status
   * Provide clear error messages
   * Suggest alternative actions for non-retriable failures
   * Set expectations for processing time

> **Need Help?**
>
> For retry-related assistance:
>
> * Check our [Error Handling](https://docs.juicyway.com/errors.md) guide
> * Contact [Support](mailto:support@juicyway.com)
> * Review [Webhook Events](https://docs.juicyway.com/webhooks.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.