#christian-stockklauser_checkout-save-paymentmethod

1 messages · Page 1 of 1 (latest)

muted knotBOT
#

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

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

worthy galleon
#

Hi there! In your scenario, does the customer enter their payment method details on the form and do you collect the payment at that moment for the July 1st payment? Or before?

#

Additionally, do you want to use a Stripe-hosted solution, or do you want something that you can add to your own UI?

lavish crest
#

In this scenario the client would enter the payment method through the stripe checkout ui element today.

There should be no charge until July 1st.

#

We just dont found a way to add payment method in the checkout and dont immediatelly

worthy galleon
#

Can you expand on what you mean by that? I don't quite follow

lavish crest
#

So the flow is like this:

  1. I would send out a contract to you
  2. You open the contract
  3. The contract tells the payment plan
  4. You sign the contract today
  5. You come to the thank you page
  6. You are asked to add your payment details
  7. You will be charged based on the payment plan

This means I need collect your SEPA or Credit Card now, authorize is but charge nothing today but on July 1st and on August 1st

worthy galleon
#

and today in this scenario is not July 1?

lavish crest
#

No today is June 17th. The date where you sign the contract. And directly after that you add the Payment Details and authorize me to charge you in July 1st

#

Hope to got it clear 🙂

worthy galleon
#

Got it - apologizes, I misunderstood

lavish crest
#

No worries

worthy galleon
#

So in that case, what you want to do is create a Payment Method that is optimized for future use - using the SetupIntents API, or if you want to use Stripe-hosted Checkout, Checkout Sessions in setup mode

#

then, later on, you can use that Payment Method token pm_abc123 to create and confirm a PaymentIntent from your backend. (step 5 in the guide)

lavish crest
#

Okay this would mean I charge nothing but use the setup mode to save the payment method. And then I can rund my cron on July 1st to make the payment intent correct?

#

And It would work without charging anything today correct?

worthy galleon
#

That is correct

lavish crest
#

Sounds great.

#

Got it.

#

Will give it to the developer than. He will know what to do.

worthy galleon
#

Yep and if he has questions, you can send him here

lavish crest
#

Amazing. Just joined the developer chat. What a nice experience.

#

Thanks. I do have another question. Should I open a new thread?

worthy galleon
#

No, you can ask it here

lavish crest
#

Okay. Last question regarding this one:

I was reading I have to create a checkout session. Doesn´t that mean I have to charge anything? Or can I make a checkout Session without charging anything?

worthy galleon
#

The mode parameter determines the behavior of the Checkout Session. Checkout Sessions can be used in one of a few ways - they can collect a single payment, they can set up a payment method, or they can create a Subscription

lavish crest
#

Perfect. I got it. Thanks for clarifying.

My other question:
We do offer payment plans like subscribed but also subscriptions. We are integrated with Stripe Connect Custom and we actually don´t use Stripe Billing as we create Invoices ourself. The only thing where we use Stripe Billing I think is to create a subscription and cancel it. Otherwise we don´t touch Stripe Billing. Does that already means we have to pay the full fees for Stripe Billing or not?

worthy galleon
#

We focus on developer and integration questions here and don't know very much about pricing.

Traditionally, Stripe Billing was charged only on recurring payments - that is to say, payments that are a result of a Subscription or Invoice

#

I know we've introduced a monthly option where you get a lower rate at some time in recent history, but that's about the extent of my knowledge. Most likely you'll be on the default plan where you only pay for successfully processed recurring payments

lavish crest
#

Okay so invoices we do ourself but I think it are recurring payments. It´s just more easy to use that method instead of handling it ourself. So we just use one feature. Guess I have to talk to sales about that right?

worthy galleon
#

Invoice payments in this context means Stripe Invoicing where you create an in_abc123 object

lavish crest
#

yes this we dont use.

#

So maybe the question is better like this:
Is it possible to create and stop a subscription without being charged for Stripe Billing?

#

I was reading when using: mode: "subscription" I can make a subscription without Stripe Billing - is that correct?

worthy galleon
#

No, that isn't correct. Subscriptions are Stripe Billing

#

Stripe Billing is the logic that defines how much to charge, when to charge, who to charge, tracks all the information, as well as the APIs that you can use to understand and modify that payment schedule

lavish crest
#

Okay that means when I am using the subscription object at the moment this mean I am using Stripe Billing and I have to pay it correct?

worthy galleon
#

To the question "Is it possible to create and stop a subscription without being charged for Stripe Billing?" - I think you could achieve this in a limited sense, but I can't imagine anything you would gain from it

#

That's right - you'd be billed based on successful Subscription charges,

lavish crest
#

As we build everything with own Invoicing and Custom using Stripe Billing as a product is not intented by us. Now I understood that only for subscription we are using it. If we have to pay it we could have used the full product and not only a fraction of it. So now it´s already better to code the the subcription managment from our side and just make payment intents I guess.

worthy galleon
#

Do you know what your account id is? I'd be happy to look for you to confirm what your usage of Billing is

lavish crest
#

Let me get it

#

acct_1LXHLzAoDskvyEGH

worthy galleon
lavish crest
#

Yeah it´s in testing

#

Yes there are invoices but we don´t use/send them. We create and send our own. However I think we are using subscriptions and based from that we create our own invoices.

muted knotBOT
stoic sleet
lavish crest
#

Hey there

#

Yes so we are using Subscription. Does that mean we are using Stripe Billing? It´s our only Touchpoint with Subscription, we don´t use Invoices and other Stuff.

stoic sleet
#

Yes

#

You do use Invoices in that your use of Subscriptions is generating Invoices

lavish crest
#

Yes they are created but we dont use them on our platform. We create them ourselfs .

#

But okay I got it. We need to find a way how not use Stripe Billing then.

stoic sleet
#

Well you are still creating Subscriptions and Invoices in your Stripe account. I recommend you identify where in your integration you are using them. Your integration might be using some of the data stored in the Subscription or Invoice objects

lavish crest
#

Yeah Subcription Object we are using. As we do installments as well (and here we do store all charge dates in our database and just make payment intents) I guess going with that would not be so much work on our side.

#

Do you have a tipp how to implement it? So making subscriptions without anything from Stripe Billing? For plattform we are build we cannot use it because of the small margins we do already have. Otherwise it would be more easy of course

stoic sleet
#

Unfortunately not really, since we focus on helping users integrate with Stripe APIs/Products. My recommendation would be to use Stripe billing and save on development/maintenance time.

#

Subscriptions and Subscription Schedules can simplify your integration approach. But I understand if the fees for Stripe Billing make it less attractive

lavish crest
#

We use Stripe Connect. We just don´t want to use Stripe Taxes and Stripe Billing as we won´t have any Margin left then.

stoic sleet
#

Gotcha.

lavish crest
#

So my question is how I can create a subscription with Stripe Connect? 😄

stoic sleet
#

Are you talking about creating a Stripe Subscription?

lavish crest
#

Yes of course 🙂

stoic sleet
#

Okay so your account is the Platform, then there is the Connected Account, and finally the Customer.

WHo is the merchant here? Your Platform or the Connected Account?

lavish crest
#

The Connected Account .

#

We offer our clients to create a checkout and subscription plan. In the background we process everything only via Stripe Connect.

stoic sleet
#

Okay great. Do the Customer and Payment Method objects exist on the Connected Account?

lavish crest
#

If needed it would exist right. In my undertanding I create a checkout session with mode:setup To create the customer and save the payment method

#

Then I schedule payment intent whenever I want.

#

Which we already do have for installments and other stuff we offer.

stoic sleet
#

That doesn't sound like a Stripe Subscription. Are you sure you are clear on what you want to do here?

lavish crest
#

If I save a Customer and the payment method and then call the stripe api every month by myself to charge the client I am not using a Stripe Subscription right?

stoic sleet
#

No

#

When I say Subscription (with a capital S) I am referring to the Susbcription object. Like the one I found on your account

lavish crest
#

That would mean I have a subscription on my side and you have payment intents but no subscription on your side.

stoic sleet
#

You are already creating Subscriptions

lavish crest
#

Yes right now we are haha. But we are still in development and playing around.

#

We do offer individual payment plans for our customer. A merchant of us can create a payment plan like this for example:

  1. Pay 1000€ now.
  2. Pay 1500€ on July 1st
  3. Pay 2000€ in July 8th
  4. Pay 300€ in August 1st

So super individual. Our Merchants basically create a quote with that payment plan and contract terms. The send it out via Mail for e signature. Their clients can sign the contract and agree with that to the payment plan above.

On that event we save in our database already the 4 payments.

Now the client is asked to add their payment method so we can charge them on the agreed billing plan. We save the payment method via mode:setup on the checkout session where they add their payment method.

On the date of the charges we create the invoices from our system. Also we try to charge the clients via their added payment method. Like this we offer super individual payment plan creation for our merchants and invoicing and payments are also done.

Now yes - Merchants can also make a subscription. Right now we create a subscription object on stripe because it seemed the most easiast. As we would be charged for Stripe Billing here we could just do the exact same thing like with our super individual payment plans with the "subscription". So without creating a Subcription-Object.

#

Does that make sense like this? I hope that gives you a little context.

stoic sleet
#

Yeah. So you would want to create the Checkout Session using the Stripe Account header https://docs.stripe.com/connect/authentication

This would create the Customer and Payment Method objects on the Connected Account. Then you can create your payment schedule and create Payment Intents on the Connected Account with thos Customer and Payment Method IDs.

lavish crest
#

Okay so I would make the Checkout Session in mode:setup on behalf of the connected Account correct?

stoic sleet
#

If you want the charges to exist on the Connected Accounts

lavish crest
#

And for when I am charging I used my database records and make a payment intent everytime I want to charge.

#

We use destination charges

stoic sleet
#

Okay then you would NOT specify the Stripe Account header. With Destination Charges, all the objects are created and exist on the Platform

lavish crest
#

Okay got it. I am not the Developer. He will understand. Both would be possible correct. We just need to understand the logic. Only using payment intents and saving the payment method would allow us to run basically a subscription.

stoic sleet
#

Yup

lavish crest
#

Of course we have to take care of retry-logic, cancelling and managing the subscrion.

stoic sleet
#

Yeah this server is generally for ublocking developers writing code to integrate with Stripe APIs

lavish crest
#

I know the basics. Hope it´s okay to get the way. I will send him to ask anything else in detail.

stoic sleet
#

Yeah. If you want to handle the Subscription part on your end, you will need to build in logic for all those common outcomes

lavish crest
#

Okay great. Following up on that. Using the Stripe Customer Portal to have a UI to update the payment information is also part of Stripe Billing?

stoic sleet
#

Yes

lavish crest
#

But can be custom build as well correct?

stoic sleet
#

Sure. You can use the APIs to retrieve the payment methods for a given customer and use that data to display the info in whatever UI you want. You can also use the Payment Element (or Checkout Session) to allow the user to save a new payment method. You would need to set up the logic yourself to determine which payment method to use.

#

I recommend still setting the invoice_settings.default_payment_method property to keep track of which one you want to use as a default. It's where our Billing engine would look but you don't have to use Billing. You can just always check there first.

lavish crest
#

Okay So I can build the UI they can add multiple payment methods and I can set the default payment method. Just like in the Customer Portal.

#

Good tip. Anything else important to note?

#

Is it a good idea if we do already have the thing with the individual billing plans.

stoic sleet
#

Sure, you can use the Stripe components to build all of this. It's just more work on your end

#

Unfortuntaely, I cannot speak to how well prepared your integration is in a larger sense. That is a bit outside the scope of what we focus on here.

#

If your developer is hitting errors or unexpected behavior while in the process of buidling this integration, that is something we are better able to assist with

lavish crest
#

Okay thank you very much. You gave me a very good understanding on how things work. Anything else I will let my dev jump into the Chat. Thanks and have a great Evening.

stoic sleet
#

We're happy to shed what 💡 we can 🙂