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

# Asynchronous analysis

> Send the transaction, get a 202 and the decision by webhook; reconcile with the status

Asynchronous mode uses the same engine as `/analyze`. What changes is how the decision comes out: the path
responds `202` when it accepts the request, and the decision arrives as a signed webhook. See
[Integration modes](https://docs.fraudeg.com/en/introduccion/modos-de-integracion.md) to choose.

## What you need

* An API key with the `TRANSACTIONS_WRITE` scope ([Authentication](https://docs.fraudeg.com/en/integrar/autenticacion.md)).
* A webhook endpoint subscribed to `transaction.analysis.completed`,
  `transaction.analysis.rejected`, and `transaction.analysis.failed`. It is configured in the
  dashboard: Config › Webhooks ([Webhooks](https://docs.fraudeg.com/en/webhooks.md)).
* One `X-Idempotency-Key` per transaction ([Idempotency](https://docs.fraudeg.com/en/integrar/idempotencia.md)).

## The flow

1. `POST /v1/transactions/analyze/async` with your transaction and your key. You get a `202` with the
   `transaction_id`.
2. Fraudeg scores the transaction.
3. A webhook reaches you: `completed` with the decision, `rejected` if there is something to fix,
   `failed` if it failed on our side.
4. Once a day, [reconcile](#reconcile) with `GET /v1/transactions/{id}/analysis`.

```bash theme={null}
curl -X POST https://api.fraudeg.com/api/v1/transactions/analyze/async \
  -H "X-Api-Key: your_api_key" \
  -H "X-Idempotency-Key: ord-100234-2026-11-03-001" \
  -H "Content-Type: application/json" \
  -d '{"order_id":"ORD-100234","user_id":"usr_48213","transaction_amount":129.90,"payment_method":"card"}'
```

```json theme={null}
{
  "data": {
    "transaction_id": "2ecfdd90-ff63-529c-9d32-2c46615b1546",
    "order_id": "ORD-100234",
    "idempotency_key": "ord-100234-2026-11-03-001"
  },
  "timestamp": "2026-11-03T14:05:09.41",
  "status": "ACCEPTED"
}
```

The `202` only says the request was accepted. Save the `transaction_id`: it is the one the
webhooks carry and the one you use to check the status. Reference:
[POST /analyze/async](https://docs.fraudeg.com/en/referencia/analyze-async.md).

The synchronous paths (`/analyze`, `/analyze/sandbox`) **never** send these webhooks: their
decision travels in the response.

## The notifications

Each `202` ends in exactly one webhook: `completed` with the decision, `rejected` if there is something
to fix, or `failed` if it failed on our side. Payloads, deduplication, and resends in
[Transaction events](https://docs.fraudeg.com/en/webhooks/transacciones.md); signature and retries in
[Signature and delivery](https://docs.fraudeg.com/en/webhooks/firma-y-entrega.md).

## Reconcile

We do not guarantee delivery. Once a day, go through the `transaction_id`s you accepted that have no
result in your system and query
[`GET /v1/transactions/{id}/analysis`](https://docs.fraudeg.com/en/referencia/estado-analisis). `DECIDED` carries the
decision; `REJECTED` and `FAILED` carry the `code`. The status is kept for 72 hours.

Next step: [Analysis status](https://docs.fraudeg.com/en/referencia/estado-analisis.md).


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