In a REST API, in payment method (user gives his card infos), should I return 200 if the payment fails (for card expiration or balance too low problem) with an attached message + custom additional error code in JSON ? Or is there any other HTTP code for this ?
I did not found any information about this particular case, I just found 402 code for payment but it does not seem to be designed for this case. I'm not talking about a server (500) error or unreachable bank, just payment problem due to user card.