# HHS Süreci
Rıza isteği sonrasında mobil uygulamalar üzerinden kullanıcıların nasıl yönlendirileceğini ve ilgili servislerin nasıl kullanılacağı açıklanmaktadır. Bu süreç iOS ve Android platformları için ayrı ayrı ele alınmış ve ilgili deep linkler ve URL'ler ile kullanıcıların hesap veya ödeme emri rızası türlerine göre yönlendirilmesi detaylandırılmıştır.
Model alanları bkm dokümanına göre set edilmiştir. Alan açıklamaları için BKM doküman linkleri sonda paylaşılmıştır.
## 1. Deep Linkler ve ULinkler
### iOS
- **xxxxx**
- ULink: [xxxxx ULink](https://c7k3.adj.st/openbanking?consentno=03094bb1-34bb-4b09-811a-50dd3442b28f&adj_t=1aw6o7am&adj_redirect=https%3A%2F%2Ftest-xxxxxx-token.xxxxx.com.tr%2Fpublic%2FOpenBankingAuthorize%3Friza_no%3D03094bb1-34bb-4b09-811a-50dd3442b28f)
- Deep Link: `xxxxxtest://openbanking?consentno=f4402c7c-3d80-416a-8c20-7e2c4fa7bb33`
- **xxxxxx**
- ULink: [xxxxxxxxx ULink](https://yccw.adj.st/openbanking?consentno=bddb83ec-071a-4db4-ba08-2fb867290d1f&adj_t=1a1840pb&adj_redirect=https%3A%2F%2Ftest-xxxxxx-token.xxxxx.com.tr%2Fpublic%2FOpenBankingAuthorize%3Friza_no%3Dbddb83ec-071a-4db4-ba08-2fb867290d1f)
- Deep Link: `ontest://openbanking?consentno=7017ad15-3ba7-4e7b-b3f5-3487a94a0e08`
### Android
- **xxxxx**
- ULink: [xxxxx ULink](https://app.adjust.com/1bnbxwyl?deep_link=xxxxx%3A%2F%2Fopenbanking%3Fconsentno%3D3ec7d96e-7ebd-4f16-b361-fb750d0cc7a8&redirect=https%3A%2F%2Ftest-xxxxxx-token.xxxxx.com.tr%2Fpublic%2FOpenBankingAuthorize%3Friza_no%3D3ec7d96e-7ebd-4f16-b361-fb750d0cc7a8)
- Deep Link: `xxxxx://openbanking?consentno=f4402c7c-3d80-416a-8c20-7e2c4fa7bb33`
- **xxxxxx**
- ULink: [xxxxxx ULink](https://app.adjust.com/1bbrd3qg?deep_link=onmobil%3A%2F%2Fopenbanking%3Fconsentno%3D2a7977f6-9967-41d4-96a8-7b0105da7445&redirect=https%3A%2F%2Ftest-xxxxxx-token.xxxxx.com.tr%2Fpublic%2FOpenBankingAuthorize%3Friza_no%3D2a7977f6-9967-41d4-96a8-7b0105da7445)
- Deep Link: `onmobil://openbanking?consentno=18860349-68ba-4db0-8d9a-133f9d8c0033`
## 2. Rıza Tipinin Belirlenmesi
Mobil uygulama, linkler içerisindeki rıza bilgilerini yakalar ve consent servisinden rıza tipini öğrenir.
### API Çağrısı
- **URL:** `https://test-xxxxxx-consent.xxxxx.com.tr/OpenBankingConsentHHS/GetConsentWebViewInfo/{consentId}`
- **Örnek Curl:**
```shell
curl -X 'GET' \ 'https://test-xxxxxx-consent.xxxxx.com.tr/OpenBankingConsentHHS/GetConsentWebViewInfo/697d9e16-4f3e-498d-8a1e-a114fd159b40' \ -H 'accept: */*' \ -H 'user_reference: 14785096134'
```
- **Örnek Response:**
```json
{
"rizaNo": "697d9e16-4f3e-498d-8a1e-a114fd159b40",
"consentType": "OB_Account",
"forwardingUrl": "https://test-accountlisting.xxxxx.com.tr/Home/AccountSelection?id=697d9e16-4f3e-498d-8a1e-a114fd159b40"
}
```
Rıza türüne göre hesap bilgisi rızası ekranları ya da ödeme emri rızası ekranları açtırılır.
### Rıza Türlerine Göre Yönlendirme
#### Hesap Rızası
1. **Rıza Bilgilerinin Getirilmesi**
- **URL:** `https://test-xxxxxx-consent.xxxxx.com.tr/OpenBankingConsentHHS/GetAccountConsentById/{rizaNo}`
UI a gelen rıza ile istek atılır aşağıda ki örnek responsedan rıza bilgileri getirilir.
- **Örnek Response:**
```json
{
"additionalData": {
"rzBlg": {
"rizaNo": "7cb05feb-348a-4605-b65f-314ea04c901a",
"olusZmn": "2024-05-22T13:33:13.5874366Z",
"gnclZmn": "2024-05-22T13:40:43.2251324Z",
"rizaDrm": "I",
"rizaIptDtyKod": "05"
},
"kmlk": {
"kmlkTur": "K",
"kmlkVrs": "14785096134",
"krmKmlkTur": null,
"krmKmlkVrs": null,
"ohkTur": "B"
},
"katilimciBlg": {
"hhsKod": "0125",
"yosKod": "2710"
},
"gkd": {
"yetYntm": "Y",
"yonAdr": "https://tripsit.bkm.com.tr/boss/ab/yos-simulator-ui-v11/2710?drmKod=232327b7-5403-42dd-9e9e-1a470e373cd9",
"ayrikGkd": null,
"hhsYonAdr": "https://yccw.adj.st/openbanking?consentno=7cb05feb-348a-4605-b65f-314ea04c901a&adj_t=1a1840pb&adj_redirect=https%3A%2F%2Ftest-xxxxxx-token.xxxxx.com.tr%2Fpublic%2FOpenBankingAuthorize%3Friza_no%3D7cb05feb-348a-4605-b65f-314ea04c901a",
"yetTmmZmn": "2024-05-22T13:38:13.769917Z"
},
"hspBlg": {
"iznBlg": {
"iznTur": [
"01",
"02",
"03",
"04",
"05",
"06"
],
"erisimIzniSonTrh": "2024-11-15T00:00:00+03:00",
"hesapIslemBslZmn": "2024-05-14T00:00:00+03:00",
"hesapIslemBtsZmn": "2025-05-15T00:00:00+03:00"
},
"ayrBlg": null
}
},
"userTCKN": null,
"id": "7cb05feb-348a-4605-b65f-314ea04c901a"
}
```
2. **Kullanıcının Bilgilerinin Alınması**
"businessLine" bilgisi ile xxxxx/ON ayrımı yapıyoruz.
- **URL:** `https://test-entegrasyon-customerapi.xxxxx.com.tr/customer?keyword={customerNo}&api-version=3`
- **Örnek Response:**
```json
{
"recordCount": 2,
"returnCode": 0,
"returnDescription": "Başarılı",
"customerList": [
{
"customerNumber": 20119720,
"name": {
"first": "Name - 20119720",
"last": "SurName - 20119720"
},
"citizenshipNumber": "11111111111",
"taxNo": "",
"isStaff": false,
"gsmPhone": {
"country": "90",
"prefix": "532",
"number": "1214434"
},
"email": null,
"businessEmail": null,
"businessLine": "X",
"branchCode": 2000,
"branchName": "xxxxx DİJİTAL",
"recordStatus": "A",
"customerAddress": {
"district": "",
"street": "",
"addressDetail": "",
"town": "",
"city": "",
"address": ""
},
"identityNumber": "11111111111"
},
{
"customerNumber": 20129692,
"name": {
"first": "BELMA",
"last": "GÖREN"
},
"citizenshipNumber": "11111111111",
"taxNo": "",
"isStaff": true,
"gsmPhone": {
"country": "90",
"prefix": "532",
"number": "1214434"
},
"email": null,
"businessEmail": "BGoren@xxxxx.com.tr",
"businessLine": "B",
"branchCode": 9530,
"branchName": "MERKEZ",
"recordStatus": "A",
"customerAddress": {
"district": "District Test",
"street": "Street Test",
"addressDetail": "AddressDetail Test",
"town": "Town Test",
"city": "City Test",
"address": "District Test Street Test AddressDetail Test Town Test City Test"
},
"identityNumber": "11111111111"
}
]
}
```
3. **Hesap Bilgilerinin Getirilmesi**
- **URL:** `http://svtstr3app01.ebt.bank/fora/DigitalServices/AccountService.svc/hesaplar/{customerNo}?syfKytSayi={syfKytSayi}&syfNo={syfNo}&srlmKrtr={srlmKrtr}&srlmYon={srlmYon}`
- **Headers:**
- `Content-Type: application/json`
- `CHANNEL:INTERNET`
- `branch:2000`
- `user:EBT\INTERNETUSER`
- **Örnek Response:**
```json
[
{
"rizaNo": "000",
"hspTml": {
"hspRef": "2000-20186865-352",
"hspNo": "TR230012502002018686500352",
"hspShb": "MUSTAFA BOLAT",
"subeAdi": "xxxxx DİJİTAL",
"kisaAd": "VADESIZ MEVDUAT",
"prBrm": "TRY",
"hspTur": "T",
"hspTip": "VADESIZ",
"hspUrunAdi": "VDSZMVD",
"hspDrm": "AKTIF"
},
"hspDty": null
},
{
"rizaNo": "000",
"hspTml": {
"hspRef": "2000-20186865-351",
"hspNo": "TR500012502002018686500351",
"hspShb": "MUSTAFA BOLAT",
"subeAdi": "xxxxx DİJİTAL",
"kisaAd": "VADESIZ MEVDUAT",
"prBrm": "TRY",
"hspTur": "T",
"hspTip": "VADESIZ",
"hspUrunAdi": "VDSZMVD",
"hspDrm": "AKTIF"
},
"hspDty": null
}
]
```
4. **Bakiye Bilgilerinin Getirilmesi**
- **URL:** `http://svtstr3app01.ebt.bank/fora/DigitalServices/AccountService.svc/hesaplar/{customerNo}/bakiye`
- **Headers:**
- `Content-Type: application/json`
- `CHANNEL:INTERNET`
- `branch:2000`
- `user:EBT\INTERNETUSER`
- **Örnek Response:**
```json
[
{
"hspRef": "2000-20186865-352",
"bky": {
"bkyTtr": "0.00",
"blkTtr": "0.00",
"prBrm": "TRY",
"bkyZmn": "2024-05-22T13:16:00+03:00",
"krdHsp": {
"kulKrdTtr": "0.00",
"krdDhlGstr": "0"
}
}
},
{
"hspRef": "2000-20186865-351",
"bky": {
"bkyTtr": "0.00",
"blkTtr": "0.00",
"prBrm": "TRY",
"bkyZmn": "2024-05-22T13:16:00+03:00",
"krdHsp": {
"kulKrdTtr": "0.00",
"krdDhlGstr": "0"
}
}
}
]
```
5. **YÖS Bilgilerinin Getirilmesi**
- **URL:** `https://test-xxxxxx-consent.xxxxx.com.tr/OpenBankingYosInfo/code/{code}`
- **Örnek Response:**
```json
{
"kod": "2710",
"unv": "xxxxx",
"marka": "BRG",
"acikAnahtar": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyWg0HZnW8tQRcf+WvAbmWNnoo5MU9bPKPuZdpbgEzxfxY1v3MZZejnWfFDeaCwB8NCSsOpCzp9x5oq1kvIbL+//ZA9GHlo/uKt1zqibtlh1zPRSdiZ9Uj1yMCRhuTUVCGe67WbYkeKFEjCbK8R9HZGMjv/o243YtjTkd8njJWAw7QNoQMbz9+9hHmwnMeetJsFY1qGfzXpkpd7EmX92SEofbJHSSoPKGYIVo4+iuPWruo8MTlJxK5B1FCuk4vaPN720Wfvpnfn9/t9gKN3/yCNtX1SntvlIIRBiuN0kbF4F3lKpsi9lrtjl3IgMjjmfaZ0OYZI1NAYIsCFsIfIOrDQIDAQAB",
"roller": ["obhs", "hbhs"],
"adresler": [
{
"yetYntm": "Y",
"adresDetaylari": [
{
"tmlAdr": "bossmobile://boss/ab",
"aciklama": "Mobile Link Varsayılan Açıklama"
},
{
"tmlAdr": "https://tripsit.bkm.com.tr/boss/ab",
"aciklama": "Varsayılan Açıklama"
}
]
}
],
"logoBilgileri": [],
"apiBilgileri": [
{
"api": "ods",
"surum": "s1.1"
}
],
"durum": "A",
"Id": "3e14773a-c910-422a-a486-c2bd06f8d920"
}
```
6. **Consent Güncelleme**
- **URL:** `https://test-xxxxxx-consent.xxxxx.com.tr/OpenBankingConsentHHS/UpdateAccountConsentForAuthorization`
- **Örnek Body:**
```json
{
"Id": "7cb05feb-348a-4605-b65f-314ea04c901a",
"AccountReferences": ["2000-20187017-352", "2000-20187017-351", "1050-20187017-352", "1050-20187017-351"]
}
```
7. **Yetkilendirme Kodu Alma ve Yönlendirme**
- **Redirect URL:** `http://test-xxxxxx-token.xxxxx.com.tr/public/OpenBankingAuthCode?consentId={consentId}`
#### Ödeme Emri Rızası
1. **Rıza Bilgilerinin Getirilmesi**
- **URL:** `https://test-xxxxxx-consent.xxxxx.com.tr/OpenBankingConsentHHS/GetPaymentConsentById/{rizaNo}`
- **Örnek Response:**
```json
{
"AdditionalData": {
"rzBlg": {
"rizaNo": "a315d6d8-4ca5-49d9-b63e-da463409bf5a",
"olusZmn": "2024-05-23T13:12:41.570967Z",
"gnclZmn": "2024-05-23T13:12:41.5709846Z",
"rizaDrm": "B",
"rizaIptDtyKod": null
},
"katilimciBlg": {
"hhsKod": "0125",
"yosKod": "2710"
},
"gkd": {
"yetYntm": "Y",
"yonAdr": "https://tripsit.bkm.com.tr/boss/ab/yos-simulator-ui-v11/2710?drmKod=2bdc3da1-0f6e-4bba-9200-e39ceafcd626",
"ayrikGkd": null,
"hhsYonAdr": "https://yccw.adj.st/openbanking?consentno=a315d6d8-4ca5-49d9-b63e-da463409bf5a&adj_t=1a1840pb&adj_redirect=https%3A%2F%2Ftest-xxxxxx-token.xxxxx.com.tr%2Fpublic%2FOpenBankingAuthorize%3Friza_no%3Da315d6d8-4ca5-49d9-b63e-da463409bf5a",
"yetTmmZmn": "2024-05-23T13:17:41.8844043Z"
},
"odmBsltm": {
"kmlk": {
"kmlkTur": "K",
"kmlkVrs": "14785096134",
"krmKmlkTur": null,
"krmKmlkVrs": null,
"ohkTur": "B"
},
"islTtr": {
"prBrm": "TRY",
"ttr": "100.00"
},
"gon": {
"unv": "KERİM KELEN",
"hspNo": "TR660012502002018701700351",
"hspRef": null
},
"alc": {
"unv": "Serkan Eren",
"hspNo": "TR320010009999901234567890",
"kolas": null
},
"kkod": null,
"odmAyr": {
"odmKynk": "O",
"odmAmc": "04",
"refBlg": "Y-2701852-202302",
"odmAcklm": "Iıçoğuş ÇÖĞÜŞ",
"ohkMsj": "ÖHK Mesajı",
"odmStm": "E",
"bekOdmZmn": null
},
"hhsMsrfTtr": {
"prBrm": "TRY",
"ttr": "0,00000000"
},
"obhsMsrfTtr": null
},
"isyOdmBlg": {
"isyKtgKod": "5732",
"altIsyKtgKod": "5732",
"genelUyeIsyeriNo": "01234567"
}
},
"Id": "a315d6d8-4ca5-49d9-b63e-da463409bf5a",
"UserId": null
}
```
2. **Kullanıcının Bilgilerinin Alınması**
- **URL:** `https://test-entegrasyon-customerapi.xxxxx.com.tr/customer?keyword={customerNo}&api-version=3`
- **Örnek Response:**
```json
{
"recordCount": 2,
"returnCode": 0,
"returnDescription": "Başarılı",
"customerList": [
{
"customerNumber": 20119720,
"name": {
"first": "Name - 20119720",
"last": "SurName - 20119720"
},
"citizenshipNumber": "11111111111",
"taxNo": "",
"isStaff": false,
"gsmPhone": {
"country": "90",
"prefix": "532",
"number": "1214434"
},
"email": null,
"businessEmail": null,
"businessLine": "X",
"branchCode": 2000,
"branchName": "xxxxx DİJİTAL",
"recordStatus": "A",
"customerAddress": {
"district": "",
"street": "",
"addressDetail": "",
"town": "",
"city": "",
"address": ""
},
"identityNumber": "11111111111"
},
{
"customerNumber": 20129692,
"name": {
"first": "BELMA",
"last": "GÖREN"
},
"citizenshipNumber": "11111111111",
"taxNo": "",
"isStaff": true,
"gsmPhone": {
"country": "90",
"prefix": "532",
"number": "1214434"
},
"email": null,
"businessEmail": "BGoren@xxxxx.com.tr",
"businessLine": "B",
"branchCode": 9530,
"branchName": "MERKEZ",
"recordStatus": "A",
"customerAddress": {
"district": "District Test",
"street": "Street Test",
"addressDetail": "AddressDetail Test",
"town": "Town Test",
"city": "City Test",
"address": "District Test Street Test AddressDetail Test Town Test City Test"
},
"identityNumber": "11111111111"
}
]
}
```
3. **Hesap Bilgilerinin Getirilmesi**
- **URL:** `http://svtstr3app01.ebt.bank/fora/DigitalServices/AccountService.svc/hesaplar/{customerNo}?syfKytSayi={syfKytSayi}&syfNo={syfNo}&srlmKrtr={srlmKrtr}&srlmYon={srlmYon}`
- **Headers:**
- `Content-Type: application/json`
- `CHANNEL:INTERNET`
- `branch:2000`
- `user:EBT\INTERNETUSER`
- **Örnek Response:**
```json
[
{
"rizaNo": "000",
"hspTml": {
"hspRef": "2000-20186865-352",
"hspNo": "TR230012502002018686500352",
"hspShb": "MUSTAFA BOLAT",
"subeAdi": "xxxxx DİJİTAL",
"kisaAd": "VADESIZ MEVDUAT",
"prBrm": "TRY",
"hspTur": "T",
"hspTip": "VADESIZ",
"hspUrunAdi": "VDSZMVD",
"hspDrm": "AKTIF"
},
"hspDty": null
},
{
"rizaNo": "000",
"hspTml": {
"hspRef": "2000-20186865-351",
"hspNo": "TR500012502002018686500351",
"hspShb": "MUSTAFA BOLAT",
"subeAdi": "xxxxx DİJİTAL",
"kisaAd": "VADESIZ MEVDUAT",
"prBrm": "TRY",
"hspTur": "T",
"hspTip": "VADESIZ",
"hspUrunAdi": "VDSZMVD",
"hspDrm": "AKTIF"
},
"hspDty": null
}
]
```
4. **Bakiye Bilgilerinin Getirilmesi**
- **URL:** `http://svtstr3app01.ebt.bank/fora/DigitalServices/AccountService.svc/hesaplar/{customerNo}/bakiye`
- **Headers:**
- `Content-Type: application/json`
- `CHANNEL:INTERNET`
- `branch:2000`
- `user:EBT\INTERNETUSER`
- **Örnek Response:**
```json
[
{
"hspRef": "2000-20186865-352",
"bky": {
"bkyTtr": "0.00",
"blkTtr": "0.00",
"prBrm": "TRY",
"bkyZmn": "2024-05-22T13:16:00+03:00",
"krdHsp": {
"kulKrdTtr": "0.00",
"krdDhlGstr": "0"
}
}
},
{
"hspRef": "2000-20186865-351",
"bky": {
"bkyTtr": "0.00",
"blkTtr": "0.00",
"prBrm": "TRY",
"bkyZmn": "2024-05-22T13:16:00+03:00",
"krdHsp": {
"kulKrdTtr": "0.00",
"krdDhlGstr": "0"
}
}
}
]
```
5. **YÖS Bilgilerinin Getirilmesi**
- **URL:** `https://test-xxxxxx-consent.xxxxx.com.tr/OpenBankingYosInfo/code/{code}`
- **Örnek Response:**
```json
{
"kod": "2710",
"unv": "xxxxx",
"marka": "BRG",
"acikAnahtar": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyWg0HZnW8tQRcf+WvAbmWNnoo5MU9bPKPuZdpbgEzxfxY1v3MZZejnWfFDeaCwB8NCSsOpCzp9x5oq1kvIbL+//ZA9GHlo/uKt1zqibtlh1zPRSdiZ9Uj1yMCRhuTUVCGe67WbYkeKFEjCbK8R9HZGMjv/o243YtjTkd8njJWAw7QNoQMbz9+9hHmwnMeetJsFY1qGfzXpkpd7EmX92SEofbJHSSoPKGYIVo4+iuPWruo8MTlJxK5B1FCuk4vaPN720Wfvpnfn9/t9gKN3/yCNtX1SntvlIIRBiuN0kbF4F3lKpsi9lrtjl3IgMjjmfaZ0OYZI1NAYIsCFsIfIOrDQIDAQAB",
"roller": ["obhs", "hbhs"],
"adresler": [
{
"yetYntm": "Y",
"adresDetaylari": [
{
"tmlAdr": "bossmobile://boss/ab",
"aciklama": "Mobile Link Varsayılan Açıklama"
},
{
"tmlAdr": "https://tripsit.bkm.com.tr/boss/ab",
"aciklama": "Varsayılan Açıklama"
}
]
}
],
"logoBilgileri": [],
"apiBilgileri": [
{
"api": "ods",
"surum": "s1.1"
}
],
"durum": "A",
"Id": "3e14773a-c910-422a-a486-c2bd06f8d920"
}
```
6. **Consent Güncelleme**
- **URL:** `https://test-xxxxxx-consent.xxxxx.com.tr/OpenBankingConsentHHS/UpdatePaymentConsentForAuthorization`
- **Örnek Body:**
```json
{
"Id": "eda264b7-b234-40b8-b96e-4ae9f1e2fa65",
"SenderAccount": {
"unv": "KERİM KELEN",
"hspNo": "TR660012502002018701700351",
"hspRef": null
}
}
```
7. **Yetkilendirme Kodu Alma ve Yönlendirme**
- **Redirect URL:** `http://test-xxxxxx-token.xxxxx.com.tr/public/OpenBankingAuthCode?consentId={consentId}`
#### BKM Dokümanı İlgili Linkler
- [Ödeme Emri Rızası](https://ohvps.github.io/v1.1.0/contents/odeme-emri-baslatma-hizmeti.html#_6-2-adim-1-odeme-emri-r%C4%B1zas%C4%B1n%C4%B1n-haz%C4%B1rlanmas%C4%B1)
- [Ödeme Emri](https://ohvps.github.io/v1.1.0/contents/odeme-emri-baslatma-hizmeti.html#_6-5-adim-3-odeme-emrinin-olusturulmas%C4%B1)
- [Hata Durum Kodları](https://ohvps.github.io/v1.1.0/contents/temel-prensipler.html#_3-18-http-durum-kodlar%C4%B1)
- [İstek Başlığı](https://ohvps.github.io/v1.1.0/contents/temel-prensipler.html#_3-15-istek-basl%C4%B1g%C4%B1)
- [Yanıt Başlığı](https://ohvps.github.io/v1.1.0/contents/temel-prensipler.html#_3-16-yan%C4%B1t-basl%C4%B1g%C4%B1)
- [Sıralı Veri Türleri](https://ohvps.github.io/v1.1.0/contents/ekler.html#ek-2-s%C4%B1ral%C4%B1-veri-turleri)