#lucas_best-practices

1 messages ¡ Page 1 of 1 (latest)

magic willowBOT
#

👋 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/1389723063674867884

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

grizzled geode
#

Hi there

#

Just to be clear, are you referring to Invoice Items in the context of Subscriptions or something else?

deft herald
#

subscriptions and invoices both!

grizzled geode
#

I can't speak to how more dynamic pricing affects payment success or fraud rates. We're not experts on that in this channel. That said, having dynamic pricing from one billing period to the next on a Subscription might become a headache to manage. Was your plan to us SubscriptionSchedules in this case? Can you share more details on the motivation for fluctuating amounts?

deft herald
#

mm thats a good question. its more that the dynamic piece of it is set up when the subscription is created. we've reviewed tools like voucherify and talon.one and may move to one of those eventually but want to take a small step forward first. we're thinking about dynamic bundle discounts, subscribe and save, gift with purchase, auto discounts by advertising channel, things like that

#

in the case where a current customer upsells into a deeper discount my plan would be to recreate their subscriptions, i think

grizzled geode
#

I see, okay. If it's on creation, you can use items.price_data to create one-off Price objects for that Subscription. Those one-off Price objects will still be assigned a Price ID but those objects will be automatically archived and won't be available for use on any other Subscriptions. If an upsell happens, how you handle that will be up to you and what you want the customer experience to be: do you want to allow a change to the Subscription partway through a billing period? do you want the change to happen at the end of the current billing period?

deft herald
#

oh items.price_data is a good call-out i wasnt thinking of, i was exploring something like this

const lines = await stripe.invoices.addLines(invoice.id, {
    lines: [
      {
        amount: priceInCents,
        metadata: {
          sku,
        },
        description: name,
      },
    ],
  });

which wouldnt get tied to the stripe price but uses metadata to get the line tied to something on our side (i called it sku)

customer experience is quite simple for us - the subscriptions are modeled basically simply to be recurring invoices (no proration or anything). we ship products on a schedule. so i'd just cancel out old ones and recreate

#

with price_data i would supply a price_id then also a unit_amount?

#

gotta run thanks for the help

grizzled geode