> ## 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.

# Hellenic Bank

## Links

* [Developer Portal](https://openapis.hellenicbank.com/)

## Scopes

* Account Information 🔒
* Payment Initiation 🔒

## Live Environment

**Precondition**: To connect to Hellenic Group, an application needs to be created. Once the application is created a **client\_id** and **client\_secret** are generated.

**Pre-requisites for Registration:**

1. Valid QWAC / QSEAL certificates.
2. Upload the signing (QSEAL) and transport (QWAC) certificates into V2 services

* For the signing and transport certificate (QSEAL & QWAC) upload use the following request twice for each upload changing, preferentially you can specify the type of the certificate adding: (`"type": "Q_SEAL"` for signing and `"type": "Q_WAC"` for transport) **This field is not mandatory.**

**Request format:**

```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",
     "type": "Q_WAC"
 }]'
```

* Where pem and key need to be in the following format:
  `-----BEGIN PRIVATE KEY-----\n
  KEY_HASH\n
  MORE_KEY_HASH\n
  SOME_MORE_KEY_HASH\n -----END PRIVATE KEY-----`

**Please note:**

1. Spaces between "begin/end private key" words are respected.
2. Begin/End Private Key are included in the value for the pem and key properties.
3. Every line break is escaped with a "\n".
4. There is NO "\n" at the end.

**Response format:**

* Once you have uploaded your certificates successfully, you will receive a response containing an "id". Please make sure that you save them and note to which certificates they belong.
  ```json theme={null}
  {
  "id": "d16f87d3-4222-4173-b8b9-44aeccacae7d",
  ....
  }
  ```

**If the Certificates have already been uploaded:**

Then, it can be retrieved from the endpoint:

[`GET 'https://api.yapily.com/certificates/keys/'`](https://api.yapily.com/certificates/keys/)

**Response format:**

```json theme={null}
{
   "id": "d16f87d3-4222-4173-b8b9-44aeccacae7d",
   "type": "Q_SEAL",
   .....
 },
 {
   "id": "76b453ea-9e41-42e0-a357-d6d7980bf02b",
   "type": "Q_WAC",
   .....
 }
```

## Registration

* Use the following request to register any **Hellenic** institution with Yapily:

```shell theme={null}
curl --location --request POST 'https://api.yapily.com/institutions/{{INSTITUTION_ID}}/manual/register' \
 --header 'Content-Type: application/json' \
 --header 'x-yapily-force-platform: {{platform_version}}' \
 --header 'Authorization: Bearer {{token}}' \
 --data-raw '{
     "signingKeyID": "{{SIGNING_KEY_UUID}}",
     "transportKeyID": "{{TRANSPORT_KEY_UUID}}",
     "clientId": "{{client_id_from_created_application}}",
     "clientSecret": "{{client_secret_from_created_application}}",
     "apiTypes" : ["AISP", "PISP"]
 }'
```

**Where:**

* `INSTITUTION_ID` is the Yapily institution id.
* `SIGNING_KEY_UUID` and `TRANSPORT_KEY_UUID` are the "ids" that you saved before when uploading the certificates (**signing** and **transport**).
* `client_id_from_created_application` and `client_secret_from_created_application` are valid credentials for the Hellenic developer portal.

**Response format:**

* The response from the registration call should also contain an "id", which would mean that the registration was successful. Please save that "id" and note to which bank it belongs.
  ```json theme={null}
  {
  "id": "d16f87d3-4222-4173-b8b9-44aeccacae7d",
  ....
  }
  ```

## Sandbox Environment

1. [Register a new account](https://openapis.hellenicbank.com/user/registration) on the platform
2. [Create an application](https://openapis.hellenicbank.com/sandbox/client)
   1. Name your application
   2. Add a description for your application (optional)
   3. Ensure that at least the 'AccountReporting API' is selected
   4. Add [https://auth.yapily.com/](https://auth.yapily.com/) as a redirect URL
   5. Click 'Add Application'
3. Select 'Manage my products' from the navigation menu on the left and click the 'edit' button next to your newly created application
4. Add the *Client ID* as **Key** and *Client Secret* as **Secret** to your application in the [Yapily Console](https://console.yapily.com/)

## Support

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