#gee

1 messages · Page 1 of 1 (latest)

crisp yewBOT
dreamy ermine
#

hi, since the php sdk failed, am trying today to use the curl method. and finding other issues

eternal venture
#

Could you share the request ID (req_xxx) of your search query and the response returned?

dreamy ermine
#

CURLOPT_POSTFIELDS => 'query=payment_method_details.card.last4%3A4242%20AND%20amount%3A1000%20AND%20created%20%3E%3D%201604966400',

#

this works. but not this CURLOPT_POSTFIELDS => 'query=payment_method_details.card.last4%3A4242%20%20AND%20payment_method_details.card.brand%3A%22visa%22%20AND%20amount%3A1000%20AND%20created%20%3E%3D%201604966400'

eternal venture
#

Could you share your full curl query with secret key removed?

dreamy ermine
#

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.stripe.com//v1/charges/search',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => 'query=payment_method_details.card.last4%3A4242%20%20AND%20payment_method_details.card.brand%3A%22visa%22%20AND%20amount%3A1000%20AND%20created%20%3E%3D%201604966400',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/x-www-form-urlencoded',
'Authorization: Bearer sk_test_xxxxx'
),
));

#

when i dont filter it by card brand, i can see from the result that the brand is visa. but when i add the filter by visa, the query returns nothing

eternal venture
#

The query field should be something like query="payment_method_details.card.brand:'visa' without additional characters

#

I tried running command below and it's working fine:

curl https://api.stripe.com/v1/charges/search \
  -u sk_test_xxx: \
  --data-urlencode query="payment_method_details.card.brand:'visa'" \
  -G
#

Can you make sure your query doesn't include additional characters?

dreamy ermine
#

the additional char is beccause of urlencoding

#

am testing using the postman collection

#

curl --location --request GET 'https://api.stripe.com//v1/charges/search'
--header 'Content-Type: application/x-www-form-urlencoded'
--header 'Authorization: Bearer sk_test_xxxxx'
--data-urlencode 'query=payment_method_details.card.last4:4242 AND payment_method_details.card.brand:"visa" AND amount:1000 AND created >= 1604966400'

eternal venture
#

If you only try filtering by card brand, does it work?

dreamy ermine
#

let me try

#

no results. when i filter just by brand

eternal venture
#

just query="payment_method_details.card.brand:'visa'" only?

dreamy ermine
#

req_ivgkzWcUEaoMZT

#

tried the way you mentioned - using query parameter. same outcome. requestid :
req_4ScYLv2ZdZyUHr

eternal venture
#

We don't log response for GET requests. Could you share the full response you received?

dreamy ermine
#

{
"object": "search_result",
"data": [],
"has_more": false,
"next_page": null,
"url": "/v1/charges/search"
}

#

this is the result when i use card.last4:4242 as a filter

#

not the full response.. just to show you that the brand is indeed visa

eternal venture
#

Hmm.. so only query="payment_method_details.card.brand:'visa'" is not working?

dreamy ermine
#

i have not tested all the fields

#

since there is no way to get the first 6 digits of card number, the card brand is crucial to our query

eternal venture
#

I'm checking with my coworker why this is the case

#

The query looks fine and it should work

dreamy ermine
#

ok. thanks

eternal venture
#

Thanks for waiting. We can't find any reason why req_4ScYLv2ZdZyUHr returned no result where there should be charges returned.

{
  "object": "search_result",
  "data": [],
  "has_more": false,
  "next_page": null,
  "url": "/v1/charges/search"
}

Can I suggest you to write in to us https://support.stripe.com/contact, so that we can follow up and check with the relevant team? It’ll be helpful if you can include:

  • req_4ScYLv2ZdZyUHr (query: "payment_method_details.card.brand:'visa'") and its full 0 result response
  • req_x6F3UTV5FCqLWy (query: "payment_method_details.card.last4:4242") and its full response with charges with 4242 visa cards
dreamy ermine
#

😣 thanks for looking into it