> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yapily.com/llms.txt
> Use this file to discover all available pages before exploring further.

# HSBC Corporate

## Links

* [Developer Portal](http://developer.hsbc.com/)

## Scopes

| Institution Id    | Scopes                                                              | Supported Countries                                                                                                                                                                                                                     |
| ----------------- | ------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| hsbccorporate     | Open Data 🌐<br />Account Information 🔒<br />Payment Initiation 🔒 | UK 🇬🇧                                                                                                                                                                                                                                 |
| hsbccorporate\_eu | Open Data 🌐<br />Account Information 🔒                            | France 🇫🇷<br />Malta 🇲🇹<br />Malta 🇲🇹<br />Germany 🇩🇪<br />Belgium 🇧🇪<br />Netherlands 🇳🇱<br />Poland 🇵🇱<br />Greece 🇬🇷<br />Czech Republic 🇨🇿<br />Ireland 🇮🇪<br />Italy 🇮🇹<br />Luxembourg 🇱🇺<br />Spain 🇪🇸 |

## Registration Process

HSBC Supports Dynamic Registration. Please note that once a certificate is used for registration, it cannot be used again for performing registration (One registration per certificate).

## Onboarding ASPSP's to Yapily Application

### OB Certificates

**Precondition**: To connect to Hsbc institutions with OB certs a dynamic registration request (DCR) is needed.

**Pre-requisites for DCR:**

* Valid OBWAC / OBSEAL certificates
* SSA (downloaded from OBIE directory)

### Steps Required for DCR registration

1. **Download your SSA from the OBIE directory**

   Open the OBIE Directory for your organisation, navigate to the SSA you want to use for the registration and generate the SSA. The downloaded SSA has to be passed as is to the registration endpoint; **do not alter the contents or format**.

2. Upload the signing (OBSEAL) and transport (OBWAC) certificates into V2 services

   **Request**

   ```shell theme={null}
   curl --location --request POST 'https://api.yapily.com/certificates/keys/' \
   --header 'Authorization: Basic YOUR_APPLICATION_CREDENTIALS_AS_BASIC_AUTH' \
   --header 'Content-Type: application/json' \
   --data-raw '[{
      "pem": "$YOUR_PUBLIC_KEY_AS_PEM",
      "key": "$YOUR_PRIVATE_KEY",
      "kid" : "$CERT_KID",
      "name" : "$CERTIFICATE_NAME"
   }]'
   ```

   **Response**

   ```json theme={null}
   {
   "id": "d16f87d3-4222-4173-b8b9-44aeccacae7d",
   ....
   }
   ```

   Save the id and remember for which kind of key it corresponds:
   e.g. `SIGNING_KEY_UUID = d16f87d3-4222-4173-b8b9-44aeccacae7d`

   Once you have done it for the signing key, do the same request for your transport key.

3. **Call the registration endpoint**

   The final step is to call the registration endpoint with the certificate UUIDs and the downloaded SSA:

   **Request**

   Do not alter the downloaded SSA. Pass directly to the register endpoint in its JWS format.

   ```shell theme={null}
   curl --location --request POST 'https://api.yapily.com/institutions/hsbccorporate/register' \
        --header 'Content-Type: application/json' \
        --header 'Authorization: Bearer YOUR_APPLICATION_CREDENTIALS_AS_BASIC_AUTH' \
        --data-raw '{
               "signingKeyID": "$SIGNING_KEY_UUID",
               "transportKeyID": "$TRANSPORT_KEY_UUID"
               "ssa": "$DOWNLOADED_SSA"
        }'
   ```

   **Response**

   ```json theme={null}
   {
      "id": "a0460a91-4b4c-422a-bbe6-bebe0b92e308"
   }
   ```

   Note above ID, this will be the clientId which can be further used to Get, Modify, Delete registrations with Yapily

## Support

If you require technical support with certificate management, please contact [Support](/resources/support).
