#MisterJ-Payment

1 messages ยท Page 1 of 1 (latest)

scarlet quartz
#

Hi there, what information do you wish to retrieve through API?

humble nacelle
#

So I was trying to retrieve the related guest payment of our customer, but I cant find a way to do it..

#

using API

scarlet quartz
#

So you want to get a list payments that made by a particular customer?

humble nacelle
#

Yes but only the related guest payments... like foir example in this image, I like to get the guest payment..

scarlet quartz
#

This is a Dashboard-only feature, there's no API to retrieve the guest payments.

humble nacelle
#

oh shoot, then I have to retrieve 3k payment intent heha and loop them just to find this.. is it possible to search the payment intent by description? if not then I have to do many fetch to stripe just to retrieve this data.

#

ops it seems its not just 3k payment intent, but our client has 10,000+ payment intents.. it would be awesome if theirs an API to easily get Related Guest Payment..

scarlet quartz
#

You can specify a metatdata when creating the PaymentIntent, and search with it later.

humble nacelle
#

yeah, but it seems our client employees only wrote the name of the customer in the description. That is the only useful data. And it seems query field for payment intents does not support description.

#

it would take time just to add metadata on each 10k payment intents

scarlet quartz
#

How about do it programmatically ?

humble nacelle
#

its the same thing, like I have to retrieve each payment intent, loop 10k update each. unless theirs an API to update multiple data at ones.

scarlet quartz
#

There's no batch API to update multiple PaymentIntents at the same time. You need to loop through a list PaymentIntents and call the PaymentIntent update API to update the metadata with description.

humble nacelle
#

but are theirs any change to add this on API, to easily grab Related Guest Payment Of Customer?

scarlet quartz
#

We welcome any feedback ๐Ÿ™‚ please let Stripe support know this feature request https://support.stripe.com/contact

humble nacelle
#

It seems the support there does not know some terms we used as a developer.

#

its hard to chat with them, but anyway Ill just say to our client that stripe does not yet have API to fetch Related Guest Payments.

#

can I ask one last question?

#

in payment intent object, what property the payment was successfully paid?

scarlet quartz
humble nacelle
#

Thanks for that,, sorry, can I ask again, is their are way to grab payment intent using payment method?

#

this question is related to grabbing Related Guest Payment

scarlet quartz
#

No, I don't see a way to filter paymentIntents by payment_method'

humble nacelle
#

oh men,, how do I grab related guest payment... I mean stripe API should have this, this is very important feature. That way its easier to get related payments. Can you maybe talk about this with the stripe team?

#

My client has paid much money on stripe, we dont want to discourage the client.

scarlet quartz
#

Are you are Sigma user? if you are, you can write a SQL-like query to filter the payment_intents by description

#

Also can you share with one customer ID that has guest payments?

humble nacelle
#

cus_MLRyQWYIQIjJ0N

#

that is a sample customer that has a related guest payments

#

an API where I can pass a customer_id to get Related Payment Intent would be awesome..

scarlet quartz
#

There's no such API right now.

#

I'd suggest you to inform you client to input the customer's name in the customer field instead of description field from now on, so that you can easily filter the paymentIntents with customer

#

Let me think about a solution for your current problem, give me a min

#

This might work, but you need to write a bit of code

  1. Retrieve all PaymentIntents
  2. If the PaymentIntent's customer is empty but the description contains a name, pass the customer's name to the Customer Search API (https://stripe.com/docs/search#query-fields-for-customers) which will returns you a list of matched names
  3. Update the PaymentIntent with the customer returned from the search API call, if any.

There are some considerations

  • You might update the PaymentIntent with a wrong customer if there's another customer with the same name
  • The customer is not yet created and the customer Search API returns empty list
humble nacelle
#

Thanks for the suggestion but it seems its too risky

scarlet quartz
#

The fact that the paymentIntent was not associated with a customer makes it hard to trace back, even the guest payments shown in the Dashboard is not 100% correct.

humble nacelle
#

inpecting the customers, it seems the Related Guest Payment are correct., the reason why our Client ask this is because why its hard to get the data when Stripe can show it easily on the Stripe Customer View Page.

#

That is why they are curious why no API for it.

scarlet quartz
#

Your client should just associate the paymentIntent with a customer, and there's already an API to filter PaymentIntents by customer.