Your question is not clear, is it MPesa C2B or to a phone number?
If you're receiving through a paybill or till number then there is an api (Daraja)