Paddle IDs
Paddle IDs are unique identifiers for entities in Paddle. They 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 may be longer. They're distinctive, so it's easy to tell what kind of entity you're working with when using a Paddle ID.
Common examples
For example, here are some common Paddle IDs:
Entity | Prefix | Regex | Example |
---|---|---|---|
Address | add_ | ^add_[a-z\d]{26}$ | add_01gt202fr8131gahn63v9tczgm |
Adjustment | adj_ | ^adj_[a-z\d]{26}$ | adj_01ghvjt9dbpnndeqjve8cktgqs |
Business | biz_ | ^biz_[a-z\d]{26}$ | biz_01gsz92krfzy3hcx5h5rtgnfwz |
Customer | ctm_ | ^ctm_[a-z\d]{26}$ | ctm_01gt202fpjt0e63p942gw4ybvh |
Discount | dsc_ | ^dsc_[a-z\d]{26}$ | dsc_01gt218xfk7yztpvgmcazkes83 |
Event | evt_ | ^evt_[a-z\d]{26}$ | evt_01gt261mpgnbg1f3875zx2dsrd |
Notification | ntf_ | ^nft_[a-z\d]{26}$ | ntf_01gtyac3x932yhfppx6w9x4zsb |
Notification destination | nftset_ | ^nftset_[a-z\d]{26}$ | ntfset_01gtyac3wjcdtjs8csc0219x1p |
Product | pro_ | ^pro_[a-z\d]{26}$ | pro_01gsz4vmqbjk3x4vvtafffd540 |
Price | pri_ | ^pri_[a-z\d]{26}$ | pri_01gsz91wy9k1yn7kx82aafwvea |
Report | rep_ | ^rep_[a-z\d]{26}$ | rep_01hvgdpayq6kjzyk4hz5m02cpn |
Subscription | sub_ | ^sub_[a-z\d]{26}$ | sub_01gvne45dvdhg5gdxrz6hh511r |
Transaction | txn_ | ^txn_[a-z\d]{26}$ | txn_01gt261m3y0bngp73j1j8c6dge |
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:
Paddle ID of the product to get.
List entities
When working with list endpoints, Paddle uses the Paddle ID of the entity you're working with as the cursor for pagination.
Return entities after the specified cursor.
Paddle ID of the product to use as the cursor.
Relate entities
Where entities are related, use Paddle IDs to link them. For example:
- When creating a price, pass a
product_id
to set the product that a price relates to. - When the
subscription.created
event occurs, it includes thetransaction_id
of the transaction that resulted in this subscription being created.
Sort by ID
Paddle IDs are lexicographically sortable. Sorting by Paddle ID results in the same order as sorting by the creation date of an entity.