---
# @generated by sylphx-gen. Do not edit.
title: "Mint a claim code"
description: "`money.claim_codes.mint` (POST /v1/{parent}/claim_codes:mint): MintClaimCode mints one bearer code with a 24-hour claim window."
type: reference
product: payments
summary: "MintClaimCode mints one bearer code with a 24-hour claim window."
nav: false
---

MintClaimCode mints one bearer code with a 24-hour claim window.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/reseller_channels/reseller-channel/claim_codes:mint`
- **Scope** `money:partner_resold:write`
- **Effect** `write` — a successful call changes state.
- **Collection** [claim_codes](/docs/api/claim_codes)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `parent` | `string` | Reseller channel name. Required. |
| `partner_order_id` | `string` | Stable reseller-assigned order identifier. Required. |
| `price_key` | `string` | Price key from the environment catalog. Required. |
| `seats` | `int32` | Total seats in this receipt. Required. |
| `intended_recipient` | `ClaimRecipient` | Omit for a transferable code. |
| `customer_organization` | `string` | Optional fixed workspace subject. The environment's authorized server must attest the redeeming user's billing authority for this exact ID. |

### ClaimRecipient

| Field | Type | What it is |
| --- | --- | --- |
| `email` | `string` | Verified primary email, trimmed and case normalized. |
| `end_user` | `string` | Canonical environment Auth end-user identifier. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | Canonical resource name. |
| `uid` | `string` | Immutable resource identifier. Output only. |
| `meta` | `ResourceMeta` | Resource metadata. Output only. |
| `code_id` | `string` | Opaque code identifier, not the redeemable bearer value. Output only. |
| `code` | `string` | Omitted by protobuf on terminal receipts (no plaintext remains available). Output only. Never returned again. |
| `code_masked` | `string` | Non-redeemable display hint. Output only. |
| `partner_order_id` | `string` | Stable reseller-assigned order identifier. Output only. |
| `price_key` | `string` | Price key from the environment catalog. Output only. |
| `seats` | `int32` | Total seats in this receipt. Output only. |
| `redeemed_seats` | `int32` | Seats already claimed by a buyer. Output only. |
| `unclaimed_seats` | `int32` | Seats that were not claimed. Output only. |
| `expires_at` | `timestamp` | Exclusive expiry boundary. Money sets it 24 hours after mint. Output only. |
| `disposition` | `string` | Business state of this receipt, not a payment status. Output only. |

### ResourceMeta

| Field | Type | What it is |
| --- | --- | --- |
| `generation` | `int64` | Increases by one on every change to `spec`. Output only. |
| `etag` | `string` | Strong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as `If-Match` or `etag` to make Update and Delete conditional; a mismatch fails with ABORTED / 409 `ETAG_MISMATCH`. Output only. |
| `create_time` | `timestamp` | When the Resource was created. Output only. |
| `update_time` | `timestamp` | When the Resource last changed. Output only. |
| `delete_time` | `timestamp` | Set while the Resource is being deleted. Output only. |
| `labels` | `map<string, string>` | Caller-writable, indexed labels (AIP-122 label rules). |
| `annotations` | `map<string, string>` | Caller-writable, unindexed annotations. |
| `display_name` | `string` | Caller-writable human-readable name. |
| `creator` | `string` | The principal that created the Resource. Output only. |

## Errors

- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`FAILED_PRECONDITION`](/docs/api/errors/FAILED_PRECONDITION) — A released manifest owns a requested resource field. Change the declaration in the named file and key path, then release.
- [`RESOURCE_IN_USE`](/docs/api/errors/RESOURCE_IN_USE) — The Resource is attached to or held by another Resource, for example a volume attached to a running lease.
- [`RESOURCE_ALREADY_EXISTS`](/docs/api/errors/RESOURCE_ALREADY_EXISTS) — A Resource with this name exists.
- [`IDEMPOTENCY_KEY_REUSED`](/docs/api/errors/IDEMPOTENCY_KEY_REUSED) — An Idempotency-Key was reused with another body.
- [`UNAVAILABLE`](/docs/api/errors/UNAVAILABLE) — The Resource store, the owning service's backend, or the key verifier's snapshot is unavailable; retry after Retry-After.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/reseller_channels/reseller-channel/claim_codes:mint" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"partner_order_id":"…","price_key":"…","seats":1}'
```

**TypeScript**

```ts
const response = await sylphx.money.claimCodes.mint({ parent: 'orgs/acme/projects/shop/envs/production/reseller_channels/reseller-channel', partnerOrderId: '…', priceKey: '…', seats: 1 })
```

**Rust**

```rust
let mut req = sylphx::money::MintClaimCodeRequest::default();
req.parent = "orgs/acme/projects/shop/envs/production/reseller_channels/reseller-channel".to_string();
req.partner_order_id = "…".to_string();
req.price_key = "…".to_string();
req.seats = 1;
let response = sx.money().claim_codes().mint(req).await?;
```

**CLI**

```bash
sylphx money claim-codes mint orgs/acme/projects/shop/envs/production/reseller_channels/reseller-channel
```

**MCP**

```json
{ "method_id": "money.claim_codes.mint", "args": {"parent":"orgs/acme/projects/shop/envs/production/reseller_channels/reseller-channel","partner_order_id":"…","price_key":"…","seats":1} }
```
