#.saberkhan
1 messages · Page 1 of 1 (latest)
and this include paymentintent_object_id
If you have the id, just retrieve it via the api: https://stripe.com/docs/api/payment_intents/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is "Charge" object created by successfule "Checkout Session"
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
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?
Well that depends on your integration. You may not need anything on the charge object
You can look at what's available on it here: https://stripe.com/docs/api/charges/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok. Other than paymentintetn_object, any other object is created upon successful creation of Charge session for hosted integration?
Depends on your integration. Maybe customer is created. Certainly a payment method object is created
What are you trying to do exactly?
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!
I can't think of anymore at the moment
There may be more I'm missing
Easiest way to verify is to do a stripe listen in the cli: https://stripe.com/docs/webhooks/test
Then that will show you all the events generated when you go through a checkout session
Do you have list of events that are generated by Checkout session?
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?
So I can prepare enhanced entity relationship diagram for the db tables.
Ok
Objects created will differ depending on the checkout session type too
Like subscription sessions create invoices and subscriptions too
I know that
Each type creates different object types
So best you experiment and look at the events generated
I am focusing now on "payment_mode" only
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".
How can I do in postman?
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
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?
I made a test payment and it was successful, where can I find that the customer is created?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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?
Recommend you do it through webhooks: https://stripe.com/docs/webhooks
Is not webhook an event handler.? My question is how can I programmatically get customer information to save data in a db table.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Is it possible to find customer object id programatically?
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
So after successful payment, customer will be created, I assume. If this is the case, then I am good.
Yes
Thank for the clarafication.
But customer will be on the session object after payment: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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.
The above link is to demonstrate that on the checkout session object, the customer id will be available once the customer has completed payment
Yes. The same flow for payment method object. Correct?
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!