> ## Documentation Index
> Fetch the complete documentation index at: https://trust-link-tsn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a TIN

> Create a wallet-linked 10-digit payment identity and use it to receive a payment.

Create a 10-digit **Transfer Identity Number (TIN)** for the wallet that will own it. Once registration confirms, use the TIN as the recipient for a test payment.

## Before you start

* Open your configured instance of TSN XP, the TSN reference app.
* Connect the wallet you want to keep using for owner access. The wallet must support signing messages.

## Register in TSN XP

**1. Open Create TIN**

Choose **Create TIN**, enter your display name, and select **Prepare owner creation**.

**2. Approve creation with your wallet**

Review the prompts for local seed encryption, local TIN recovery encryption, and approval of the creation request.

**3. Copy the confirmed TIN**

Wait for XP to display your new TIN and the Solana signature. Copy the TIN as a ten-character string so any leading zero is preserved.

If the wallet already owns a TIN, use wallet recovery to retrieve it. If submission stalls, check the original operation before requesting another approval. [Recover an existing TIN](https://trust-link-tsn.mintlify.site/developers/private-tin-issuance.md#recover-an-existing-tin)

## Add creation to your app

Follow the XP implementation to allocate the TIN in a trusted issuer and prepare the owner's encrypted recovery data in their browser. The issuer builds the request with `buildTinV1Creation` and generates the issuance proof for that exact request. Keep the lookup secret on the trusted backend and the recovery signature on the owner's device. [Issuer implementation](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/protocol-tests/ui/server.mjs) · [Wallet prompts](https://github.com/bigdreamsweb3/trustlink-pay/blob/main/protocol-tests/ui/public/tsn-dapp.js)

Create the exact message on the issuer's backend and send it to the owner to sign. After the owner signs its UTF-8 bytes with their wallet, submit using the saved request and proof.

```ts create-tin.ts theme={null}
import {
  buildTinOwnerIntentMessage,
  submitTinV1Creation,
  type buildTinV1Creation,
} from "@trustlink/tsn-sdk/tins";

type PreparedTin = ReturnType<typeof buildTinV1Creation>;

export function getCreationApproval(prepared: PreparedTin): string {
  return new TextDecoder().decode(buildTinOwnerIntentMessage(prepared.intentHash));
}

export function submitApprovedTin(input: {
  receiverUrl: string;
  prepared: PreparedTin;
  intentId: string;
  lookupIssuanceProof: string;
  ownerSignature: Uint8Array;
}) {
  return submitTinV1Creation({
    ingressUrl: input.receiverUrl,
    prepared: input.prepared,
    intentId: input.intentId,
    lookupIssuanceProof: input.lookupIssuanceProof,
    ownerPubkey: input.prepared.ownerPubkey,
    ownerIntentMessage: getCreationApproval(input.prepared),
    ownerSignature: input.ownerSignature,
  });
}
```

Set `TIN_OPERATION_ID` to the returned `operationId` and `TSN_RECEIVER_URL` to your Receiver base URL.

```bash theme={null}
curl --fail-with-body "${TSN_RECEIVER_URL%/}/api/work-status/${TIN_OPERATION_ID}"
```

Wait for `TIN_OPERATION` work with status `CONFIRMED` and a `result.signature`. For staged creation, use the signature of the final registry transaction. Verify it on the Solana RPC for the same deployment, then show the TIN in the authenticated owner flow. [TIN SDK reference](https://trust-link-tsn.mintlify.site/api-reference/sdk/tins.md)

## Receive your first payment

Use the confirmed TIN as the recipient and pay from a wallet with a token accepted by your TSN deployment. [Accept a wallet-to-TIN payment](https://trust-link-tsn.mintlify.site/sdk/payment-guide.md)


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