Define constants in hook_init I am writing a custom module for stripe payments and I need to declare constants for CLIENT_ID and CLIENTSECRETKEY.

is it good to declare them in hook_init because then they will available every where ?

module contains other functions like make_payment and add customer etc.
hook_init() is not invoked for cached pages, so you could be opening yourself up to a world of pain if you do that.

Constants outside of a class that need to be accessed by several functions are global by nature, so just put them in the global namespace. It's the best way to ensure they're consistently available when you expect them to be.