#Daniyal-lookup
1 messages · Page 1 of 1 (latest)
hello @hard widget! the lookup_key parameter exists on the Price object : https://stripe.com/docs/api/prices/create#create_price-lookup_key
but i am getting lookup_key null in price object
can you share the snippet of code which you're having issues with?
first i create som products thoroug stripe dashboard
later is used
stripe.prices.list() to get all the prices created and i got
``
{
"id": "price_1JwiZ0I8ZBVnTxbVZVynZxgb",
"object": "price",
"active": true,
"billing_scheme": "per_unit",
"created": 1637134094,
"currency": "usd",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"product": "prod_KbwR9sGlBJW0oz",
"recurring": {
"aggregate_usage": null,
"interval": "month",
"interval_count": 1,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 20000,
"unit_amount_decimal": "20000"
}
you can check lookup_key is null and i want to now should i need to create them or they created automatically
did you create the Price via the Dashboard as well?
@hard widget you cannot set a lookup_key using the Dashboard and it's not automatically set
what you can do is to update an existing price : https://stripe.com/docs/api/prices/update#update_price-lookup_key
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
oh so i now i hav to assign lookupkeys using stripe api call right
yep
thank alot for helping out
no problem 🙂