#hans_best-practices

1 messages ¡ Page 1 of 1 (latest)

neat jackalBOT
#

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

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

keen thunder
#

I'm confused because I am using the paymentIntents


  const paymentIntent = await stripe.paymentIntents.create({
    customer: 'cus_QsdHIYNAwg4YKC',
    amount: 100,
    currency: 'usd',
  });

That customer has a payment method, but the payment is shown as incomplete

atomic ingot
#

Alternatively, you can add a free trial that ends at the end of the month.

#

You shouldn't be creating Payment Intents if you're using Checkout.

#

Or if you're using Subscriptions.

#

To clarify, you are asking about setting up a Subscription, correct?

keen thunder
#

Variable usage billing

#

We're collecting billing information during user sign up

atomic ingot
#

Yeah, so you won't be creating Payment Intents directly.

#

Ah, okay, so you only want to use Checkout to collect payment info, not to start the Subscription?

keen thunder
#

Maybe, subscription in the Stripe sense is new to me so I don't know if it's appropraite or not

#

but we do need billing ahead of time, but charge at the end of the month

atomic ingot
#

Let's back up a bit. Without worrying about anything Stripe-specific, tell me what you want to build at a high level. What's your ideal flow?

keen thunder
#

User signs up (or creates a new org) and must provide billing information. As they use resources through the month, we'll measure this and then charge the user at the end of the month. The user should be able to update their billing information.

atomic ingot
#

Does your user pay anything up front, at the same time as they provide their payment info?

keen thunder
#

I could see where we may have a monthly fixed cost in the future, but for now it's only on usage and not charged if not used.

As the user is signing up, nothing is charged but we do want billing information.

atomic ingot
#

After that you'll have a Customer with a Payment Method attached to them you can use for the Subscription.

keen thunder
atomic ingot
keen thunder
#

How do I test a payment through a subscription?

atomic ingot
#

The guide I linked to above is for collecting payment info without taking a payment at that time.

#

Everything I'm describing will work in test mode with our test cards.

keen thunder
#

Can I trigger a subscription to bill?

atomic ingot
#

The guides walk you though building these things in test mode first.

#

Not sure I understand your question, can you provide more details?

keen thunder
#

Thanks. I'm in a sandbox (very nice) and using that to create customers and test our billing flow

#

I'm trying to prove to myself that I'm setting this up correctly

#

so, I want to prove that I can set up a subscription and see the bill work for a test customer

atomic ingot
keen thunder
#

I set up the save-during-payment yesterday from advice and got stuck on actually billing a user, so I'm glad to get some more clarity on save-and-reuse

atomic ingot