Skip to content

Add ZAR KES TSZ ZMW RWF account beneficiary information for grid#231

Open
matthappens wants to merge 1 commit intomainfrom
02-25-add_zar_kes_tsz_zmw_rwf_account_beneficiary_information_for_grid
Open

Add ZAR KES TSZ ZMW RWF account beneficiary information for grid#231
matthappens wants to merge 1 commit intomainfrom
02-25-add_zar_kes_tsz_zmw_rwf_account_beneficiary_information_for_grid

Conversation

@matthappens
Copy link

@matthappens matthappens commented Feb 25, 2026

TL;DR

Added support for 5 new African currencies (KES, RWF, TZS, ZAR, ZMW) with mobile money and bank transfer payment methods, plus set minimum Node.js version requirement to 18.0.0.

What changed?

  • Added 5 new external account types: KES_ACCOUNT, RWF_ACCOUNT, TZS_ACCOUNT, ZAR_ACCOUNT, ZMW_ACCOUNT
  • Implemented mobile money support for Kenya (M-PESA), Rwanda (MTN, AIRTEL), Tanzania (AIRTEL, VODACOM), and Zambia (TNM, AIRTEL, ZAMTEL, MTN)
  • Added bank transfer support for South Africa with account number and bank name validation
  • Created complete schema definitions including account info, beneficiary info, and external account info for each new currency
  • Added phone number validation patterns specific to each country's format
  • Integrated all new account types into the discriminator mappings and oneOf schemas

How to test?

  • Test creating external accounts for each new currency type (KES, RWF, TZS, ZAR, ZMW)
  • Validate phone number formats for mobile money accounts match country-specific patterns
  • Test bank account creation for ZAR accounts with proper account number validation
  • Confirm all mobile money providers are accepted for their respective countries

Why make this change?

This change expands payment coverage to key African markets by adding support for popular local payment methods like M-PESA in Kenya and various mobile money providers across East and Southern Africa.

Copy link
Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

feat: Add ZAR KES TSZ ZMW RWF account beneficiary information for grid

openapi

feat(api): add KES/RWF/TZS/ZAR/ZMW external account types

python

feat(api): add KES/RWF/TZS/ZAR/ZMW account types to external account info

typescript

feat(api): add KES/RWF/TZS/ZAR/ZMW account types to external-accounts

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

pip install https://pkg.stainless.com/s/grid-python/52b630a857b6a0c0eef389fdcc28fef3dee873b7/grid-0.0.1-py3-none-any.whl
New diagnostics (15 note)
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Model/Recommended: `#/components/schemas/KesExternalAccountInfo` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/KesBeneficiary` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/RwfExternalAccountInfo` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/RwfBeneficiary` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/TzsExternalAccountInfo` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
grid-openapi studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅

New diagnostics (15 note)
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Model/Recommended: `#/components/schemas/KesExternalAccountInfo` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/KesBeneficiary` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/RwfExternalAccountInfo` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/RwfBeneficiary` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/TzsExternalAccountInfo` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
grid-kotlin studio
grid-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

npm install https://pkg.stainless.com/s/grid-typescript/ce4fa0629201ec8285594b98afe771934d2c7763/dist.tar.gz
New diagnostics (15 note)
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Schema/RequiredPropertyNotDefined: This schema marks `accountType` as `required`, but it isn't defined in `properties`, so it will be ignored.
💡 Model/Recommended: `#/components/schemas/KesExternalAccountInfo` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/KesBeneficiary` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/RwfExternalAccountInfo` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/RwfBeneficiary` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.
💡 Model/Recommended: `#/components/schemas/TzsExternalAccountInfo` could potentially be defined as a [model](https://www.stainless.com/docs/guides/configure#models) within `#/resources/customers/subresources/external_accounts`.

⏳ These are partial results; builds are still running.


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-02-25 20:04:29 UTC

"@types/node": "^20.0.0",
"ts-node": "^10.9.2",
"typescript": "^5.4.0"
},
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might be able to skip this

@matthappens matthappens force-pushed the 02-25-add_zar_kes_tsz_zmw_rwf_account_beneficiary_information_for_grid branch from 3621b11 to 07d2ba8 Compare February 25, 2026 19:54
@matthappens matthappens marked this pull request as ready for review February 25, 2026 20:05
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 25, 2026

Greptile Summary

Added support for 5 new African currencies (KES, RWF, TZS, ZAR, ZMW) with region-specific payment methods. The implementation follows existing patterns consistently across all new account types.

Key Changes:

  • Mobile money support for Kenya (M-PESA), Rwanda (MTN, AIRTEL), Tanzania (AIRTEL, VODACOM), and Zambia (TNM, AIRTEL, ZAMTEL, MTN)
  • Bank transfer support for South Africa with account number validation (9-13 digits)
  • Country-specific phone number validation patterns for all mobile money accounts
  • Complete schema integration with discriminator mappings and oneOf schemas
  • Properly generated bundles for both root and Mintlify OpenAPI specs

Note: The PR description mentions "Added Node.js engine requirement of >=18.0.0 in CLI package.json" but no package.json changes are present in this diff. This may need clarification.

Confidence Score: 5/5

  • Safe to merge - well-structured schema additions following established patterns
  • All new schemas follow existing patterns precisely, discriminator mappings are correct, phone/account validation patterns are present, and bundled files were properly regenerated. Only minor verification needed for phone number patterns.
  • No files require special attention - all changes follow established patterns consistently

Important Files Changed

Filename Overview
openapi/components/schemas/common/KesAccountInfo.yaml Added Kenya mobile money account schema with M-PESA provider and phone validation
openapi/components/schemas/common/RwfAccountInfo.yaml Added Rwanda mobile money account schema with MTN and AIRTEL providers
openapi/components/schemas/common/TzsAccountInfo.yaml Added Tanzania mobile money account schema with AIRTEL and VODACOM providers
openapi/components/schemas/common/ZarAccountInfo.yaml Added South Africa bank transfer account schema with account number validation (9-13 digits)
openapi/components/schemas/common/ZmwAccountInfo.yaml Added Zambia mobile money account schema with TNM, AIRTEL, ZAMTEL, and MTN providers
openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml Integrated all 5 new account types into discriminator mapping and oneOf schema
openapi/components/schemas/external_accounts/ExternalAccountType.yaml Added all 5 new account type enums (KES, RWF, TZS, ZAR, ZMW)

Last reviewed commit: 07d2ba8

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

19 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

type: string
description: Kenyan mobile money phone number
example: '+254712345678'
pattern: ^\+254[0-9]{9}$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify pattern ^\+254[0-9]{9}$ correctly validates all M-PESA numbers (check if 7xx, 1xx prefixes are the only valid ones for Kenya mobile money).

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/KesAccountInfo.yaml
Line: 29

Comment:
Verify pattern `^\+254[0-9]{9}$` correctly validates all M-PESA numbers (check if 7xx, 1xx prefixes are the only valid ones for Kenya mobile money).

How can I resolve this? If you propose a fix, please make it concise.

type: string
description: Rwandan mobile money phone number
example: '+250781234567'
pattern: ^\+250[0-9]{9}$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify pattern ^\+250[0-9]{9}$ covers all valid MTN and AIRTEL mobile money numbers in Rwanda.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/RwfAccountInfo.yaml
Line: 29

Comment:
Verify pattern `^\+250[0-9]{9}$` covers all valid MTN and AIRTEL mobile money numbers in Rwanda.

How can I resolve this? If you propose a fix, please make it concise.

type: string
description: Tanzanian mobile money phone number
example: '+255712345678'
pattern: ^\+255[0-9]{9}$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify pattern ^\+255[0-9]{9}$ covers all valid AIRTEL and VODACOM mobile money numbers in Tanzania.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/TzsAccountInfo.yaml
Line: 29

Comment:
Verify pattern `^\+255[0-9]{9}$` covers all valid AIRTEL and VODACOM mobile money numbers in Tanzania.

How can I resolve this? If you propose a fix, please make it concise.

type: string
description: Zambian mobile money phone number
example: '+260971234567'
pattern: ^\+260[0-9]{9}$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verify pattern ^\+260[0-9]{9}$ covers all valid mobile money numbers for TNM, AIRTEL, ZAMTEL, and MTN in Zambia.

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/common/ZmwAccountInfo.yaml
Line: 29

Comment:
Verify pattern `^\+260[0-9]{9}$` covers all valid mobile money numbers for TNM, AIRTEL, ZAMTEL, and MTN in Zambia.

How can I resolve this? If you propose a fix, please make it concise.

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