#blackbearftw_docs
1 messages ¡ Page 1 of 1 (latest)
đ 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/1296195095330160762
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
No
alright
is it possible to confirm that a user has a valid payment method before creating a pay as you go subscription?
by for example charging them 0,01 or whatever
In the normal subscription flow, the customer pays the first invoice on session so you should know whether or not the payment method is valid: https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=elements
so I can send them to the stripe portal, they will enter their information, my api gets the customer id back, I store that and then use it later for billing?
yeah
alright
last question, if I make a subscription throught the api, why do I have to pass a price_id instead of a product_id?
You can inlcude the price data and pass the product id: https://docs.stripe.com/api/subscriptions/create#create_subscription-items-price_data if you do not want to create the price first.
We document a bit of it here: https://docs.stripe.com/products-prices/how-products-and-prices-work on how products and prices work.
Can you tell me more on why that is a concern for your integration?
Can you share more details as to why that is the case? One product can have many prices. Like a T-shirt can have 4 colors. Depending on the colore, the price could be different so you would want 4 prices on the same product. Hence, you would want to pass the price id.
yeah I guess you are right
in this case, would it make sense to listen to checkout.session.completed or customer.subscription.created?
That depends on your exact integration and how you plan to use those events. I find this StackOverlow question helpful on checkout.session.completed for different payment methods: https://stackoverflow.com/questions/72165704/stripe-checkout-webhook-which-event-to-listen-for.
It just all depends on how you want to use it for your integration
alright
I was just thinking
I see that its possible to add custom fields to stripe checkout
can I also make those fields read only?
with a custom value
would like to show the name of the tenant they are trying to create
or maybe even edit the name field with a different label, since a customer is a tenant in my scenario