#arnotixe - Prices

1 messages ยท Page 1 of 1 (latest)

ashen steppe
#

Hi ๐Ÿ‘‹

glad bluff
#

๐Ÿ‘‹ That looks like an avatar from Moomin

ashen steppe
#

So you want to define the ID yourself when creating the price object?

glad bluff
#

โ€ฆ 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

ashen steppe
#

Does that get you closer to what you're looking for?

glad bluff
#

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 ๐Ÿ‘

ashen steppe
#

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.

glad bluff
#

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,

#

๐Ÿ™ƒ

ashen steppe
#

Weird... I'm reaching out to some colleagues who might have more context.

#

I still doubt we'll be able to provide the functionality but at least I could potentially let you know how this happened