#Kaartik - Checkoutn Session

1 messages ยท Page 1 of 1 (latest)

rustic grove
#

Hi ๐Ÿ‘‹

#

That depends on what you want

mint basalt
#

I want to allow for my users to make a singular payment

#

And I want to store the customer data so that when they intend to make another payment, their card details are stored

#

Sorry Idt the link explains the differences of checkout session and payment intent @rustic grove

rustic grove
#

Checkout Sessions are built around the front-end and they will generate payment intents themselves. Checkout just provides a Stripe hosted UI to collect payment while with Payment Intents it is up to you to build the UI

#

If you just want to create a customer record and save payment details for later use, that can be done with either Checkout Sessions or Payment Intents

mint basalt
#

Okay thank you!

rustic grove
#

I would strongly suggest some reading and perhaps even building some simple test integrations with the doc I linked. For me, I find I don't really get a technology until I start building something with it.

mint basalt
#

Thank you for that, I'm in the midst of building some Stripe integrations right now in fact!

#

I have one question though

#

CustomerCreateParams params =
CustomerCreateParams.builder()
.build();
Customer customer = Customer.create(params);

#

This ^ is the snippet of code that is used to create a Customer correct?

rustic grove
#

Yeah, an empty one but it creates a customer

mint basalt
#

My question is, how does Stripe like that customer to the appropriate account ID?

rustic grove
#

It doesn't. Stripe Customers and Stripe Accounts are totally different things

#

Or do you mean to your account?

mint basalt
#

Ah okay

#

My bad for the mix up

#

I left my Stripe code for a week and just came back to it

#

Yeah that makes sense

#

I link it to my account by setting the api key right

#

Just to confirm ^

rustic grove
#

Yup, so all the requests to the API are signed with your API keys so we know who is making the request

#

So all records created as a result of that request are for the account identified by those API keys

mint basalt
#

Got it, that makes sense

#

One final question please

#

So therefore, when I create a customer object

#

How does it save my card data for future purchases

rustic grove
#

We've got a doc for that

mint basalt
#

my client's card data*

rustic grove
#

two actionally

mint basalt
#

Yah those docs would be super helpful

rustic grove
mint basalt
#

Okay amazing

#

Thank you @rustic grove !

#

๐Ÿ˜„

rustic grove
#

Sure thing! Happy to help ๐Ÿ™‚

mint basalt
#

Wait sorry, but from the second link to save during a charge, it seems like I'll have to use a Payment Intent (meaning I'd have to create my own UI) to save the card data.

I was intending to use Checkout Session, create a Customer and save their payment data for future purchases. Does that mean I cannot save their card details for future purchases by using Checkout Session?

rustic grove
#

Okay nope you can do that too

mint basalt
#

Ah okay

#

I will play around with this code. I should be able to figure it out

#

But hey thanks a lot for the crystal clear clarifications

rustic grove
#

Sure thing! Happy to shed what ๐Ÿ’ก I can