# Use Remote Deposit Capture (API)
> Learn how to use RDC (remote deposit capture) to convert paper checks into electronic payments via the API
{/* vale Payabli.Weasel["clearly"] = NO */}
{/* vale Payabli.Condescending["clearly"] = NO */}
{/* vale Payabli.Acronyms["CAR", "LAR"] = NO */}
Remote Deposit Capture (RDC) is a service that allows you to convert paper checks into electronic payments without physically depositing them at a bank. This guide explains how to implement RDC via the API.
Contact the Payabli support team to enable Remote Deposit Capture for your account.
The implementation process consists of two main API calls:
1. Check image capture and OCR extraction
2. Payment processing using the extracted check information
Before you begin, make sure you read [Capturing in-person checks](/guides/pay-in-checks-rdc-overview) to understand the key concepts and requirements for Remote Deposit Capture (RDC).
## Step 1: Process check images
First, send the check images to Payabli for processing using the /CheckCapture/CheckProcessing endpoint. You need to send the front and back images of the check in JPEG or PNG format, base64 encoded.
A successful response includes the extracted check information, including the OCR account and routing numbers, as well as the check amount.
If the check processing fails, the response includes error information to help you troubleshoot the issue. Some errors appear in the `errors` array of 200 response, and validation errors are returned as a 400 response.
```json 200 response with errors {17-19}
{
"id": "",
"success": false,
"processDate": "0001-01-01T00:00:00",
"ocrMicr": null,
"ocrMicrStatus": "",
"ocrMicrConfidence": null,
"ocrAccountNumber": null,
"ocrRoutingNumber": null,
"ocrCheckNumber": null,
"ocrCheckTranCode": null,
"ocrAmount": "107",
"ocrAmountStatus": "",
"ocrAmountConfidence": null,
"amountDiscrepancyDetected": false,
"endorsementDetected": false,
"errors": [
"It appears you submitted 2 images of front of check. Please retake both front and rear photos."
],
"messages": [],
"carLarMatchConfidence": null,
"carLarMatchStatus": null,
"frontImage": null,
"rearImage": null,
"checkType": 0,
"referenceNumber": "0"
}
```
```json 400 response due to validation errors
{
"type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"errors": {
"CheckAmount": [
"The field checkAmount must be between 1 and 2147483647."
]
},
"traceId": "00-1c904c7c430bcc27d345d2a01bf0adb0-c3eb27340963e477-01"
}
```
## Step 2: Process payment
After successfully processing the check images, use the extracted information to complete the payment transaction.
Send a POST request to /MoneyIn/getpaid:
```json
{
"entryPoint": "41035afaa7",
"paymentMethod": {
"method": "ach",
"achAccount": "123456", // Use ocrAccountNumber from step 1
"achRouting": "123456789", // Use ocrRoutingNumber from step 1
"achCode": "BOC", // Must be "BOC" for check conversion
"achHolder": "John Doe", // Account holder name
"achAccountType": "Checking" // Must be "Checking"
},
"paymentDetails": {
"totalAmount": 12550 // Same amount as in step 1 (in cents)
},
"referenceId": "abc123def456" // Use id from step 1 response
}
```
This request has some differences from the standard transaction, pay attention to the following fields:
| Field | Value | Description |
| ---------------- | -------------- | --------------------------------------------- |
| `method` | `ach` | Payment method must be ACH |
| `achCode` | `BOC` | ACH SEC code must be BOC for check conversion |
| `achAccountType` | "Checking" | Account type must be Checking |
| `totalAmount` | 12550 | Amount in cents. |
| `referenceId` | "abc123def456" | ID from the check processing response |
A successful request returns a 200 response.
## Implementation recommendations
When implementing RDC, consider the following recommendations, which can help create a smoother user experience and reduce errors.
### Data validation
Before submitting to the API:
* Ensure check images are correctly encoded and within size limits
* Verify the check amount is in cents (integer value)
* Check that the required parameters are correctly formatted
### Error handling strategies
When implementing error handling, consider the following scenarios and strategies:
| Error scenario | Handling strategy |
| ------------------------------ | ----------------------------------------------------- |
| OCR confidence below threshold | Implement manual review for low confidence results |
| Image quality issues | Give the user feedback to retake images |
| Amount discrepancies | Show warning and allow user to confirm correct amount |
| Connectivity problems | Implement retry logic with exponential backoff |
### Testing recommendations
When testing your RDC implementation, consider the following scenarios:
1. **Image quality testing**: Test with varied image qualities and lighting conditions.
2. **Error handling**: Test with intentionally poor images and various check types to verify error handling.
3. **End-to-end flow**: Test the complete flow from image capture to payment processing.
4. **Integration testing**: Verify proper integration with your existing systems.
## Related resources
See these related resources to help you get the most out of Payabli.
* **[Capturing in-person checks](/guides/pay-in-checks-rdc-overview)** - Learn how to use RDC (remote deposit capture) to convert paper checks into electronic payments