Skip to content

Commit 60ffcc7

Browse files
authored
Merge pull request #29 from Monnify/dev
fix: update ValidateAccountNumberAsync to the v2 account validation path
2 parents 5e65c57 + 836a536 commit 60ffcc7

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ own version is independent of Monnify's API versioning.
141141
* add paycode support — `CreatePaycodeAsync`, `GetPaycodesAsync`, `GetPaycodeAsync`, `CancelPaycodeAsync`, `GetUnmaskedPaycodeAsync` (`IMonnifyCollectionsClient`)
142142
* add customer wallet support — `CreateWalletAsync`, `GetWalletsAsync`, `GetCustomerWalletBalanceAsync`, `GetWalletTransactionsAsync` (`IMonnifyDisbursementsClient`)
143143

144+
### Changed
145+
146+
* `ValidateAccountNumberAsync` now calls `GET /api/v2/disbursements/account/validate` instead of the `v1` path — the `v1` path still responds identically in sandbox, but `v2` is the current documented path
147+
144148
### Fixed
145149

146150
* envelope handling now tolerates endpoints (e.g. paycodes) that omit `requestSuccessful` from their response

docs/COMPATIBILITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Status legend:
6969
| `IMonnifyDisbursementsClient.GetWalletsAsync` | `GET /api/v1/disbursements/wallet?pageNo=&pageSize=&walletReference=` | **Implemented** | 21 wallets in sandbox; `createdOn` is absent in list items but present on create response |
7070
| `IMonnifyDisbursementsClient.GetCustomerWalletBalanceAsync` | `GET /api/v1/disbursements/wallet/balance?accountNumber=` | **Implemented**
7171
| `IMonnifyDisbursementsClient.GetWalletTransactionsAsync` | `GET /api/v1/disbursements/wallet/transactions?accountNumber=&pageNo=&pageSize=` | **Implemented** | Balance amounts sent as large integers (e.g. 5000000000); `AllowReadingFromString` applied defensively |
72-
| `IMonnifyVerificationClient.ValidateAccountNumberAsync` | `GET /api/v1/disbursements/account/validate?accountNumber=&bankCode=` | **Implemented** | Free on both sandbox and live |
72+
| `IMonnifyVerificationClient.ValidateAccountNumberAsync` | `GET /api/v2/disbursements/account/validate?accountNumber=&bankCode=` | **Implemented** | Free on both sandbox and live. Sandbox-confirmed the v1 path also still responds identically, but v2 is the current documented path |
7373
| `IMonnifyVerificationClient.MatchBvnDetailsAsync` | `POST /api/v1/vas/bvn-details-match` | **Implemented** | Bills the merchant wallet per request |
7474
| `IMonnifyVerificationClient.MatchBvnToAccountAsync` | `POST /api/v1/vas/bvn-account-match` | **Implemented** | Bills the merchant wallet per request |
7575
| `IMonnifyVerificationClient.VerifyNinAsync` | `POST /api/v1/vas/nin-details` | **Implemented** | Live environment only; bills the merchant wallet per request |

src/Monnify/Http/MonnifyApiPaths.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal static class Banks
2222

2323
internal static class Verification
2424
{
25-
public const string ValidateAccountNumber = "/api/v1/disbursements/account/validate";
25+
public const string ValidateAccountNumber = "/api/v2/disbursements/account/validate";
2626
public const string BvnDetailsMatch = "/api/v1/vas/bvn-details-match";
2727
public const string BvnAccountMatch = "/api/v1/vas/bvn-account-match";
2828
public const string NinDetails = "/api/v1/vas/nin-details";

tests/Monnify.Tests/Verification/MonnifyVerificationClientTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public async Task ValidateAccountNumberAsync_SendsGetWithQueryParams_AndDeserial
2222
var result = await client.ValidateAccountNumberAsync("0123456789", "044");
2323

2424
Assert.Equal(HttpMethod.Get, handler.Requests[0].Method);
25-
Assert.Equal("/api/v1/disbursements/account/validate", handler.Requests[0].RequestUri!.AbsolutePath);
25+
Assert.Equal("/api/v2/disbursements/account/validate", handler.Requests[0].RequestUri!.AbsolutePath);
2626
Assert.Equal("accountNumber=0123456789&bankCode=044", handler.Requests[0].RequestUri!.Query.TrimStart('?'));
2727
Assert.Equal("Ada Lovelace", result.AccountName);
2828
Assert.Equal("NGN", result.CurrencyCode);

0 commit comments

Comments
 (0)