#kira-payments-list
1 messages ยท Page 1 of 1 (latest)
Hi ๐
What do you mean by payment ID? Payment Intent ID, Invoice ID, Charge ID?
Hello!
I would like to retrieve a certain paymentIntent ID, that was made from a certain user (email) & at a certain date (created_at)
Okay you would use our List API for that: https://stripe.com/docs/api/payment_intents/list
The created parameter allows you to specify a time window and the customer parameter will let you limit the List to PIs associated with that customer
Sounds great!
Ok. I did this
Great ๐ I'm glad it worked
what's the parameter to get email?
$stripe->paymentIntents->all(['customer.email'=> $email])
for example
There isn't one
(this parameter dont exist, but I would like to get the email of the stripe payment)
I don't know what you mean by "the email of a payment". There isn't an email property
Do you mean receipt_email or the email from the Customer object?
my purpose is to redirect to a stripe payment page.
return $this->redirect('https://dashboard.stripe.com/test/payments/'.$paymentId);
For this, I need to identify the stripe payment, with my order data I got in my database. (order->getUser()->getEmail) and (order->getCreatedAt() )
Okay so it's the email assocaited with the user?
Yes, in my database, I can retrieve an order, and the user email from it
You could also start storing the Payment Intent ID in your database
I know that's more work but, in the longer term, it might be useful
So what you would do is use the email to look up the Customer ID first: https://stripe.com/docs/api/customers/list#list_customers-email
I know. I could even create a customerId that would be on stripe to retrieve everything
And then use that Customer ID along with the createdAt timestamp to find the payment intent
I don't get it
I see that once we made a payment, a client is created and there is email stocked in Stripe
And so there's no way to retrieve it?
Oh yes. Okay I get it. So i can go from Customer then his payments filtered by the date
Correct
What do you mean? You woudl only use Invoices if you were generating Invoices for the customer. If you want to list the Payments for a Customer you first get the Customer ID and then use it in the List API I mentioned earlier