[rest] Add support for 402 Payment required HTTP code

Add a new callback in rest handler to support 402 Payment Required HTTP code.
Update documentation wrt has_credit callback.