#ibgoldbergs

1 messages · Page 1 of 1 (latest)

meager forgeBOT
shell marten
#

Out of interest, why create a Setup Intent separately if you're immediately creating a Subscription? This isn't very optimal

#

Looking at your actual Q now

quartz quail
#

We are creating setup intent in order to make sure the credit card is OK and that we can provide an error to the user on the front end if its not okay

#

Is there a more optimal way?

#

How do we use invoices/upcoming if we want to show the user how much they will be billed for / credited PRIOR to processing the upgrade?

shell marten
shell marten
quartz quail
# shell marten You'd use the `subscription_items` and `subscription` param to reflect the upgra...

Not sure I understand. What is the order of operations? Here's what my current thinking is:

  1. User chooses plan / price point in the UI
  2. User chooses which payment method they want to use for the upgrade / downgrade
  3. User should be able to preview how much the upgrade will cost or how much the downgrade will credit them (using always invoice prorations)
  4. User can then complete transaction and we hit the subscription update endpoint, removing the old price point and adding the new one.

What I'm not sure how to do is #3 in this flow.

shell marten
#

Do you have an existing sub_xxx you can use? Did you try the API I shared?

#

You can preview an invoice with hypothetical upgrades/downgrades using the parameters I noted. Easiest way is to just try it

quartz quail
#

Let me try it with test mode

#

ill get back to you