#ERROR STATUS 422

1 messages · Page 1 of 1 (latest)

rough mist
#

Hey , I am running into an issue with creating a custom payment flow using the dodo payments api . When I am hitting the /payments route with the payload , it sends me 422 status code , but I have copied the same payload as on the subscription product docs . I have attached the payload as well as the fetch request . My backend is nodejs along with expressjs .
Please help me with this .

gloomy stag
rough mist
#

Hey , I was hitting the wrong endpoint . Actually I was creating a subscription and hitting the wrong endpoint . But now I am getting 400 response code .

I have attached the response as well as the payload this time .

dusk girder
#

@gloomy stag ˆ

gloomy stag
#

hey which api are you calling? also can you share the response body (it contains the error message on why the call failed)

rough mist
#

Hey , I am calling he /subscriptions api as listed in the response body . The second image is the response body .

gloomy stag
#

You are not displaying the response body. it only contains headers in the second image. I need you to print the response body too

rough mist
#

I did print it but wasn't able to parse the response body .

gloomy stag
#

It's not json, just text in case of error. Can you try just printing the body without json parse