Added gateway and webhook functionality.