#zlf_api

1 messages · Page 1 of 1 (latest)

charred islandBOT
#

đź‘‹ 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/1349308223299125319

📝 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.

upper terraceBOT
plucky nova
#

Hi there đź‘‹ our pending updates behavior may be a good fit here. It lets you "update" a Subscription, but the updates are only actually applied once the generated Invoice for the prorations is paid. Take a look through our guide for this:
https://docs.stripe.com/billing/subscriptions/pending-updates
and let me know if that isn't what you're looking for.

Learn how to handle payment failures when updating subscriptions.

slow walrus
#

When adding a new product, can I set the "payment_behavior" field to "default_incomplete" and show the proration amount in the app so the user can pay this portion?

plucky nova
slow walrus
#

Alright, I’ll test it out.

#

One more question — we want to create a trial subscription that may include multiple products, but only the first product should be priced at 0, while the others remain at their original prices. When creating a trial subscription, is it possible to configure the billing amount?

plucky nova
#

No, if you create a Subscription in a trial period, the Invoices for that period will be $0.

#

For what you're describing, you likely won't want to put the Subscription into a trial state.

#

The easiest approach for this is probably to use items.discounts when creating the Subscription to apply a Coupon to just the items you want to discount to $0.
https://docs.stripe.com/api/subscriptions/create#create_subscription-items-discounts

One potential drawback to that, is that it may not be obvious to your cusotmers that this is your "trial" depending on whether you're planning to leverage our prebuilt UIs like Checkout Sessions or the Customer Portal.

slow walrus
#

It sounds like this could meet our needs, but in this case, it wouldn’t be considered a trial in Stripe, and for our app, it’s more like a discount rather than a trial.

slow walrus
plucky nova
#

The last part is talking about how our prebuilt UIs won't show the Subscription as being in a trial period, which may or may not be a problem, depending on whether you're planning to use them or not and whether you want these to be represented as trials or not.

#

I didn't have a ton of context on your scenario, so just wanted to surface a warning in case it was relevant to you. If it's not, you're welcome to disregard it.

slow walrus
#

Alright, thank you so much!

plucky nova
#

Any time!

charred islandBOT
slow walrus
#

When adding a new product to a subscription, I tried setting the "payment_behavior" field to "default_incomplete," but there were no payment-related parameters in the subscription details. However, there is a record in the subscription invoice. Could you please explain what’s happening here?

stuck loom
#

Looks like an prorated invoice generated to reflect the update you just made on the Subscription

#

Is your intention here to pay the invoice?

slow walrus
#

Yes, but according to the documentation, shouldn’t the user manually pay this amount? Just like when creating a trial, we should bring up Stripe’s payment component in the app, let the user enter their payment method, and complete the payment.

stuck loom
#

Yeah so then you'd expand the latest_Invoice.payment_intent field in your update call and confirm that Payment Intent

#

That's the invoice/payment to related to the upgrade you just made

slow walrus
#

Do you mean that, just like when creating a subscription, the parameters need to include latest_invoice.payment_intent, right?

stuck loom
#

Yes, expand: ['latest_invoice.payment_intent']

#

Then you can use the client_secret to confirm the intent and pay