Skip to content

feat(kes): support M-Pesa payout channels - #636

Open
chibie wants to merge 1 commit into
feat/kes-mpesa-foundationsfrom
feat/kes-mpesa-payout-channels
Open

feat(kes): support M-Pesa payout channels#636
chibie wants to merge 1 commit into
feat/kes-mpesa-foundationsfrom
feat/kes-mpesa-payout-channels

Conversation

@chibie

@chibie chibie commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds the user-facing KES M-Pesa payout flow on top of #635.

When Noblocks receives the single SAFAKEPC institution 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 submit SAFAKEPC; 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.ts

  • Local 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

  • I have added documentation and tests for new/changed functionality in this PR
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

By submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.

@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fec977b8-c3cc-44bb-b893-83105b69a989

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant