# Approve a Secondary Quote's Payment

> Coming soon, upon request — this feature is turned on for your tenant by the Aurea team. [Contact us](https://www.aureahub.com/contact)

Allows the swap exactly the amount the quote pays, from the quote's wallet.

## Overview

- Only for a quote with `approvalRequired`, still `quoted` and within its time (otherwise `400` `TOKENIZED_ASSETS_SECONDARY_REFUSED` `This quote needs no approval.`, or `409`). The quote's checks run again. The quote moves to `approving`.
- The answer: `step` (`approval` or `swap`); for a wallet Aurea signs for, `txHash`, `status` and, for the swap, `transactionId` — the swap's transaction among the user's ([Get Transaction](https://docs.aureahub.com/docs/tx-get.md)); for a wallet its owner signs for, `requiresClientSigning: true`, `txHashToSign`, `preparedTxId`, the fee fields and `expiresAt` — sign `txHashToSign` and send it to [Send a Signed Step](https://docs.aureahub.com/docs/tok-secondary-broadcast.md) with `preparedTxId`. Every answer carries `redeemableFromIssuer: false` and the `disclosure` to show the user.
- Takes an `Idempotency-Key`. 10 a minute. User token and the tenant signature ([Calling the Routes](https://docs.aureahub.com/docs/guide-tokenized-assets.md)); for `user`, `owner`, `tenantadmin` and `signer`, for themselves (another role: `403`).

## Errors

Besides [the answers every tokenized assets route can give](https://docs.aureahub.com/docs/guide-tokenized-assets.md) (no valid token or signature, the module not set up or not switched on, a field that does not fit):

| Status | details.code | When |
| --- | --- | --- |
| 403 | — | The caller's role may not call it (`Your role does not have permission to perform this action.`). |
| 404 | TOKENIZED_ASSETS_QUOTE_NOT_FOUND | `There is no such quote of yours in this environment.` (`details.quoteId`). |
| 409 | TOKENIZED_ASSETS_QUOTE_NOT_EXECUTABLE | `This quote cannot be acted on: it is not waiting to be.` (`details.status`) |
| 409 | TOKENIZED_ASSETS_QUOTE_EXPIRED | `This quote has expired: ask for a new one.` |
| 404 | TOKENIZED_ASSETS_ASSET_NOT_OFFERED | `This tenant does not offer this asset.` |
| 409 | TOKENIZED_ASSETS_NOT_SUPPORTED_FOR_ASSET | `This is not available for this asset.` |
| 403 | TOKENIZED_ASSETS_SECONDARY_ROUTE_OFF | `This tenant does not offer the secondary route.` |
| 400 | TOKENIZED_ASSETS_QUOTE_NOT_SUPPORTED | `This asset is not traded on the secondary route.` |
| 403 | TOKENIZED_ASSETS_… (eligibility) | The user's eligibility and documents, as for a [binding quote](https://docs.aureahub.com/docs/tok-quote-create.md). |
| 409 | TOKENIZED_ASSETS_ASSET_PAUSED | `Trading in this asset is paused.` (`details.side`). |
| 400 | TOKENIZED_ASSETS_SECONDARY_REFUSED | `This quote needs no approval.` (`details.field` `quoteId`) |
| 423 | TENANT_FROZEN, USER_FROZEN, ACCOUNT_FROZEN, WALLET_FROZEN, OPERATION_QUARANTINED | Something is frozen ([Freezes](https://docs.aureahub.com/docs/guide-freezes.md)); `503` `FREEZE_STATUS_UNREAD` when that cannot be read. |
| 400 | TOKENIZED_ASSETS_SECONDARY_REFUSED | `The swap could not be carried out.` (`details.status`). |
| 503 | TOKENIZED_ASSETS_SECONDARY_ROUTER_UNAVAILABLE | `The secondary market cannot be reached at the moment: try again shortly.` |

## Endpoint

### `POST /v1/tokenized-assets/secondary/quotes/{quoteId}/approve`

Authentication: bearer token required.

Approves exactly the amount the quote pays.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `quoteId` | string | yes | A UUID. |

**Headers**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | no | Optional — required for a tenant on the institutional security profile (`400` `IDEMPOTENCY_KEY_REQUIRED` without it). Up to 255 letters, digits, - or _. The same key with the same request answers with the first answer (`idempotency-replayed: true`) instead of running it again; see [Idempotency](https://docs.aureahub.com/docs/idempotency.md) |

**Request body**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `isTestnet` | boolean | no | `true` for the test environment; `false` (the default) for production. |

**Responses**

`200` To Sign

```json
{
  "quoteId": "6f1c2d8e-4b7a-4c1e-9a52-3e2f0d9b7c41",
  "step": "approval",
  "requiresClientSigning": true,
  "preparedTxId": "b3e0f0a2-91c4-4f7e-8d0e-5a1c7f2e9d10",
  "txHashToSign": "0x9c2f…41d8",
  "chainId": 1,
  "nonce": "17",
  "maxFeePerGas": "36000000000",
  "maxPriorityFeePerGas": "1500000000",
  "expiresAt": "2026-10-07T15:08:10.000Z",
  "redeemableFromIssuer": false,
  "disclosure": "Bought or sold on the secondary market, through third-party liquidity: the price is indicative until the swap is carried out, and tokens bought this way cannot be redeemed from their issuer."
}
```

[Contact us for details](https://www.aureahub.com/contact).

---

Web version: https://docs.aureahub.com/#tok-secondary-approve
