#.saberkhan

1 messages · Page 1 of 1 (latest)

velvet hearthBOT
pearl agate
mellow vector
#

Is "Charge" object created by successfule "Checkout Session"

pearl agate
#

Payment Intents are built on top of Charges, so yes

#

But only some checkout sessions

#

For example sessions in setup mode will not create payment intents

#

They just create setup intents

mellow vector
#

So if we have payment intent then we do not need charge_object_id. If we do, what circumstance we need to get to more information about charge_id?

pearl agate
#

Well that depends on your integration. You may not need anything on the charge object

mellow vector
#

Ok. Other than paymentintetn_object, any other object is created upon successful creation of Charge session for hosted integration?

pearl agate
#

Depends on your integration. Maybe customer is created. Certainly a payment method object is created

#

What are you trying to do exactly?

mellow vector
#

I am creating Checkout session and user will pay Stripe hosted page. I have included values of all the fields that are acceptable during creation of Checkout session. As I am inputting lot of information, so it makes senses that successful Checkout session will create customer and payment method objects. Anyother object you can think of that will be created from Checkout session? So here is the list of objects that are created: chaeckout object, paymentintent object, customer object, payment method object. Any other object you want to add to this list? Thank you!

pearl agate
#

I can't think of anymore at the moment

#

There may be more I'm missing

#

Then that will show you all the events generated when you go through a checkout session

mellow vector
#

Do you have list of events that are generated by Checkout session?

pearl agate
#

No

#

That's why I suggested the above

#

Why do you need this list though?

#

What data are you missing from customer, payment method, payment intent, etc?

mellow vector
#

So I can prepare enhanced entity relationship diagram for the db tables.

pearl agate
#

Ok

#

Objects created will differ depending on the checkout session type too

#

Like subscription sessions create invoices and subscriptions too

mellow vector
#

I know that

pearl agate
#

Each type creates different object types

#

So best you experiment and look at the events generated

mellow vector
#

I am focusing now on "payment_mode" only

pearl agate
#

Yeah so again, I think you have them all

#

But recommend doing a test

mellow vector
#

In postman, I input "customer_creation" as "always" and it did not create a customer object, instead it gives me the following output: "customer_creation": "always".

pearl agate
#

You need to complete checkout for a customer to be created

#

Did you do that?

mellow vector
#

How can I do in postman?

pearl agate
#

You can't

#

You need to be in the checkout session to complete payment

#

You need to physically go to the link and complete payment

mellow vector
#

So postman created a link and I can complete payment from the link and hopefully it will create a customer. Let me try. Please wait for me.

#

Where can I find test card no?

pearl agate
#

Use test cards to validate your Stripe integration without moving real money. Test a variety of international scenarios, including successful and declined payments, card errors, disputes, and bank authentication. You can also test non-card payment methods.

mellow vector
#

I made a test payment and it was successful, where can I find that the customer is created?

pearl agate
mellow vector
#

I saw the customer information in a dashboard. Now I need to save the customer information in db table. How can I do it programatically instead of exporting customer information using excel?

pearl agate
mellow vector
#

Is not webhook an event handler.? My question is how can I programmatically get customer information to save data in a db table.

pearl agate
mellow vector
#

Is it possible to find customer object id programatically?

pearl agate
#

Why do this programatically when you can use webhooks like I suggested earlier?

#

You can get notified for successful payments, customer creation, etc

#

And then store that info in the db

mellow vector
#

So after successful payment, customer will be created, I assume. If this is the case, then I am good.

pearl agate
#

Yes

mellow vector
#

Thank for the clarafication.

pearl agate
mellow vector
#

Yes, once I know the customer object id, I can retrive it and save to db table.

#

Above link did not show that a customer object is created but I know the flow now.

pearl agate
#

The above link is to demonstrate that on the checkout session object, the customer id will be available once the customer has completed payment

mellow vector
#

Yes. The same flow for payment method object. Correct?

pearl agate
#

Yes

#

And again, highly recommend webhooks instead of constantly pinging the api

mellow vector
#

We will implement webhook. All these answers clarify the data flow. If there is a dataflow diagram that would be greate. But as of now I am ok. Thank you again!