#wuguimei
1 messages · Page 1 of 1 (latest)
hello! can you share your code snippet where you made this request?
gimme a while to take a look
shouldn't what you're doing be :
PaymentIntentSearchParams params =
PaymentIntentSearchParams.builder().setQuery("customer:'cus_NpawUxaOQHUhnT'").build();
PaymentIntentSearchResult PaymentIntents = PaymentIntent.search(params);
you can see some examples here for other objects : https://stripe.com/docs/search#examples
I hava metadata , but I can't search the payment Intent,why?
what's the error you're getting?
and can you share the corresponding request id where you tried to search via metadata?
{"query":"metadata['orderNo']:70582087358601"}
{"data":[],"hasMore":false,"object":"search_result","requestParams":{"query":"metadata['orderNo']:70582087358601"},"url":"/v1/payment_intents/search"}
{"query":"metadata['orderNo']:70582087358601,metadata['memberId']:11112328"}
Exception in thread "main" com.chachastation.payment.stripe.exception.StripePayException: We were unable to parse your search query. Try using the format metadata["key"]:"value" to query for metadata or key:"value" to query for other fields.; request-id: req_0TV7pwT1D5WNzy
at com.chachastation.modules.order.service.v5.impl.StripePayV5ServiceImpl.main(StripePayV5ServiceImpl.java:178)
your search syntax isn't correct, if you want to search for both metadata keys, you should use AND : see https://stripe.com/docs/search#search-syntax
{"query":"metadata['orderNo']:70582087358601 AND metadata['memberId']:11112328"}
{"data":[],"hasMore":false,"object":"search_result","requestParams":{"query":"metadata['orderNo']:70582087358601 AND metadata['memberId']:11112328"},"url":"/v1/payment_intents/search"}
Process finished with exit code 0
I use correct,but why search the result?
{"query":"metadata['orderNo']:'70582087358601' AND metadata['memberId']:'11112328'"}
this is right
Hi @spare bough I'm taking over