#birdboy-search-api
1 messages · Page 1 of 1 (latest)
Hi 👋 is there something specific that is giving you troubles?
I'm just not too sure how to set out the query section of the request.
Definitely understand, our Search API is still a bit newer and is structured slightly differently from the rest of our fields. query is expecting a string that contains the contents of your query. You can see some examples shown here:
https://stripe.com/docs/search#examples
birdboy-search-api
I believe that query is doing a substring match search for products with the name canvas (case insensitive), do you have any Products in your Stripe account that match that criteria?
Are you using your test API key to run the request? Could you share the ID of that request as well?
I've now got it working with this code but id like it to pass in the params from the getstaticpaths
It looks like you're setting variables with getStaticPaths, so I'd expect you would be able to reference those and use them to build your search query string.
since you have to use this formate 'name~"canvas"'
could you pass in the params in the spot of the canavs?
I'm not sure how exactly to do it in Next.js, but yes, most languages allow you to concatenate substrings into larger strings. You would need to build your query param string, and then pass that string into the request.
I believe you'll be able to leverage string concatenation then:
https://masteringjs.io/tutorials/fundamentals/string-concat
Thanks that really helped i've got it working would you like the fix?
Glad to hear you got it working!
did you want the fix for if you need to help anyone else with that same issue?
Thank you for the offer, but I think that's alright.
that's alright thanks for the help
Any time!