#arnotixe - Prices
1 messages ยท Page 1 of 1 (latest)
๐ That looks like an avatar from Moomin
So you want to define the ID yourself when creating the price object?
โฆ well, want - I don't actually need to, I just saw that creating with id specified failsโฆ
And then when querying existing price entries I see user defined names
8: "price_1LPXP2LYbD2uWeLiCOQMD7lG"
9: "price_1LPWyULYbD2uWeLigVV1X40H"
10: "ht_coaching_1"
11: "legacy_qrt_4"
12: "legacy_pp_11"
13: "legacy_pif_1"
14: "legacy_deposit_1"
15: "price_1LOQRrLYbD2uWeLi6ZpqTa3e"
and so on
You can specify a lookup_key when creating a Price via the API: https://stripe.com/docs/api/prices/create#create_price-lookup_key
Does that get you closer to what you're looking for?
aha ok but the customer actually have their own Price ID (id field) defined, I was just curious how that was possible
"unit_amount_decimal": "10000"
},
{
"id": "ht_coaching_1",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1658589082,
"currency": "usd",
"custom_unit_amount": null,
check that id out ๐
Not hugely important. Probably from the past hehe
Was just the user filtered prices by price.id and now cannot add new entries like this (api createPrice with id specified fails).
I'll just combine with the prices' products and filter by product id instead, no problem ๐
Okay, I'm still curious because I know I've seen odd price IDs before too. I'm gonna see what happens when I specify a lookup_key and check for other features.
Yeah kind of curious case hehe
I created a price for fun and
id is "price_1LXYnnLYbD2uWeLilYjtqyXj" , lookup_key "toughluck"
When querying it does return id, not lookup_keyโฆ
While some of the strange Prices have no lookup key at all:
{
"id": "dgic-97_3",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1654906879,
"currency": "usd",
"custom_unit_amount": null,
"livemode": false,
"lookup_key": null,
๐