#Venkat - SF REST API

1 messages · Page 1 of 1 (latest)

fathom mason
#

Hi 👋

grave sigil
#

Hi Snufkin

fathom mason
#

Salesforce is a very specific and unique software environment. Can you describe what you are trying to do?

grave sigil
#

Im not using any connector here

#

From my code, im trying a POST request

#

to create a checkout session

#

as Stripe allows only form encoded strings in the body of the POST request. I want to see how the bosy looks like. I tried multiple ways, but couldnt crack it

fathom mason
grave sigil
#

&line_items=%5B%7B%22quantity%22%3A1%2C%22price%22%3A%22price_1LGlchBNjIZtrZZbtVeTg9OE%22%7D%5D&mode=subscription&success_url=https%3A%2F%2Fluxurylifestyleaustralia--uat.sandbox.my.site.com%2Fshop%2Fs%2Fpaymentsuccessful%3Fparams%3DxfIumslNJNmBW7%2BiPIBGZwx0gWNXA8VKyh%2F3G0R3LzGi%2BDpvNN94WHdGVycBi0FdmZnZhX5M%2BLmmQA1%2By%2Bz2cB4NxzyAs01qXuMxAKJ4nRHn1wi2sIy6fH1a4frERE6HeNDsH8mlZ%2F%2BseSzlJNLA%2BA%3D%3D&cancel_url=https%3A%2F%2Fluxurylifestyleaustralia--uat.sandbox.my.site.com%2Fshop%2Fs%2Fpaymentcancelled%3Fparams%3D2LzqAeHVzaUapumnpqLhpNJJCltx4QzsSJXq0Jpjd2n6Qys%2BWGoUmqqmvpVz8n3vSck4vPYR3HIs8wgCayu%2BTzZsYd7yXNkVaT6GP2VCOgXN24zsM7GTHmmKah3NkO5nnE716yYyWPD9
T8kyolcySw%3D%3D&

#

This is what I set in the content body

fathom mason
#

That looks like query parameters in the URL.

grave sigil
#

responseBody {
"error": {
"message": "Invalid array",
"param": "line_items",
"type": "invalid_request_error"
}
}

fathom mason
#

Hmmm...okay so what are you using to make these POST requests?