Skip to content

Commit

Permalink
Add bank profile for HSBCnet UK
Browse files Browse the repository at this point in the history
  • Loading branch information
markm77 committed May 4, 2023
1 parent db65707 commit d64b357
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/bank-integrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ UK Open Banking uses the [Financial-grade API](https://openid.net/specs/openid-f
| Bank Group | Brand/App (OIDC Issuer) | Sandbox? | Bank Profile | APIs |
|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
| Barclays | Personal<br>Wealth<br>Barclaycard<br>Business<br>Corporate<br>Barclaycard&nbsp;Commercial&nbsp;Payments | :white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square: | Barclays_Personal<br>Barclays_Wealth<br>Barclays_Barclaycard<br>Barclays_Business<br>Barclays_Corporate<br>Barclays_BarclaycardCommercialPayments | AISP |
| HSBC | FirstDirect<br>UK Personal<br>UK Business<br>UK Kinetic | :white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square: | Hsbc_FirstDirect<br>Hsbc_UkPersonal<br>Hsbc_UkBusiness<br>Hsbc_UkKinetic | AISP |
| HSBC | FirstDirect<br>UK Personal<br>UK Business<br>UK Kinetic<br>HSBCnet UK | :white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square: | Hsbc_FirstDirect<br>Hsbc_UkPersonal<br>Hsbc_UkBusiness<br>Hsbc_UkKinetic<br>Hsbc_HsbcNetUk | AISP |
| Lloyds | Sandbox<br>Lloyds Personal<br>Lloyds Business<br>Lloyds Commercial<br>Halifax Personal<br>Bank&nbsp;of&nbsp;Scotland&nbsp;Personal<br>Bank&nbsp;of&nbsp;Scotland&nbsp;Business<br>Bank&nbsp;of&nbsp;Scotland&nbsp;Commercial<br>MBNA Personal | :white_check_mark:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square: | Lloyds_Sandbox<br>Lloyds_LloydsPersonal<br>Lloyds_LloydsBusiness<br>Lloyds_LloydsCommerical<br>Lloyds_HalifaxPersonal<br>Lloyds_BankOfScotlandPersonal<br>Lloyds_BankOfScotlandBusiness<br>Lloyds_BankOfScotlandCommerical<br>Lloyds_MbnaPersonal | AISP |
| NatWest | NatWest Sandbox<br>RBS Sandbox<br>NatWest<br>NatWest Bankline<br>NatWest ClearSpend<br>RBS<br>RBS Bankline<br>RBS ClearSpend<br>The One<br>NatWest One<br>Virgin One<br>Ulster Bank NI<br>Ulster Bank NI Bankline<br>Ulster&nbsp;Bank&nbsp;NI&nbsp;ClearSpend | :white_check_mark:<br>:white_check_mark:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square: | NatWest_NatWestSandbox<br>NatWest_RoyalBankOfScotlandSandbox<br>NatWest_NatWest<br>NatWest_NatWestBankline<br>NatWest_NatWestClearSpend<br>NatWest_RoyalBankOfScotland<br>NatWest_RoyalBankOfScotlandBankline<br>NatWest_RoyalBankOfScotlandClearSpend<br>NatWest_TheOne<br>NatWest_NatWestOne<br>NatWest_VirginOne<br>NatWest_UlsterBankNi<br>NatWest_UlsterBankNiBankline<br>NatWest_UlsterBankNiClearSpend | AISP |
| NatWest | NatWest Sandbox<br>RBS Sandbox<br>NatWest<br>NatWest Bankline<br>NatWest ClearSpend<br>RBS<br>RBS Bankline<br>RBS ClearSpend<br>The One<br>NatWest One<br>Virgin One<br>Ulster Bank NI<br>Ulster Bank NI Bankline<br>Ulster&nbsp;Bank&nbsp;NI&nbsp;ClearSpend | :white_check_mark:<br>:white_check_mark:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square:<br>:white_large_square: | NatWest_NatWestSandbox<br>NatWest_RoyalBankOfScotlandSandbox<br>NatWest_NatWest<br>NatWest_NatWestBankline<br>NatWest_NatWestClearSpend<br>NatWest_RoyalBankOfScotland<br>NatWest_RoyalBankOfScotlandBankline<br>NatWest_RoyalBankOfScotlandClearSpend<br>NatWest_TheOne<br>NatWest_NatWestOne<br>NatWest_VirginOne<br>NatWest_UlsterBankNi<br>NatWest_UlsterBankNiBankline<br>NatWest_UlsterBankNiClearSpend | AISP |
| OBIE | Modelo | :white_check_mark: | Obie_Modelo | AISP, PISP |

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public enum HsbcBank
Sandbox,
UkBusiness,
UkKinetic,
UkPersonal
UkPersonal,
HsbcNetUk
}

public class Hsbc : BankGroupBase<HsbcBank>
Expand All @@ -26,6 +27,7 @@ public Hsbc(BankGroupEnum bankGroupEnum) : base(bankGroupEnum) { }
[BankProfileEnum.Hsbc_Sandbox] = HsbcBank.Sandbox,
[BankProfileEnum.Hsbc_UkBusiness] = HsbcBank.UkBusiness,
[BankProfileEnum.Hsbc_UkKinetic] = HsbcBank.UkKinetic,
[BankProfileEnum.Hsbc_UkPersonal] = HsbcBank.UkPersonal
[BankProfileEnum.Hsbc_UkPersonal] = HsbcBank.UkPersonal,
[BankProfileEnum.Hsbc_HsbcNetUk] = HsbcBank.HsbcNetUk
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ public enum BankProfileEnum
[EnumMember(Value = "Hsbc_UkPersonal")]
Hsbc_UkPersonal,

[EnumMember(Value = "Hsbc_HsbcNetUk")]
Hsbc_HsbcNetUk,

[EnumMember(Value = "Danske")]
Danske,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public static BankGroupEnum GetBankGroupEnum(BankProfileEnum bankProfileEnum) =>
BankProfileEnum.Hsbc_UkBusiness => BankGroupEnum.Hsbc,
BankProfileEnum.Hsbc_UkKinetic => BankGroupEnum.Hsbc,
BankProfileEnum.Hsbc_UkPersonal => BankGroupEnum.Hsbc,
BankProfileEnum.Hsbc_HsbcNetUk => BankGroupEnum.Hsbc,
BankProfileEnum.Danske => BankGroupEnum.Danske,
BankProfileEnum.Monzo => BankGroupEnum.Monzo,
BankProfileEnum.Barclays_Sandbox => BankGroupEnum.Barclays,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ public override BankProfile GetBankProfile(HsbcBank bank)
// from: https://openbanking.atlassian.net/wiki/spaces/AD/pages/108266712/Implementation+Guide+HSBC+Personal
"https://api.ob.hsbc.co.uk",
"https://api.ob.hsbc.co.uk/obie/open-banking/v3.1/aisp"),
HsbcBank.HsbcNetUk => (
// from: https://develop.hsbc.com/sites/default/files/open_banking/HSBC%20Open%20Banking%20TPP%20Implementation%20Guide%20(v3.1).pdf
"https://api.ob.hsbcnet.com",
"https://api.ob.hsbcnet.com/obie/open-banking/v3.1/aisp"),
_ => throw new ArgumentOutOfRangeException()
};
var sandboxGrantPostCustomBehaviour = new GrantPostCustomBehaviour
Expand Down Expand Up @@ -75,6 +79,12 @@ public override BankProfile GetBankProfile(HsbcBank bank)
AudClaim = issuerUrl,
UseApplicationJoseNotApplicationJwtContentTypeHeader = true
},
BankRegistrationPut = bank is HsbcBank.Sandbox
? null
: new BankRegistrationPutCustomBehaviour
{
CustomTokenScope = "accounts"
},
JwksGet = bank is HsbcBank.Sandbox
? new JwksGetCustomBehaviour
{
Expand All @@ -94,6 +104,7 @@ public override BankProfile GetBankProfile(HsbcBank bank)
? sandboxGrantPostCustomBehaviour
: null
},
BankConfigurationApiSettings = new BankConfigurationApiSettings { UseRegistrationGetEndpoint = true },
AccountAndTransactionApiSettings = new AccountAndTransactionApiSettings
{
AccountAccessConsentExternalApiRequestAdjustments = externalApiRequest =>
Expand Down

0 comments on commit d64b357

Please sign in to comment.