diff --git a/CHANGELOG.md b/CHANGELOG.md index 459d05b..cad1251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ own version is independent of Monnify's API versioning. * add paycode support — `CreatePaycodeAsync`, `GetPaycodesAsync`, `GetPaycodeAsync`, `CancelPaycodeAsync`, `GetUnmaskedPaycodeAsync` (`IMonnifyCollectionsClient`) * add customer wallet support — `CreateWalletAsync`, `GetWalletsAsync`, `GetCustomerWalletBalanceAsync`, `GetWalletTransactionsAsync` (`IMonnifyDisbursementsClient`) +### Changed + +* `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 + ### Fixed * envelope handling now tolerates endpoints (e.g. paycodes) that omit `requestSuccessful` from their response diff --git a/docs/COMPATIBILITY.md b/docs/COMPATIBILITY.md index 507389e..de21a46 100644 --- a/docs/COMPATIBILITY.md +++ b/docs/COMPATIBILITY.md @@ -69,7 +69,7 @@ Status legend: | `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 | | `IMonnifyDisbursementsClient.GetCustomerWalletBalanceAsync` | `GET /api/v1/disbursements/wallet/balance?accountNumber=` | **Implemented** | `IMonnifyDisbursementsClient.GetWalletTransactionsAsync` | `GET /api/v1/disbursements/wallet/transactions?accountNumber=&pageNo=&pageSize=` | **Implemented** | Balance amounts sent as large integers (e.g. 5000000000); `AllowReadingFromString` applied defensively | -| `IMonnifyVerificationClient.ValidateAccountNumberAsync` | `GET /api/v1/disbursements/account/validate?accountNumber=&bankCode=` | **Implemented** | Free on both sandbox and live | +| `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 | | `IMonnifyVerificationClient.MatchBvnDetailsAsync` | `POST /api/v1/vas/bvn-details-match` | **Implemented** | Bills the merchant wallet per request | | `IMonnifyVerificationClient.MatchBvnToAccountAsync` | `POST /api/v1/vas/bvn-account-match` | **Implemented** | Bills the merchant wallet per request | | `IMonnifyVerificationClient.VerifyNinAsync` | `POST /api/v1/vas/nin-details` | **Implemented** | Live environment only; bills the merchant wallet per request | diff --git a/src/Monnify/Http/MonnifyApiPaths.cs b/src/Monnify/Http/MonnifyApiPaths.cs index 65ad029..bc4c8ae 100644 --- a/src/Monnify/Http/MonnifyApiPaths.cs +++ b/src/Monnify/Http/MonnifyApiPaths.cs @@ -22,7 +22,7 @@ internal static class Banks internal static class Verification { - public const string ValidateAccountNumber = "/api/v1/disbursements/account/validate"; + public const string ValidateAccountNumber = "/api/v2/disbursements/account/validate"; public const string BvnDetailsMatch = "/api/v1/vas/bvn-details-match"; public const string BvnAccountMatch = "/api/v1/vas/bvn-account-match"; public const string NinDetails = "/api/v1/vas/nin-details"; diff --git a/tests/Monnify.Tests/Verification/MonnifyVerificationClientTests.cs b/tests/Monnify.Tests/Verification/MonnifyVerificationClientTests.cs index 3b03a5d..08f5810 100644 --- a/tests/Monnify.Tests/Verification/MonnifyVerificationClientTests.cs +++ b/tests/Monnify.Tests/Verification/MonnifyVerificationClientTests.cs @@ -22,7 +22,7 @@ public async Task ValidateAccountNumberAsync_SendsGetWithQueryParams_AndDeserial var result = await client.ValidateAccountNumberAsync("0123456789", "044"); Assert.Equal(HttpMethod.Get, handler.Requests[0].Method); - Assert.Equal("/api/v1/disbursements/account/validate", handler.Requests[0].RequestUri!.AbsolutePath); + Assert.Equal("/api/v2/disbursements/account/validate", handler.Requests[0].RequestUri!.AbsolutePath); Assert.Equal("accountNumber=0123456789&bankCode=044", handler.Requests[0].RequestUri!.Query.TrimStart('?')); Assert.Equal("Ada Lovelace", result.AccountName); Assert.Equal("NGN", result.CurrencyCode);