# Complete consent

Verifies the passkey signature over the drafted mandate, activates it, sets the capped spending permission on the consumer's wallet and returns the redirect URL with mandate_id. Anyone holding a pending consent token; rate limited to 30 requests per minute per IP.

`POST /v1/public/consent/{token}/complete`

Verifies the passkey signature over the drafted mandate, activates it, sets the capped spending permission on the consumer's wallet and returns the redirect URL with mandate_id. Anyone holding a pending consent token; rate limited to 30 requests per minute per IP.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `token` | path | yes | One-time consent token from the link the platform sent the consumer (valid 24 hours). |

## Request body

```json
{
  "challenge_id": "cha_01jd2x3k4m5n6p7q8r9s0t1v2w",
  "credential": {}
}
```

## Responses

- **200**: Success.
- **400**: Invalid request: a field is missing or malformed (VALIDATION_ERROR).
- **403**: Authenticated but not allowed: missing permission, passkey step-up required, or denied by policy.
- **404**: The resource does not exist or belongs to another organization.
- **409**: Conflicts with the current state, for example a reused Idempotency-Key or an illegal state change.
- **429**: Too many requests; retry later.

Example 200 response:

```json
{
  "redirect_url": "https://example.com/resource",
  "mandate_id": "mdt_01jd2x3k4m5n6p7q8r9s0t1v2w",
  "status": "active",
  "delegation": {
    "id": "id_01jd2x3k4m5n6p7q8r9s0t1v2w",
    "status": "active",
    "network": "eip155:84532",
    "asset": "USDC",
    "owner_address": "string",
    "cap_base_units": "50000",
    "tx_ref": "string",
    "explorer_url": "https://example.com/resource"
  },
  "funding": {
    "network": "eip155:84532",
    "network_name": "string",
    "asset": "USDC",
    "address": "string",
    "token_account": "string",
    "balance_base_units": "50000",
    "needs_funds": true,
    "faucet_url": "https://example.com/resource",
    "fund_command": "string",
    "instructions": "string"
  }
}
```
