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

# Quickstart

> Issue a test pass, send it to a phone, and update it.

This guide uses a test key, so passes use TapAce's demo signing setup by default and you don't need Apple or Google credentials yet.

For a Node.js integration, follow the [SDK quickstart](https://tapace.lk/docs/sdk/node/quickstart.md). It covers the same issue, deliver and update flow with typed methods and stable idempotency keys.

The cURL examples below start new operations. Save the generated idempotency key before sending each mutation, and reuse that same key and body if you retry it. See [Idempotency](https://tapace.lk/docs/idempotency.md).

**1. Create a test API key**

In the [dashboard](https://app.tapace.lk), open **Developers → API keys**, choose **Test** and select **Create key**. Copy the key straight away: it starts with `tapace_test_` and is shown only once.

**2. Design a template**

Open **Templates**, choose a starter under **Start from a starter**, and customize it. For every value that changes from holder to holder, such as a member name, set the field's **Value binding** to **Per-pass value**. Its **key** is the name you send in `fieldValues`.

Copy the template ID from its page, then check which fields each pass needs:

```bash theme={null}
curl https://api.tapace.lk/v1/templates/tmpl_Q4vN8xT2mLr7KpZs3Wd1 \
  -H "Authorization: Bearer $TAPACE_API_KEY"
```

The response lists them in `requiredFields`, for example `["memberName"]`.

**3. Issue a pass**

```bash theme={null}
curl https://api.tapace.lk/v1/passes \
  -H "Authorization: Bearer $TAPACE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "tmpl_Q4vN8xT2mLr7KpZs3Wd1",
    "holderName": "Nimal Perera",
    "holderEmail": "nimal@example.com",
    "fieldValues": { "memberName": "Nimal Perera", "points": 120 }
  }'
```

The response is the new pass. Keep its `id` so you can update it later.

**4. Send it to the holder**

The pass carries a `distributionUrl`, such as `https://tapace.lk/p/6BkJLsso1xyB`. Open it on a phone, or send it to the holder by email or SMS. The page offers **Add to Apple Wallet** and **Add to Google Wallet**. See [Deliver passes](https://tapace.lk/docs/guides/deliver-passes.md).

**5. Update it**

Change a value and TapAce pushes the update to every wallet that saved the pass:

```bash theme={null}
curl -X PATCH https://api.tapace.lk/v1/passes/pass_7hGk2LmQ9xVt4RnB8cYe \
  -H "Authorization: Bearer $TAPACE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "fieldValues": { "points": 150 }, "notificationMode": "notify" }'
```

## Next steps

> [card] [Go live](https://tapace.lk/docs/environments.md)
>
> Switch to a live key and your own certificates.

> [card] [Webhooks](https://tapace.lk/docs/guides/webhooks.md)
>
> Find out when a holder adds or removes a pass.


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