#Amer Bearat
1 messages ยท Page 1 of 1 (latest)
Yes you can, with our APIs you can expand any field that is marked as expandable in any API call that returns that object https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
With the caveat that you can only go four levels deep with expansion https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
But that payment_method property is top level so you can use it
can use it on search api
POST /v1/payment_intents/search
cause i got this error
Received unknown parameters: limit, query
req_lGNfYiUGTItSrV
Yes it should be usable on the search API
Thank you for the request ID, checking in to what went wrong there
Are you using one of our client libraries or are you building these HTML requests yourself? It looks like the limit and query parameters got sent a different way than expand. Not sure if that is the issue but I am checking in to it
That method definitely supports expansion
Can you show me your code for how you are building this request?
im not using strip library. im using stripe rest api
let me give you the end point and requiest body
here is the end point:
https://api.stripe.com/v1/payment_intents/search?query=metadata['Origin']%3A'RS+Website'+AND+created>%3D'1684269488'&limit=100
request body:
expand[]=payment_method
it's HTTP post call
Can you try making the expand parameter also a query param?
Or alternatively can you mode the query and limit params to the request body?
according to the page i shared early. expend in not listed as part of query params
๐ Hopping in to take a look since pompey has to head out soon - give me a minute to catch up
Is there a reason you're doing a POST request and not a GET request?
๐ So are the requests succeeding now?
I assume the only issue is figuring out how to do the expansion, right?
The request we're getting in on our end is coming in as a POST request - you can even see in the dashboard here (https://dashboard.stripe.com/test/logs/iar_lGNfYiUGTItSrV)
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Instead of including expand in the POST body can you also send it as a query param?
@boreal pawn Did you still need help?