# Delivery modes

> CSVJetty can hand validated records to your application through a browser callback or a signed server-to-server webhook.

Canonical HTML: https://www.csvjetty.com/docs/concepts/delivery-modes

## Comparison

| | Callback | Webhook |
| --- | --- | --- |
| Where rows go | Your `onData` handler in the browser | CSVJetty sends rows to your HTTPS endpoint |
| CSVJetty backend handles row data | No | Yes, temporarily for delivery and retries |
| Best for | Most React apps and privacy-sensitive flows | Server-to-server processing and durable delivery |
| Authentication | Your app authenticates its own save API | Verify CSVJetty HMAC signature |
| Retry model | Your callback can retry through your app flow | Saved webhook batches can be retried |

## Callback delivery

With callback delivery, CSVJetty passes each import batch to `onData`. A common production pattern is to send that payload from your React application to an authenticated API route you control.

With callback delivery, imported row data does not need to pass through or be stored on CSVJetty's backend. The original CSV file is not stored by CSVJetty.

## Webhook delivery

With webhook delivery, CSVJetty sends import batches directly to the HTTPS endpoint saved on the importer. Requests are signed, include an idempotency key, and support row-level rejection responses.

Webhook payloads may be retained temporarily for reliable delivery and retries. Successfully delivered payloads are removed; failed payloads expire after the retry window.

## Which should you choose?

Choose callbacks when you already have an authenticated application API and want imported row data to stay out of CSVJetty's backend.

Choose webhooks when you want CSVJetty to deliver directly to a server endpoint with signatures, batching, and retry support.

## Common payload model

Both modes deliver the same core information: import ID, file name, normalized rows, original row numbers, skipped-row count, uploaded headers, and the final column mapping. Webhooks additionally include batch metadata.
