feat(kes): support M-Pesa payout channels - #636
Open
chibie wants to merge 1 commit into
Open
Conversation
chibie
requested review from
5ran6,
Dprof-in-tech,
onahprosper and
sundayonah
as code owners
July 26, 2026 00:25
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds the user-facing KES M-Pesa payout flow on top of #635.
When Noblocks receives the single
SAFAKEPCinstitution from the API, the recipient picker now presents three virtual choices: M-PESA (Send Money), M-PESA (Till), and M-PESA (Paybill). All choices continue to submitSAFAKEPC; the selected rail is carried separately as channel metadata.Till uses a 5–7 digit field without phone formatting. Paybill displays a required Business number field alongside the account/reference. Verify-account receives the same channel and business-number metadata used by order creation, and encrypted recipient metadata merges these values with the existing sender API key. Preview labels make the selected rail explicit.
There are no API or contract changes. Keeping one generic M-Pesa option was considered, but it cannot distinguish phone, Till, and Paybill input requirements and risks treating business identifiers as phone numbers.
References
Testing
npm test -- --runInBand __tests__/kes-mpesa-channel.test.tsLocal Playwright smoke test with mocked institutions and verify-account response covered Send Money, Till, and Paybill selection and metadata.
Developed and tested on macOS with Chromium.
This change adds test coverage for new/changed/fixed functionality
Checklist
mainBy submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.