paytrail / api-documentation

Paytrail Payment API documentation
MIT License
6 stars 11 forks source link

Format of error response #25

Closed niklaswulff closed 2 years ago

niklaswulff commented 2 years ago

What does the json schema look like when something goes wrong when creating payments?

I can't find information on how errors will be handled in the API. Say if I miscalculate the signature, or if there's data missing in the request, and lots more.

Kepe123 commented 2 years ago

There seems to be detailed messages in the response body when ie. signature mismatches. No straight info on documentation though, but you can try it out creating different requests with postman.

mikkorantalainen commented 2 years ago

I agree that the specification should explicitly define the error data format, too. What will be returned if there's an error in some internal backend used by the Paytrail implementation but the API can still respond something? That would be an example of possible error case that cannot be tested simply by defining invalid input for the request.

jfrojd-paytrail commented 2 years ago

Hi @niklaswulff

You are definitely right, this should be documented better. We will look into adding better documentation around this.