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

# Confirm Transactions

> Record the transactions your wallet signed for an onboarding

Records the outcome of the transactions [Build Transactions](https://docs.trusset.org/endpoints/customers/build-onboarding-transactions.md) returned. Trusset reads the receipt from the chain and records only what it shows: the transaction must be mined, successful, sent by a wallet of your instance, and cover this customer's wallet.

The call confirms the step the onboarding waits for. Send `kind` with the kind you signed. A repeat of a confirmation that is already recorded then answers `alreadyRecorded: true` instead of being applied to the next step.

After a confirmed registration the onboarding reads `COMPLETED`, or `AWAITING_SIGNATURE` again with `ELIGIBILITY_ADMISSION` when the profile has an eligibility register.

## Path Parameters

**customer** `string` *required*

The customer `id`, your `externalId`, the reference key or a wallet address of the customer.

## Body Parameters

**kind** `string`

`IDENTITY_REGISTRATION`, `ELIGIBILITY_ADMISSION` or `WHITELIST_ADMISSION`: the kind you built and signed. Recommended on every call.

**txHash** `string`

The hash of the transaction, `0x` followed by 64 hex characters. For a registration it is the `batchVerifyIdentities` (or `registerIdentity`) transaction. Required for the two admission kinds.

**claimTxResults** `array`

For a registration: `{ id, txHash }` for the residency claim transaction, with `id` the `pendingId`.

**updateTxResults** `array`

For a registration that renews an identity (`operations` reads `update`): `{ id, txHash }` for the `updateIdentity` transaction, with `id` the `pendingId`.

**listId** `string`

For `WHITELIST_ADMISSION`: the whitelist this transaction listed the wallet on. Optional while exactly one whitelist is still open.

## Response Fields

**data** `object`

**kind** `string`

The kind that was confirmed, or `null` for a repeat on a completed onboarding that named none.

**alreadyRecorded** `boolean`

`true` when the step was recorded before and nothing was read or written now.

**result** `object`

What the confirmation recorded, as [Confirm Pending Registration](https://docs.trusset.org/endpoints/customers/confirm-pending-registration.md), [Confirm Admission](https://docs.trusset.org/endpoints/customers/confirm-admission.md) or [Confirm Record Admission](https://docs.trusset.org/endpoints/customers/confirm-kyc-record-admission.md) returns it. `null` with `alreadyRecorded`.

**onboarding** `object`

The onboarding after the confirmation.

> [!WARNING]
>
> A registration answers `200` even when the chain could not be read or the transaction did not register the wallet. `result.results[0].status` then reads `CHAIN_READ_UNAVAILABLE` or `NOT_REGISTERED_ON_CHAIN`, and the onboarding stays `AWAITING_SIGNATURE`. Read `onboarding.status`, and confirm again or sign again.

```bash cURL theme={null}
curl -X POST "https://api.trusset.org/customers/api/onboarding/client-48213/transactions/confirm" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: trusset_your_key_here" \
  -d '{
    "kind": "IDENTITY_REGISTRATION",
    "txHash": "0x4b1f6e1c0c6f1b6a1f0d9a7c2f3e5d4c8b7a6f5e4d3c2b1a0f9e8d7c6b5a4f3e",
    "claimTxResults": [
      { "id": "cmwgx2gur0014iinmh8m2eb6c", "txHash": "0x9c2d5a1b7e3f4c6d8a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f" }
    ]
  }'
```

```typescript TypeScript theme={null}
const response = await fetch(
  'https://api.trusset.org/customers/api/onboarding/client-48213/transactions/confirm',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json', 'X-API-Key': 'trusset_your_key_here' },
    body: JSON.stringify({ kind: 'IDENTITY_REGISTRATION', txHash, claimTxResults: [{ id: pendingId, txHash: claimTxHash }] })
  }
);
const { data } = await response.json();
console.log(data.onboarding.status);
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `INVALID_TX_HASH` | `400` | `txHash` is missing where it is required, or is not a 32-byte hex string |
| `INVALID_INPUT` | `400` | `kind` is unknown, or a result list is malformed |
| `VALIDATION_ERROR` | `400` | A registration was confirmed without `txHash`, `updateTxResults` or `claimTxResults` |
| `LIST_REQUIRED` | `400` | Several whitelists are still open and `listId` names none. `error.details.lists` names them |
| `TX_ENTRIES_MISMATCH` | `400` | The transaction does not cover this customer's wallet |
| `UNAUTHORIZED_SIGNER` | `403` | The transaction was signed by a wallet that is not registered to your instance |
| `CUSTOMER_NOT_FOUND` | `404` | No customer of your instance matches `customer` |
| `NOTHING_TO_CONFIRM` | `409` | The onboarding expects no signed transaction. `error.details` carries its `status` |
| `ONBOARDING_STATE_CHANGED` | `409` | The onboarding waits for another kind than the one named. Build the transactions again |
| `RATE_LIMIT_EXCEEDED` | `429` | More than 120 onboarding writes in the minute |
| `ONBOARDING_CONFIRM_FAILED` | `500` | The confirmation failed on the server |
| `CHAIN_UNAVAILABLE` | `503` | The chain could not be read. Retry shortly |

A transaction that is not mined, reverted, sent to another contract or signed by a wallet that is not registered to your instance is refused with the code the confirmation of its kind documents.


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