#stevez4081

1 messages · Page 1 of 1 (latest)

paper cloakBOT
dusky kettle
livid jewel
#

great, how would this work for a subscription that hasn't been created yet?

dusky kettle
#

you can preview creating a subscription

livid jewel
#

great, is there documentation on that?

dusky kettle
#

we don't actually have a guide for it, you would pass in the same details as if you were creating a Subscription

livid jewel
#

how do I make sure it isn't charged?

#

so I could same details / items to create invoice but with auto_advance: false?

dusky kettle
#

upcoming invoice is a preview

#

nothing is actually charged or created

livid jewel
#

yeah but its retrieving and I want to create one

dusky kettle
#

sorry i'm not sure i understand, so are you saying you want to create a Subscription after using upcoming invoice to generate a preview?

livid jewel
#

I would like to preview a subscription price to a user before they're charged, I'd like to show the user the price they're about to be charged including credit, discounts and coupons in whatever currency they're using

dusky kettle
#

yes, and using the upcoming invoice can do what you're looking for

#

have you tried it out?

livid jewel
#

I'm going through the API

#

We currently create a subscription and its charged immediately

dusky kettle
#

can you share the request id where you've tried out the upcoming invoice?

livid jewel
#

I don't have one yet, are you saying to create an invoice or create a subscription? I'm trying to figure out which request I need to make

#

so I assume I would create a subscription in a draft status?

#

and then get the upcoming invoice?

dusky kettle
livid jewel
#

oh i see

dusky kettle
#

you will pass in the customer and subscription_items and any other parameters that you want to include

livid jewel
#

so invoice_items = subscription.add_invoice_items

#

got it