#nukesforbreakfast_best-practices

1 messages ¡ Page 1 of 1 (latest)

spark ridgeBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1347030947840790650

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

tender flame
#

Yes you are right, you can use product_data to create an inline product

little swift
#

Ok, and it shouldn't appear in the dashboard?

tender flame
#

You can find the product in dashboard

#

If you want to achive the inline product, add active:false to product_data

little swift
#

Ok, let me test

little swift
#

well, those products are still showing up in the dashboard, so they are not "ad-hoc" I guess.

#

I have a different issue now though. I'm not getting results expanded as expected.

#
initial_fee_price = stripe_client.prices.retrieve(
    stripe_ids["initial_fee_price_id"], options={"expand": ["product"]}
)
<Price price id=price_1QzVTwB7kbjcJ8Qq1RGsF70S at 0x7f3a4dfec780> JSON: {
  "active": true,
  "billing_scheme": "per_unit",
  "created": 1741233144,
  "currency": "usd",
  "custom_unit_amount": null,
  "id": "price_1QzVTwB7kbjcJ8Qq1RGsF70S",
  "livemode": false,
  "lookup_key": null,
  "metadata": {},
  "nickname": null,
  "object": "price",
  "product": "prod_RtI4cVNLKiszun",
  "recurring": {
    "aggregate_usage": null,
    "interval": "year",
    "interval_count": 1,
    "meter": null,
    "trial_period_days": null,
    "usage_type": "licensed"
  },
  "tax_behavior": "unspecified",
  "tiers_mode": null,
  "transform_quantity": null,
  "type": "recurring",
  "unit_amount": 5000,
  "unit_amount_decimal": "5000"
}

the product field is not expanded.

#
  • req_hnGhffgmI4YuNy
  • req_hnGhffgmI4YuNy
tender flame
#

Can you tell me what you want to achieve? There's no way to create a price without a product.

little swift
#

I also just figured out that expand goes in params and not options.

little swift