#.saberkhan

1 messages · Page 1 of 1 (latest)

fast capeBOT
shy crest
lost fox
#

I have Postman collection but expand is not working for Checkout session.

#

Everything else is working with Postman.

shy crest
#

Do you have an example of a request you made where it isn't working that I could take a closer look at?

lost fox
#

Let me send another request

#

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"

shy crest
#

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.

lost fox
shy crest
#

Can you grab a screenshot of how you structured that parameter in postman?

lost fox
shy crest
#

Thank you, try getting rid of the brackets and quotes from the value.

#

From my test account:

lost fox
#

ok

#

Works now. How can I add multiple object to exapand e.g., payment_intent and total_details.breakdown

shy crest
#

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.

lost fox
#

So it will will be multiple lines of expand command in postmand. Am I correct?

shy crest
#

Yes

lost fox
#

Thank you. You save my day today.

shy crest
#

Any time! Glad I could help!