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

# Handle Corrections

> Update customers, beneficiaries, and payments when Nuvera requests corrections

Corrections work differently per resource. Customer corrections are handled by the customer inside the AiPrise verification flow — the Partner REST API has no customer update endpoint. Beneficiary and payment corrections are resource-specific `PATCH` endpoints: update only the fields Nuvera asked you to correct, then keep tracking the resource through its detail and activity endpoints.

Required permissions depend on the corrected resource:

| Resource    | Read permission      | Write permission              |
| ----------- | -------------------- | ----------------------------- |
| Customer    | `CUSTOMERS_READ`     | Not applicable (AiPrise flow) |
| Beneficiary | `BENEFICIARIES_READ` | `BENEFICIARIES_WRITE`         |
| Payment     | `PAYMENTS_READ`      | `PAYMENTS_WRITE`              |

## Customer corrections

Customer corrections are requested by Nuvera compliance through AiPrise, not through a partner update call. When compliance needs more information, the customer moves to `CORRECTION_REQUESTED` and the customer completes the fix inside their AiPrise verification session.

There is no `PATCH /api/v1/customers/{id}`. Your integration observes and tracks the correction; it does not submit customer field edits.

<Steps>
  <Step title="Detect the correction request">
    Poll `GET /api/v1/customers/{id}` and watch for `status: "CORRECTION_REQUESTED"`.

    ```bash theme={null}
    CUSTOMER_ID="<customer-id>"
    TOKEN="<signed-request-jwt>"

    curl "https://rest-api.nuvera.global/api/v1/customers/$CUSTOMER_ID" \
      -H "x-api-key: $NUVERA_API_KEY" \
      -H "Authorization: Bearer $TOKEN"
    ```
  </Step>

  <Step title="Have the customer resolve it in AiPrise">
    The customer reopens their verification session from the customer platform and submits the requested corrections to AiPrise. Once
    resubmitted, the customer returns to `PENDING_REVIEW` and, after review, to `APPROVED` (or another terminal status).
  </Step>

  <Step title="Track the outcome">
    Use `GET /api/v1/customers/{id}/activity` to inspect what changed and when the status transitioned.
  </Step>
</Steps>

## Beneficiary corrections

Use `PATCH /api/v1/customers/{customerId}/beneficiaries/{id}` only when the beneficiary is `CORRECTION_REQUESTED`.

Keep both IDs in the URL. Do not include `id` or `customerId` in the JSON body.

```json theme={null}
{
  "address": "Taunusanlage 12, Frankfurt",
  "accountNumber": "1234567890",
  "bankBic": "<valid-bank-bic>"
}
```

```bash theme={null}
CUSTOMER_ID="<customer-id>"
BENEFICIARY_ID="<beneficiary-id>"
BODY='{"address":"Taunusanlage 12, Frankfurt","accountNumber":"1234567890","bankBic":"<valid-bank-bic>"}'
TOKEN="<signed-request-jwt>"

curl "https://rest-api.nuvera.global/api/v1/customers/$CUSTOMER_ID/beneficiaries/$BENEFICIARY_ID" \
  -X PATCH \
  -H "x-api-key: $NUVERA_API_KEY" \
  -H "Authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  --data "$BODY"
```

## Payment corrections

Use `PATCH /api/v1/payment/{id}` only when the payment is `CORRECTION_NEEDED`.

Keep the payment ID in the URL. Do not include `id` in the JSON body.

```json theme={null}
{
  "purposeOfPayment": "Invoice payment",
  "documentIds": ["<invoice-document-id>"]
}
```

```bash theme={null}
PAYMENT_ID="<payment-id>"
BODY='{"purposeOfPayment":"Invoice payment","documentIds":["<invoice-document-id>"]}'
TOKEN="<signed-request-jwt>"

curl "https://rest-api.nuvera.global/api/v1/payment/$PAYMENT_ID" \
  -X PATCH \
  -H "x-api-key: $NUVERA_API_KEY" \
  -H "Authorization: Bearer $TOKEN" \
  -H "content-type: application/json" \
  --data "$BODY"
```

## Track correction history

Use activity endpoints to inspect what happened before and after a correction:

| Resource    | Activity endpoint                                                |
| ----------- | ---------------------------------------------------------------- |
| Customer    | `GET /api/v1/customers/{id}/activity`                            |
| Beneficiary | `GET /api/v1/customers/{customerId}/beneficiaries/{id}/activity` |
| Payment     | `GET /api/v1/payment/{id}/activity`                              |

For complete update schemas, open the [API Reference](/api-reference/introduction).
