#mkoenke-customer-payments
1 messages ยท Page 1 of 1 (latest)
Yup! You can search through Payment Intents by Customer ID: https://stripe.com/docs/api/payment_intents/search
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
thanks! We are trying to use that (in ruby) and getting an error NoMethodError: undefined method 'search' for Stripe::PaymentIntent:Class
example: Stripe::PaymentIntent.search({query:'email:\'cadcheckoutffon@gmail.com\''})
Do you have a request ID for that request?
Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
hmmm looking through the logs and dont see anything for payment intents - do you know the api endpoint I can search by? is it /v1/payment_methods ?
doubt it
You would want to make sure that GET is included in your search filter. Let me see if I can find the endpoint
Here it is: /v1/payment_intents/search
Very odd. Are you able to confirm you're in test mode versus non-test-mode?
Or rather, can you confirm if the request was made using a test-mode key? If so, make sure the Dashboard is in test-mode
yes, I am in test mode on the dashboard and executing from my local environment where everything is in test mode
Ah! Okay, are you initializing Stripe somewhere?
it sounds like the stripe object may not be accessible to the section of the code that's running the search
hmm - I put a binding.pry in the code right before we do a Stripe::PaymentIntent.create call, and that call works, so I think we do have a stripe instance
I don't think the call is working if there are no logs and you're getting that error, unless I'm overlooking something. Are you able to make other Ruby calls via the same file?
yep! I can run Stripe::PaymentIntent.create( charge_params, idempotency_key: idempotency_key( transaction, capture_method, ), )
that gives me a response
Hi ๐ I'm stepping in for @placid summit .
What is your syntax for using the Search API?
Stripe::PaymentIntent.search({query:'email:\'cadcheckoutffon@gmail.com\''})
You could also use the List API and the Customer ID:
https://stripe.com/docs/api/payment_intents/list
Sure thing! Happy to help ๐