#.saberkhan
1 messages · Page 1 of 1 (latest)
Hi 👋 our Postman collection can be found here, but I don't know offhand if it has any examples using expand:
https://github.com/stripe/stripe-postman
I have Postman collection but expand is not working for Checkout session.
Everything else is working with Postman.
Do you have an example of a request you made where it isn't working that I could take a closer look at?
Let me send another request
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Above is the error log, you will see an extra double quote "" around ['total_details.breakdown'] and that is the reason we get this error message "Invalid array"
Ah, looks like it's not being provided correctly for the way it's being broken down.
Try passing expand[] as the parameter name and total_details.breakdown as the value.
I'm pretty sure you'll want to use the cURL approach, rather than the syntaxes used when working with one of our libraries:
https://stripe.com/docs/api/expanding_objects?lang=curl
{
"error": {
"message": "This property cannot be expanded (['total_details).",
"request_log_url": "https://dashboard.stripe.com/test/logs/req_HsPwXqjR5jC7rZ?t=1689946869",
"type": "invalid_request_error"
}
}
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Can you grab a screenshot of how you structured that parameter in postman?
Thank you, try getting rid of the brackets and quotes from the value.
From my test account:
ok
Works now. How can I add multiple object to exapand e.g., payment_intent and total_details.breakdown
You put multiple lines for expand[]. Raw requests don't handle nested data structures, so arrays need to be destructured into a parameter/value pair for each value in the array you want to send.
So it will will be multiple lines of expand command in postmand. Am I correct?
Yes
Thank you. You save my day today.
Any time! Glad I could help!