Error handling for Stripe credit card processing
Your first step would be to separate out actually rendering the error message from rescueing the exceptions:

def render_errors(errors, template: :err_show,  status: :payment_required)
  render template, status: status, json: errors
end


Then can you group the majority of the exceptions:

rescue Stripe::InvalidRequestError, 
       Stripe::AuthenticationError
       Stripe::APIConnectionError,
       Stripe::StripeError =&gt; e

render_errors( stripe_error(e) )


A good idea would be then to separate generating the errors and logging them.