> For the complete documentation index, see [llms.txt](https://developer.paddle.com/llms.txt).

# Paddle IDs

Paddle IDs are unique identifiers for entities in Paddle. They're easily identifiable by type and lexicographically sortable.

---

Every entity in Paddle has a unique identifier called a Paddle ID. Paddle IDs are made up of a prefix for the kind of entity, followed by a unique string of 26 alphanumeric characters.

Prefixes are typically three characters, but can be longer. They're distinctive, so it's easy to tell what kind of entity you're working with from a Paddle ID alone.

## ID prefixes

| Entity | Prefix | Regex |
| --- | --- | --- |
| [Address](https://developer.paddle.com/api-reference/addresses.md) | `add_` | `^add_[a-z\d]{26}$` |
| [Adjustment](https://developer.paddle.com/api-reference/adjustments.md) | `adj_` | `^adj_[a-z\d]{26}$` |
| [API key](https://developer.paddle.com/api-reference/about/api-keys.md) | `apikey_` | `^apikey_[a-z\d]{26}$` |
| [API key exposure](https://developer.paddle.com/webhooks/api-key-exposures/api-key-exposure-created.md) | `apkexp_` | `^apkexp_[a-z\d]{26}$` |
| [Business](https://developer.paddle.com/api-reference/businesses.md) | `biz_` | `^biz_[a-z\d]{26}$` |
| [Client-side token](https://developer.paddle.com/api-reference/client-tokens.md) | `ctkn_` | `^ctkn_[a-z\d]{26}$` |
| [Customer](https://developer.paddle.com/api-reference/customers.md) | `ctm_` | `^ctm_[a-z\d]{26}$` |
| [Customer portal session](https://developer.paddle.com/api-reference/customer-portals.md) | `cpls_` | `^cpls_[a-z\d]{26}$` |
| [Discount](https://developer.paddle.com/api-reference/discounts.md) | `dsc_` | `^dsc_[a-z\d]{26}$` |
| [Discount group](https://developer.paddle.com/api-reference/discount-groups.md) | `dsg_` | `^dsg_[a-z\d]{26}$` |
| [Event](https://developer.paddle.com/api-reference/events.md) | `evt_` | `^evt_[a-z\d]{26}$` |
| [Notification](https://developer.paddle.com/api-reference/notifications.md) | `ntf_` | `^ntf_[a-z\d]{26}$` |
| [Notification log](https://developer.paddle.com/api-reference/notification-logs.md) | `ntflog_` | `^ntflog_[a-z\d]{26}$` |
| [Notification setting](https://developer.paddle.com/api-reference/notification-settings.md) | `ntfset_` | `^ntfset_[a-z\d]{26}$` |
| [Notification simulation](https://developer.paddle.com/api-reference/simulations.md) | `ntfsim_` | `^ntfsim_[a-z\d]{26}$` |
| [Simulation run](https://developer.paddle.com/api-reference/simulation-runs.md) | `ntfsimrun_` | `^ntfsimrun_[a-z\d]{26}$` |
| [Simulation run event](https://developer.paddle.com/api-reference/simulation-run-events.md) | `ntfsimevt_` | `^ntfsimevt_[a-z\d]{26}$` |
| [Payment method](https://developer.paddle.com/api-reference/payment-methods.md) | `paymtd_` | `^paymtd_[a-z\d]{26}$` |
| [Price](https://developer.paddle.com/api-reference/prices.md) | `pri_` | `^pri_[a-z\d]{26}$` |
| [Product](https://developer.paddle.com/api-reference/products.md) | `pro_` | `^pro_[a-z\d]{26}$` |
| [Report](https://developer.paddle.com/api-reference/reports.md) | `rep_` | `^rep_[a-z\d]{26}$` |
| [Subscription](https://developer.paddle.com/api-reference/subscriptions.md) | `sub_` | `^sub_[a-z\d]{26}$` |
| [Transaction](https://developer.paddle.com/api-reference/transactions.md) | `txn_` | `^txn_[a-z\d]{26}$` |

Some entities don't have Paddle IDs. [Event types](https://developer.paddle.com/api-reference/event-types.md), [simulation types](https://developer.paddle.com/api-reference/simulation-types.md), [metrics](https://developer.paddle.com/api-reference/metrics.md), and [pricing previews](https://developer.paddle.com/api-reference/pricing-preview.md) are reference data or calculated responses, so they don't have a persistent ID.

## Work with IDs

Paddle automatically generates IDs for you when you create entities using the API or dashboard. Use Paddle IDs to refer to entities throughout the Paddle platform.

### Create entities

When creating entities using the API, Paddle returns the new Paddle ID for the entity in the response.

### Get entities

When reading, updating, or deleting entities, use the ID to refer to the correct entity. For example:

{% api-endpoint method="GET" path="/products/{product_id}" %}

{% /api-endpoint %}

### List entities

When working with list endpoints, Paddle uses the Paddle ID of the entity you're working with as the cursor for [pagination](https://developer.paddle.com/api-reference/about/pagination.md).

{% api-endpoint method="GET" path="/products?after={product_id}" %}

{% /api-endpoint %}

### Relate entities

Where entities are related, use Paddle IDs to link them. For example:

- When [creating a price](https://developer.paddle.com/api-reference/prices/create-price.md), pass a `product_id` to set the product that a price relates to.
- When [creating a transaction](https://developer.paddle.com/api-reference/transactions/create-transaction.md), pass a `customer_id` and `address_id` to set who to bill.
- When the [`subscription.created`](https://developer.paddle.com/webhooks/subscriptions/subscription-created.md) event occurs, it includes the `transaction_id` of the transaction that resulted in this subscription being created.

## Sort by ID

Paddle IDs are lexicographically sortable. [Sorting](https://developer.paddle.com/api-reference/about/filter-search-sort.md) by Paddle ID results in the same order as sorting by the creation date of an entity.