#baloshi69
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
Hi there 👋 are you using Setup Intents to create your Payment Methods? If so, the ID of the Mandate that those generate can be found in their mandate field once they're successful:
https://stripe.com/docs/api/setup_intents/object#setup_intent_object-mandate
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No i am generating the payment mathod by useing checkout session on setup mode for a customer, so the customer can add his payment method from strip domain not my app
and then getting a event payment Method created
What does "onboarding for a customer" mean in this context?
now i have cus id, pm id but dont know how to retrive the mandate id make a paymentintent
sorry
just using checkout session to setup a payment method for customer
On stripe i am creating a customer and then useing checkout session in setup mode to let that customer add his payment details form stripe.
then i am looking for payment_method.attached webhook, when it trigger my app, i am saving the payment id and customer id.
but latter when i want to charge the customer using payment intent with confirm, i have to also pass the mandate id with customer id and payment id.
now my question is, how can i retrive the mandate id.
Gotcha, let me see how I would recommend accomplishing that.
thanks
Alright, you're going to have to step through a chain of a couple objects to get to it, but it should be doable.
From the Checkout Session object, you can find the ID of the Setup Intent that it created in its setup_intent field:
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-setup_intent
Then from the Setup Intent you can reference the mandate field I linked to previously.
One problem, is that the payment_method.attached Event won't include the ID of the Checkout Session (if I'm not mistaken). It may be easier to listen for checkout.session.completed Events, and then have some logic in your endpoint that specifically looks for sessions running in setup mode.
thanks is there a doc, where i can see the response body of any event
The structure of Event objects can be seen in our API reference here:
https://stripe.com/docs/api/events/object
That doesn't fully explain what data.object may look like, but that will be the object associated with what triggered the Event to be generated. For instance, customer.created Events will include a Customer object in data.object. checkout.session.completed will contain a Checkout Session instead.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I am looking for a doc to see the body of a checkout_session_completed object