RegAlert

Rule · 14 Feb 2022

Payment Services Data Sharing Services (PSDSS) API Principles and Rules

Applies to: Commercial bank, Payment service provider
open-banking
payments

ASPSPs must offer payment services data sharing to AISPs and PISPs through the BKM API Gateway, using TLS 1.2 minimum, and verify that TPPs are CBRT-authorized. HHSs must respond within 3000 ms, stay up 99.75% annually, provide a healthcheck service shared with BKM, and mask IBANs except the first and last four characters. Consent cancellation requires customer approval, and processing must not continue unless consent status is "K: Authorization Used".

Source
Jump to forms (75) ↓
Key facts592 MUST70 MAY
Forms:

PAYMENT SERVICES DATA SHARING SERVICES (PSDSS) API PRINCIPLES AND RULES

API Principles and Rules|February 2022 1

Table of Contents

1. Definitions and Abbreviations ......6
2. Scope and Basis......9
3. Basic Principles......11

3.1. General...... 11

3.2. Request (Call) and Session...... 12

3.3. RESTful API ...... 12

3.4. Version Management...... 12

3.5. Resource URI Path Structure...... 13

3.6. Character Encoding ...... 14

3.7. Data Format...... 14

3.8. Client Certificate Management...... 15

3.9. Authorization Types ...... 15

3.10. Object Structures Used in Request/Response Messages ...... 16

3.11. Pagination and Filtering ...... 16

Pagination...... 16

Filtering ...... 16

3.12. Message Signing...... 16

Key Store ...... 16

3.13. Status Code ...... 17

3.14. Classification of Requirements...... 17

3.15. Request Header ...... 18

3.16. Response Header...... 20

3.17. Idempotency Rules ...... 24

3.18. HTTP Status Codes...... 24

3.19. Masking Rules ...... 36

3.20. Non-Functional Requirements...... 36

4. Consent States......37

4.1. Account Information Service Consent State Changes ...... 38

4.2. Payment Information Service Consent State Changes...... 40

5. Strong Customer Authentication ......42

5.1. Redirected Strong Customer Authentication ...... 43

API Principles and Rules|February 2022 2

Browser-Based Redirection ...... 43
Application-Based Redirection ...... 44

5.2. Decoupled Strong Customer Authentication...... 44

5.3. Redirect/Notification Addresses and Status Code Parameter ...... 44

5.4 Healthcheck API...... 45

5.5 Strong Customer Authentication Controls...... 45

6. Payment Order Initiation Service ......48

Access Addresses (Endpoints) for Payment Order Initiation Service ...... 49

6.1. STEP 0 - Payment Order Initiation Request ...... 49
6.2. STEP 1 - Preparation of Payment Order Consent ...... 50

POST /odeme-emri-rizasi ...... 51

SUCCESSFUL REQUEST:...... 52
SUCCESSFUL RESPONSE:...... 63
6.3. STEP 2- Authorization of Payment Order Consent ...... 72
6.4. STEP 2.1 – Query of Payment Order Consent (optional) ...... 73

GET /odeme-emri-rizasi/{RizaNo} ...... 74

6.5. STEP 3- Creation of Payment Order ...... 75

POST /odeme-emri...... 75

SUCCESSFUL REQUEST:...... 76
SUCCESSFUL RESPONSE:...... 92

6.6. STEP 3.1- Payment Order Query (Optional) ...... 102

GET /odeme-emri/{odemeEmriNo} ......102

6.7 Healthcheck API...... 103

7. Account Information Service......103

Access Addresses (endpoints) for Account Information Service ......105

STEP 0- Customer's request to access account information: ...... 107

7.1. STEP 1: Preparation of Account Information Customer Consent ...... 107

POST /hesap-bilgisi-rizasi ......108

SUCCESSFUL REQUEST:......108

SUCCESSFUL RESPONSE:......114

Permissions ......119

7.2. STEP-2: Establishment of Account Information Service Customer Consent...... 120

7.3. STEP-2.1: Query of Account Information Consent (optional)...... 121

GET /hesap-bilgisi-rizasi/{RizaNo}......121

API Principles and Rules|February 2022 3

7.4. STEP-2.2: Revocation of Account Information Consent ...... 121

DELETE /hesap-bilgisi-rizasi/{RizaNo}......121

7.5. STEP-3: Retrieval of Account Information...... 123

7.6. STEP 3.1 and 3.2: Query of Account Information ...... 124

GET /hesaplar and GET /hesaplar/{hspRef}......124

7.7. STEP-3.3 and 3.4: Query of Account Balance ...... 128

GET /bakiye and GET /hesaplar/{hspRef}/bakiye......128

7.8. STEP 3.5 and 3.6: Query of Transactions Performed from Account ...... 132

GET /hesaplar/{hspRef}/islemler......132

7.9 Healthcheck API...... 139

8. ANNEX-1: Object Structures to be Used in Request/Response Messages......139
9. ANNEX-2: Sequential Data Types......139
10. ANNEX-3: POST /erisim-belirteci ......146
11. ANNEX-4: Definition and Management of Client Certificates......148
12. ANNEX-5: Server Certificates ......149
13. ANNEX-6: Message Signing Flow ......150
14. ANNEX-7: HHS/YOS API......153

GET /hhs/{hhsKod}......153

GET /yos/{yosKod}......157

GET /health ......157

15. ANNEX-8: HHS/YOS API Architecture ......160

API Principles and Rules|February 2022 4

Tables

Table 1: Definitions and Abbreviations ......6

Table 2: Data in Request Header......18

Table 3: Data in Response Header ......20

Table 4: HTTP Status Codes......27

Table 5: Redirected Strong Customer Authentication Channels ......44

Table 6: Access Addresses for Payment Order Initiation Service......49

Table 7: "OdemeEmriRizasiIstegi" object ......52

Table 8: "OdemeEmriRizasi" object......63

Table 9: "OdemeEmriIstegi" object ......76

Table 10: "OdemeEmri" object......92

Table 11: Access Addresses for Account Information Service ......105

Table 12: "HesapBilgisiRizasiIstegi" object ......109

Table 13: "HesapBilgisiRizasi" object......114

Table 14: Account Information Query Request Query Parameters ......124

Table 15: "HesapBilgileri" object......126

Table 16: "BakiyeBilgileri" Query Request Query Parameters ......129

Table 17: "BakiyeBilgileri" object ......130

Table 18: Transaction List Query Request Query Parameters ......133

Table 19: "IslemBilgileri" object ......136

Table 20: "ErisimBelirteciIstegi" object ......146

Table 21: "ErisimBelirteci" object ......147

Table 22: HHS and YOS API Query Request Query Parameters ......154

Table 23: HHS Information Query Response "Hhs" object ......155

Table 24: YOS Information Query Response "Yos" object ......158

API Principles and Rules|February 2022 5

Figures

Figure 1: Payment Services Data Sharing Services (PSDSS)- introduction ......9

Figure 2: Payment Services Data Sharing Services (PSDSS) - high-level representation ......10

Figure 3: Presentation of PSDSS via BKM API Gateway ......11

Figure 4: Payment Order Initiation Service High-Level Workflow......48

Figure 5: Preparation of Payment Order Consent......50

Figure 6: Authorization of Payment Order Consent......72

Figure 7: Query of "odemeEmriRizasi" object (optional) ......74

Figure 8: Creation of Payment Order......75

Figure 9: Payment Order Query ......102

Figure 10: Account Information Service High-Level Flow......103

Figure 11: Preparation of Account Information Customer Consent......107

Figure 12: Establishment of Account Information Customer Consent ......120

Figure 13: Revocation of Account Information Customer Consent......122

Figure 14: Retrieval of Account Information......123

Figure 15: HHS/YOS API Architecture ......160

API Principles and Rules|February 2022 6

1. Definitions and Abbreviations

Table 1: Definitions and Abbreviations

AbbreviationDefinitionDescriptionEnglish DescriptionEnglish Abbreviation
ÇSFramework AgreementAgreement between the payment service provider and the customer that determines the procedures and principles regarding the execution of single or continuous payment transactions and, where possible, the opening of a payment account  
EPKElectronic Money InstitutionLegal entity authorized to issue electronic money within the scope of the LawElectronic Money InstitutionEMI
FASTInstant and Continuous Transfer of FundsInstant and Continuous Transfer of Funds System operated by the CBRT  
FAST TRKarekodFAST-TR QR Code Technical Principles and Rules GuideDocument containing detailed technical principles and rules regarding the use of TR QR Code in transactions to be realized through the FAST System  
GKDStrong Customer AuthenticationMethod used in authentication, consisting of at least two components, where the compromise of one component does not compromise the security of the other, and these two components are selected from different categories of components that the customer knows, possesses, or has as a biometric characteristicStrong Customer AuthenticationSCA
İBTransaction InformationInformation including the transaction time, the nature of the transaction, and for a payment transaction, the total amount to be debited from the account including costs, commissions and fees, and the sender and recipient of the payment, or for a bulk payment order, the total amount to be debited from the account including costs, commissions and fees, and the sender and recipients  
İDKTransaction Verification CodeInformation created to be specific to the transaction that a customer, who identifies themselves to the system through one of the authentication methods, wants to perform, and to be used in transaction approval within a certain validity period, shown together with the relevant transaction information (İB) at the moment of approval in transactions that produce financial results, and which becomes invalid if the recipient or amount changesAuthentication CodeAC
KOLASEasy Addressing ServiceLayer service that enables the registration, updating, and querying of Easy Address information such as phone number, e-mail address, Turkish Republic Identity Number (TCKN), Tax Identification Number (VKN), Foreign Identity Number or Passport Number, which are used instead of account number and full name in fund transfers and matched with a specific account  
HBHSAccount Information Service ProviderLegal entity providing the payment service (account information service) defined in Article 12, paragraph 1, subparagraph (g) of the LawAccount Information Service ProviderAISP
HHSAccount Servicing ProviderPayment service provider that holds a payment accountAccount Servicing Payment Service ProviderASPSP
ÖBHSPayment Order Initiation Service ProviderLegal entity providing the payment service (payment order initiation service) defined in Article 12, paragraph 1, subparagraph (f) of the LawPayment Initiation Service ProviderPISP
ÖDKPayment InstitutionLegal entity authorized under the Law to provide and execute payment servicesPayment InstitutionPI
ÖHPayment AccountAccount opened on behalf of the payment service user and used in the execution of the payment transactionPayment AccountPA
ÖHKPayment Service User (Customer)Real or legal person benefiting from a specific payment service as sender, recipient, or bothPayment Service UserPSU
ÖHSPayment Service ProviderBanks under Law No. 5411, EPK, ÖDK and PTTPayment Service ProviderPSP
ÖHVPSPayment Services Data Sharing ServicesData sharing services used in payment services specified in Article 12, paragraph 1, subparagraphs (f) or (g) of the Law  
PÖSRetail Payment SystemInterbank Turkish Lira Transfer System operated by the CBRT, where transactions are realized in Turkish Lira  
TRKarekodTR-QR Code Principles and RulesDocument determining the national QR code (TR QR Code) principles and rules  
YÖSAuthorized Payment Service ProviderLegal entity providing payment order initiation service and/or account information serviceThird Party Payment Service ProvidersTPP

API Principles and Rules|February 2022 9

2. Scope and Basis

With the amendment made on 12 November 2019 to Article 12 of the "Law No. 6493 on Payment and Securities Settlement Systems, Payment Services and Electronic Money Institutions" (the Law), two new payment services found in the Payment Services Directive 2 (PSD2) have been defined as follows (Figure-1: Payment Services Data Sharing Services):

-Payment Order Initiation Service: Payment order initiation service provided at the request of the PSU regarding a payment account held with another payment service provider [Article 12, paragraph 1, subparagraph (f)]
-Account Information Service: Service of presenting consolidated information regarding one or more payment accounts held with payment service providers of the PSU on online platforms, provided that the PSU's approval is obtained [Article 12, paragraph 1, subparagraph (g)]
Figure 1: Payment Services Data Sharing Services (PSDSS)- introduction

According to Article 14/A, paragraph 2 of the Law, the procedures and principles regarding the execution of transactions related to payment services specified in Article 12, paragraph 1, subparagraphs (f) or (g) of the Law, and the technical and operational requirements to be complied with by the parties, are determined by the Central Bank of the Republic of Turkey (CBRT) in accordance with secondary legislation. The data sharing services used in payment services specified in Article 12, paragraph 1, subparagraphs (f) or (g) of the Law are called payment services data sharing services (PSDSS).

In this document prepared in accordance with Article 59, paragraph 1 of the "Regulation on Payment Services and Electronic Money Issuance and Payment Service Providers" (the Regulation), the technical and operational requirements of the payment service provider that will provide these payment services, the payment service provider with which the payment account is held, other relevant parties, if any, and the connection to be established between the parties for the provision of these services are explained.

Within the scope of the regulations, the authorized third-party service provider (Authorized Payment Service Provider, TPP) mediates the access of payment service users to their payment accounts held with Account Servicing Providers (ASPSP) and their benefit from payment order initiation and account information services (payment services data sharing services). Payment services data sharing

API Principles and Rules | February 2022 10

Within the scope of the services, there are two types of TPPs: 1) Account Information Service Provider (AISP) and 2) Payment Initiation Service Provider (PISP).

The Account Information Service Provider (AISP) compiles the information of the accounts of the PSP at different Account Servicing Payment Service Providers (ASPSPs) and presents it collectively on online platforms. The Payment Initiation Service Provider (PISP), on the other hand, initiates a payment transaction from the payment account of the PSP held at the ASPSP upon request.

The high-level representation of the PSDSS is given in Figure-2.

Figure 2: Payment Services Data Sharing Services (PSDSS) - high-level representation

The application architecture in which Payment Services Data Sharing Services are offered by ASPSPs through the BKM API Gateway is presented in Figure-3.

API Principles and Rules | February 2022 11

Figure 3: Presentation of PSDSS through the BKM API Gateway

3. Basic Principles

This section explains the basic principles defined for Payment Services Data Sharing Services (Account Information Service, Payment Initiation Service).

3.1. General
-ASPSPs are obliged to offer payment services data sharing services to AISPs and PISPs through the BKM API Gateway, in accordance with the fifth paragraph of Article 59 of the Regulation and the first paragraph of Article 23 of the Communiqué on Information Systems of Payment and Electronic Money Institutions and Data Sharing Services of Payment Service Providers in the Field of Payment Services (Communiqué).
-In accordance with the second paragraph of Article 23 of the Communiqué, the parties of the open communication service in the payment initiation service are the PISP and the ASPSP.
-In accordance with the third paragraph of Article 23 of the Communiqué, the parties of the open communication service in the account information service are the AISP and the ASPSP.
-In accordance with the first paragraph of Article 60 of the Regulation, the customer may choose to use the payment initiation service when the payment account is accessible online.
-In accordance with the first paragraph of Article 61 of the Regulation, the customer may choose to use the account information service when the payment account is accessible online.
-In accordance with Article 25 of the Communiqué, the connection between the ASPSP and the TPP (PISP and AISP) is provided end-to-end securely. For this purpose, encrypted communication is provided at the transmission layer with TLS (minimum version 1.2).

API Principles and Rules | February 2022 12

-In accordance with the fourth paragraph of Article 23 of the Communiqué, it is checked that the authorized payment service providers using the payment services data sharing services offered by the ASPSP are authorized by the CBRT for the relevant payment service.
-In accordance with the fifth paragraph of Article 25 of the Communiqué, the timestamp is based on the timestamp defined within the scope of the Electronic Signature Law No. 5070 dated 15/1/2004.
-API field names are defined in Turkish. However, specifically for the field names in the API header field, English naming has been preferred, considering that they can be automatically recognized by API Gateways.
3.2. Request (Call) and Session
-Each request contains a unique request number and a timestamp for transactions involving the PSP. A transaction containing multiple requests is maintained by the ASPSP with a session approach using the call-specific request identity (request number: x-request-id) and the transaction flow-specific request identity (transaction group number: x-group-id) values determined by the TPP (See 3.15 Request Header).
-Session tracking is done with the transaction group number. The transaction group number is also recorded together with the timestamp for transactions involving the PSP, including all relevant transaction data.
-For example, a payment initiation transaction consists of multiple requests. Each request contains a unique request number and a timestamp for transactions involving the PSP, as stated above. However, the session integrity of the transaction is ensured by the transaction group number.
-The parties keep the session they open open for the duration that ensures transaction integrity and close it as soon as the transaction ends.

3.3. RESTful API

APIs are developed in accordance with the globally widely used Representational State Transfer (REST) architectural style and JavaScript Object Notation (JSON) data formats. JSON Schema 1 is taken as the basis for the highest level Data Description Language and best practice examples.

3.4. Version Management

APIs are developed in versions to meet potential future requirements and more complex use cases, and this is considered during design.

In API v1.0 version
-Demand deposit TL, foreign currency accounts (payment accounts belonging to real and legal persons), Overdraft Account
-Single payment (Transfer/Remittance/FAST/Inter-customer TL Transfer System)
- Account information services

o Basic or detailed account information

o Balance

1 http://json-schema.org/ o Account movements for realized transactions

API Principles and Rules | February 2022 13

-Flow types 01, 02 and 03 in QR code payments are included.

With each version change, the previous version will be supported for a certain period. In other words, only the current and the previous version will be accessible simultaneously for a certain period.

3.5. Resource URI Path Structure

In calls initiated by TPPs, the URI path follows the structure below:

[aspsp-path-prefix]/ohvps/ [resource-group]/ [version]/ [resource]/[resource-no]/[sub-resource]

This consists of the following elements:

-[aspsp-path-prefix]

Refers to the optional ASPSP-specific path prefix.

In calls made through the BKM API gateway, the system name and path prefix determined by BKM are used.

-ohvps

Fixed text "ohvps" (abbreviation for Payment Services Data Sharing Services)

-[resource-group]

The resource group defines the endpoint group according to the payment service used to access the API (AIS, PIS) ("hbh" or "obh").

-[version]

Refers to the API version ("/s[major-version].[minor-version]/").

-[resource]/[resource-no]

Refers to resource details.

-[sub-resource]

Refers to sub-resource details.

ASPSP must use the same participant path prefix and system name for all its resources.

Applications that want to access BKM APIs must subscribe to the following APIs according to their authorizations:

PIS:

https://apigw-prod.bkm.com.tr/api/main/ohvps/obh/s1.0/odeme-emri-rizasi https://apigw-prod.bkm.com.tr/api/main/ohvps/obh/s1.0/odeme-emri

AIS:

https://apigw-prod.bkm.com.tr/api/main/ohvps/hbh/s1.0/hesap-bilgisi-rizasi https://apigw-prod.bkm.com.tr/api/main/ohvps/hbh/s1.0/hesaplar https://apigw-prod.bkm.com.tr/api/main/ohvps/hbh/s1.0/hesaplar/1234/islemler https://apigw-prod.bkm.com.tr/api/main/ohvps/hbh/s1.0/hesaplar/1234/bakiye

API Principles and Rules | February 2022 14

GKD

https://apigw-prod.bkm.com.tr/api/main/ohvps/gkd/s1.0/erisim-belirteci

ASPSP – TPP API

https://apigw-prod.bkm.com.tr/api/main/hhs-api/s1.0/hhs https://apigw-prod.bkm.com.tr/api/main/hhs-api/s1.0/hhs/1234 https://apigw-prod.bkm.com.tr/api/main/yos-api/s1.0/yos https://apigw-prod.bkm.com.tr/api/main/yos-api/s1.0/yos/1234

Examples of URI conversion in the APIs to be provided by ASPSPs are as follows.

-https://xbank.com.tr/api-portal/ohvps/obh/s1.0/odeme-emri
-https://apigw-prod.bkm.com.tr/api/main/ohvps/obh/s1.0/odeme-emri (BKM API)
-https://xbank.com.tr/api-portal/ohvps/hbh/s1.0/hesap-bilgisi-rizasi
-https://apigw-prod.bkm.com.tr/api/main/ohvps/hbh/s1.0/hesap-bilgisi-rizasi (BKM API)
-https://xbank.com.tr/api-portal/ohvps/hbh/s1.1/hesaplar
-https://apigw-prod.bkm.com.tr/api/main/ohvps/hbh/s1.1/hesaplar (BKM API)
-https://xbank.com.tr/api-portal/ohvps/hbh/s1.1/hesaplar/1234
-https://apigw-prod.bkm.com.tr/api/main/ohvps/hbh/s1.1/hesaplar/1234 (BKM API)

In calls made through the BKM API Gateway, routing to the ASPSP is done by adding the service extension to the "basePath" information defined as standard in the ASPSP API, according to the "x-aspsp-code" value in the request header (the code of the Account Servicing Payment Service Provider to which the request is forwarded).

For example, if the request header contains the code of xbank, the call made by the TPP https://apigw-prod.bkm.com.tr/api/main/ohvps/hbh/s1.0/hesap-bilgisi-rizasi is met by the BKM API Gateway and redirected to https://xbank.com.tr/api-portal/ohvps/hbh/s1.0/hesap-bilgisi-rizasi

In this example, the basePath information https://xbank.com.tr/api-portal is the value entered by the ASPSP into the ASPSP API.

3.6. Character Encoding

UTF-8 character encoding is used in API requests and responses. This is the default character encoding for JSON.

However, an ASPSP's own applications and the payment system it initiates payment to (FAST, etc.) may not accept some UTF-8 characters. If the ASPSP cannot process a message containing UTF-8 encoding and rejects it, it must respond with HTTP 400 (Bad Request) status code.

3.7. Data Format
-The timestamp within the scope of open banking must be prepared in accordance with the ISO 8601 standard, including local time and timezone information, in the format "yyyy-MM-dd'T'HH:mm:ssXXX".

Example: "timestamp": "2021-05-30T20:34:15+03:00"

API Principles and Rules | February 2022 15 yyyy : 4-digit year

MM : 2-digit month with leading '0' dd : 2-digit day with leading '0'

HH : 2-digit hour with leading '0' (can take values between 0-23) mm : 2-digit minute with leading '0' ss : 2-digit second with leading '0'

XXX : ISO 8601 Time zone

-Timestamps used in JWT data packets use the value of the number of seconds elapsed since January 1, 1970 00:00:00 (UTC) (Unix Time).
-When an ASPSP receives a request with an incorrectly formatted date, it responds with 400 (Bad Request) status code and the relevant error code.
-All amount fields are transmitted as integers, and currencies are transmitted with the 3-letter code in ISO4217. The amount field should be read by formatting according to the length after the integer defined in ISO4217 for the currency of the amount. For example, for 1.20 TRY, the value "120" is transmitted in the amount field, and since the currency is TRY, it will be concluded that the last two digits are kuruş. For 12000 Japanese Yen, since the JPY currency has no decimal part in ISO4217, the value 12000 is transmitted in the amount field.
-Sequential data types are case-sensitive.
-The gold currency must be transmitted in accordance with ISO4217 in "XAU" type and with 2 digits after the comma. For example, for an account containing "13.5 gr" of gold, the balance should be sent as 1350.
3.8. Client Certificate Management

Within the scope of PSDSS, electronic certificates are used to securely identify TPPs and ASPSPs.

Within the scope of PSDSS, the secure identification of the parties, end-to-end secure communication, message encryption and message signing functions are provided using electronic certificates described in the Electronic Signature Law No. 5070 dated 15/1/2004. The electronic certificate contains information about the institution code given by the Central Bank of the Republic of Turkey and the type of the institution.

In accesses made through the BKM API Gateway, the identities of the parties (server) will be verified using the client certificates previously distributed to TPPs and ASPSPs. Client certificates will be used in both test and production environments. The functionality and validity of the certificates will also be tested during the certification process. The distribution procedures of these certificates and explanations for their use are given in ANNEX-4.

3.9. Authorization Types
Two main authorization types are used in calls made through the BKM API Gateway:
1.Client Credentials: Used in API calls where customer approval is not required and only the TPP is identified and verified. It is checked that the TPP is authorized and that its operating permission is suitable for the service call it makes. For this purpose, clientId and clientSecret will be allocated to TPPs. TPPs will be able to access only the services they are authorized for with the relevant clientId and clientSecret. TPPs will obtain the "Client Credentials" access token by querying the API provided to them by BKM with their own clientID and clientSecret values.

When ASPSPs also come to the BKM API Gateway to query the TPP API on the BKM API gateway, authorization checks are made with the clientID and clientSecret information assigned to them. ASPSPs will offer their services with the basic authentication method to be created using the username and password values to be taken from them.

2.Authorization Code: Used in API calls where, in addition to the verification of the TPP, the customer must be verified with the GKD. The customer is verified and the creation of the authorization code is directed to the ASPSP's authorization interface. After the successful completion of the GKD, the authorization code is returned to the TPP. The TPP can then use the relevant resources by exchanging the authorization code for an access token by calling the ASPSP's access token access address (ANNEX-3:

API Principles and Rules | February 2022 16

POST /erisim-belirteci).

Information on which authorization types will be used in payment initiation and account information services is included in the endpoint tables in the relevant headings.

The access token obtained from the erisim-belirteci endpoint is transmitted in the x-access-token field in the header of the POST request sent for the object or transaction it is associated with.

The access token value defined for a certain period must be renewed with a refresh token.

The authorization type used in the access addresses is specified in the relevant access address tables.

3.10. Object Structures Used in Request/Response Messages

The objects to be used in Request and Response messages are listed in Annex-1, covering all their elements. For all listed elements (as specified in the tables where endpoint message structures are specified), some fields may or may not be sent depending on whether the field is Mandatory (M) or Optional (O).

3.11. Pagination and Filtering
Pagination

A request is created so that the records in the resource object returned to the call are called with a pagination structure.

In the request to be created, information on filtering with parameters, the number of records to be displayed per page, and which page to display on the front end is transmitted to the endpoint, and the relevant records are received as a response.

Filtering

ASPSP must provide limited filtering support in GET calls where multiple records need to be returned. Filter parameters are always specific to certain fields of the resource object and must comply with the rules defined for the object.

3.12. Message Signing

Electronic signatures support the integrity and non-repudiation of the transactions performed in the PSDSS API and the data carried. It is determined on a resource basis to which requests and responses the signatures are applied.

If the API relies only on TLS, it would be difficult to keep digital records and non-repudiation evidence. Therefore, as a non-repudiation solution that does not rely on TLS, it can be provided by using a JWS in the HTTP header of the API request.

The body of the HTTP request will be hashed with a hash function (SHA256). The resulting hash will be signed using an algorithm that supports asymmetric keys, and the JWS will be obtained.

A request will be signed with the TPP's private key, and the response corresponding to this request will be signed by the ASPSP's private key.

Not all API requests and responses are signed. Whether message signing is mandatory or supported is determined for each API.

Key Store

A Trust Anchor trusted by ASPSPs and TPPs is responsible for providing a public key store for the parties.

API Principles and Rules | February 2022 17

The Trust Anchor will be a central directory (such as the central registry system maintained by BKM) that stores the public part of a key pair created by any of the parties.

BKM will provide a service for sharing the public keys of the parties to verify messages. With this service, called ASPSP API, ASPSP and TPP lists can be accessed, and the public keys needed for verification can also be accessed through this service.

The general flow for the relevant Message encryption is shared in detail in Annex-5.

3.13. Status Code

APIs use two status codes serving two different purposes:

-HTTP Status Code reflects the result of the API call (HTTP operation on the resource).
-The Status field in some resource payloads reflects the status of the resources.
3.14. Classification of Requirements

The use of endpoints and fields can be Mandatory (M), Optional (O) or Conditional (C). The conditions regarding usage and explanations regarding the situation where usage is conditional (C) are specified in the relevant tables.

The header names to be used in the request and response will be used as specified in the relevant RFC documents and in the table below. Application-specific headers will start with "X-". Abbreviations to be included in header names (e.g., PSU, ASPSP) will be defined in all uppercase. Header names should not be case-sensitive. For example, a request header variable sent as x-request-id or X-Request-ID should be processed on the server side without causing an error.

API Principles and Rules | February 2022 18

3.15. Request Header
Table 2: Data in the Request Header

Header Names Format Notes POST GET DELETE

X-Request-ID

AN1..36

Call-specific request identity determined by the TPP initiating the request. Request number.

Example: A different "x-request-id" value is used at each step of the payment initiation workflow.

In cases where calls are expected to return the same response (idempotent transactions), the same value is used for the call.

M

X-Group-ID

AN1..36

Transaction flow-specific request identity determined by the TPP initiating the request. Transaction group number.

The same x-group-id value must be sent in all requests belonging to the same consent number.

Example: The same "x-group-id" value is used at each step of the payment initiation/account information workflow.

M

Content-Type

AN1..20

Standard HTTP Header; Represents the format of the payload provided in the request:

application/json (If set to another value, the ASPSP must respond with 415 Unsupported Media Type)

O - -

X-ASPSP-Code

AN4

The code of the Account Servicing Payment Service Provider to which the request is forwarded. (The code of the institution holding the PSP. For example, Bank, Electronic Money Institution and Payment Institution) M

API Principles and Rules | February 2022 19

Header Names Format Notes POST GET DELETE

X-TPP-Code

AN4 The code of the Authorized Payment Service Provider (TPP) sending the request M

PSU-Auth-Date ISODateTime The time when the PSP last logged in to the TPP. [RFC7231]

Example: auth-date: Tue, 11 Sep 2012 19:43:31 GMT O

PSU-IP-Adress AN7..15 If the PSP is logged in to the TPP, the IP address of the device that initiated the transaction. O

PSU-IP-Port AN1..5 If the PSP is logged in to the TPP, the Port address of the device that initiated the transaction. O

PSU-GEOLocation AN1..36

The location information of the device from which the PSP initiated the transaction.

It must be shared in accordance with the RFC2426 standard. For example GEO:"<latitude>,< longitude >

GEO:52.506931,13.144558

O

PSU-User-Agent AN 1.. 255

The user-agent information provided by the device from which the PSP initiated the transaction. (Browser, version, operating system information) O

PSU-Timestamp ISODateTime The date-time information of the device from which the PSP initiated the transaction. O

PSU-Device-ID AN5..40

If the PSP initiated the transaction via a mobile application, the unique device or application identifier created when the mobile application used was first installed. The UUID value of the PSP device can be used. O

PSU-Device-Data AN1..1024

Data belonging to the mobile device from which the PSP initiated the transaction.

Example fields:

O

API Principles and Rules | February 2022 20

Header Names Format Notes POST GET DELETE

Platform - (Android, iOS, Windows 10 Mobile)

Device Model

OS Name

OS Version

Locale

Time zone

PSU-Initiated AN1

Used to check transaction limits in system queries to be made in the transactions service.

It is expected to take the value E if the transaction is initiated by the PSP, and H if initiated by the system.

M

Authorization AN1..4096 Token information used for authorization between the TPP and BKM API Gateway. M

X-Access-Token AN1..4096 Access token used after the PSP is verified during the GKD process O

X-JWS-Signature

AN1..4096

Header containing a detached JWS signature of the payload body.

When this header should be specified is stated for the relevant endpoint.

C

2 C C

3.16. Response Header
Table 3: Data in the Response Header

2 Used depending on the API and method used.

API Principles and Rules | February 2022 21

Header Names Format Notes Usage Status

X-Request-ID

AN1..36

Call-specific request identity determined by the TPP initiating the request. Request number

The information in the relevant request header is returned.

M

X-Group-ID

AN1..36

Transaction flow-specific request identity determined by the TPP initiating the request. Transaction group number.

This value in the relevant request header is returned.

M

X-ASPSP-Code

AN4

The code of the Account Servicing Payment Service Provider to which the request is forwarded. (The code of the institution holding the PSP. For example, Bank, Electronic Money Institution and Payment Institution) M

X-TPP-Code

AN4 The code of the Authorized Payment Service Provider (TPP) sending the request M

API Principles and Rules | February 2022 22

Header Names Format Notes Usage Status

Content-Type AN1..20

Standard HTTP Header; Represents the format of the payload provided in the request:

application/json O

X-JWSSignature AN1..4096

Header containing the JWS signature.

For which responses this header should be used is stated for the relevant endpoint.

C

Retry-After AN 1..255

Indicates the time (in seconds) that the TPP should wait before retrying a request.

The ASPSP must return this information in the header of responses returned with HTTP status code 429 (Too Many Requests).

C x-total-count

N 1..18 In case pagination is used, the total number of records to be returned as a result of the query is included. C

Link 1..4096

If there is more than one page in the response when the pagination structure is used; the references necessary to go to the previous, next, first, last pages must be filled in the link header as in the example below.

There should be no "Previous" option on the first page, and no "Next" option on the last page.

It is mandatory to send if there is a multi-page structure.

C

API Principles and Rules | February 2022 23

Header Names Format Notes Usage Status

</ohvps/hbh/s1.0/hesaplar/hspref/islemler?hesapIslemBslTrh=2019-01-

01T00:00:00+03:00&hesapIslemBtsTrh=2023-12-

12T23:59:59+03:00&srlmKrtr=islGrckZaman&srlmYon=Y&syfNo=6&syfKytSayi=100>; rel="next",

</ohvps/hbh/s1.0/hesaplar/hspref/islemler?hesapIslemBslTrh=2019-01-

01T00:00:00+03:00&hesapIslemBtsTrh=2023-12-

12T23:59:59+03:00&srlmKrtr=islGrckZaman&srlmYon=Y&syfNo=4&syfKytSayi=100>; rel="prev",

</ohvps/hbh/s1.0/hesaplar/hspref/islemler?hesapIslemBslTrh=2019-01-

01T00:00:00+03:00&hesapIslemBtsTrh=2023-12-

12T23:59:59+03:00&srlmKrtr=islGrckZaman&srlmYon=Y&syfNo=14&syfKytSayi=100>; rel="last",

</ohvps/hbh/s1.0/hesaplar/hspref/islemler?hesapIslemBslTrh=2019-01-

01T00:00:00+03:00&hesapIslemBtsTrh=2023-12-

12T23:59:59+03:00&srlmKrtr=islGrckZaman&srlmYon=Y&syfNo=0&syfKytSayi=100>; rel="first"

API Principles and Rules | February 2022 24

3.17. Idempotency Rules

In the following cases where calls are expected to return the same response (idempotent transactions), the call is made with the same request number (x-request-id) value:

-If the HHS response does not reach the YÖS due to an interruption/failure and a timeout occurs, or if the ÖHK calls the HHS APIs repeatedly by double-clicking through the YÖS application (it is recommended that the YÖS perform a double-click check before API checks), the YÖS must repeat the request with the same request number. In this case, the HHS returns the response it previously produced using the same resources.
-If the YÖS receives a response but loses it without being able to process it; in this case too, the HHS returns the response it previously produced using the same resources.
-The HHS generates a checksum value from the incoming data body using the CRC32 algorithm.
-While recording the request number value, the HHS must also record the generated checksum value.
-When the YÖS makes a new call with the same request number and the same content, the HHS returns the result of the first service call.
-In payment order POSTs for 5 minutes, and in the account information consent creation POST transaction for 5 minutes, the HHS is expected to return the same value when the same request number and the same content are received.
-When the YÖS makes a new call with the same request number and a different checksum value to be generated by the HHS from the request body; this means there has been a change in the YÖS's payload data and an HTTP 422 response is expected to be returned.
-This rule set must be applied for the following Public POST transactions:

1- Payment order consent creation

2- Access token creation

3- Payment order

4- Account information consent creation

3.18. HTTP Status Codes

The status codes defined in RFC 2616 express the status of the sent request to the YÖS in a standard way. If there is an error, it conveys the error; if the sent request has been processed successfully, it conveys the status related to it. Status codes are generally in 5 categories.

-1xx Information
-2xx Successful
-3xx Redirection
-4xx Client Error
-5xx Server Error

API Principles and Rules | February 2022 25

Enumerated Error Types:

TR.OBHS.Resource

➔ InvalidFormat

➔ ConsentMismatch

➔ NotFound

➔ InvalidSignature

➔ MissingSignature

➔ MethodNotAllowed

➔ NotAcceptable

➔ UnsupportedMediaType

➔ ConsentRevoked

TR.OBHS.Business

➔ InvalidContent

➔ InvalidAccount

TR.OBHS.Field

➔ Missing

➔ Invalid

TR.OBHS.Connection

➔ InvalidCertificate

➔ ExceededRate

➔ InvalidTPP

➔ InvalidASPSP

➔ InvalidToken

➔ InvalidTPPRole

TR.OBHS.Server

➔ InternalError

➔ ServiceUnavailable

Data Type Example:

```json

{

"id": "2b5f0fb2-730b-11e8-adc0-fa7ae01bbebc",

"path": "/ohvps/s1.1/obh/odeme-emri-rizasi",

"timestamp": "2020-06-13T18:24:38",

"httpCode": 400,

"httpMessage": "Bad Request",

"moreInformation": "Resource Schema validation error",

"moreInformationTr": "Şema kontrolleri başarısız",

API Principles and Rules | February 2022 26

"errorCode": "TR.OBHS.Resource.InvalidFormat",

"fieldErrors": [

{

"objectName": "odemeEmriRizasi",

"field": "kmlkNo",

"messageTr": "boyut '6' ile '30' arasında olmalı",

"message": "size must be between '6' and '30'",

"code": "TR.OBHS.Field.Invalid"

},

{

"objectName": "odemeEmriRizasi",

"field": "prBrm",

"messageTr": "boş değer olamaz",

"message": "must not be null",

"code": "TR.OBHS.Field.Missing"

}]

}

```

Data Type Example:

If one or several of the mandatory header fields are sent missing, an error return as follows may occur.

```json

{

"httpCode": "400",

"httpMessage": "Bad Request",

"moreInformation": "One or more required API parameters are missing in the API request."

}

```

API Principles and Rules | February 2022 27

Table 4: HTTP Status Codes
HTTP StatusRequest Result and Explanations 
P O S TG E TD E L E T E
200 OKRequest Completed Successfully. Used for requests made to update a resource (e.g., PUT) and completed successfully.H
201 CreatedRequest Successful. The resource creation request (e.g., POST /payment-order-consent) concluded successfully.E H H
204 No ContentDeletion operation completed successfully. The resource deletion request (e.g., DELETE /account-consent/{ConsentNo}) concluded successfully.H H E
400 Bad RequestThere is a malformed, missing or non-compliant JSON body, URL parameters or header fields in the request. The transaction initiated by the request results in an error due to structural malformation, missing or inconsistent data, or erroneous results of checks on the HHS side, and data related to the error is returned within the error object: httpCode: 400E

API Principles and Rules | February 2022 28

httpMessage: "Bad Request" moreInformation: "Resource Schema validation error" moreInformationTr: "Şema Kontrolleri Başarısız" errorCode: "TR.OBHS.Resource.InvalidFormat" fieldErrors:

code: {"TR.OBHS.Field.Invalid",

"TR.OBHS.Field.Missing"}

For example; in the case of a GET /payment-order/22289 call, if 22289 is not a valid payment resource, the HHS must respond with code 400.

```json

{

"id": "2b5f0fb2-730b-11e8-adc0-fa7ae01bbebc",

"path": "/ohvps/s1.1/obh/odeme-emri-rizasi",

"timestamp": "2020-06-13T18:24:38",

"httpCode": 400,

"httpMessage": "Bad Request",

"moreInformation": "Resource Schema validation error",

"moreInformationTr": "Şema kontrolleri başarısız",

"errorCode": "TR.OBHS.Resource.InvalidFormat",

"fieldErrors": [

{

"objectName": "odemeEmriRizasi",

"field": "kmlkNo",

"messageTr": "boyut '6' ile '30' arasında olmalı",

"message": "size must be between '6' and '30'",

API Principles and Rules | February 2022 29

"code": "TR.OBHS.Field.Invalid"

},

{

"objectName": "odemeEmriRizasi",

"field": "prBrm",

"messageTr": "boş değer olamaz",

"message": "must not be null",

"code": "TR.OBHS.Field.Missing"

} errorCode: "TR.OBHS.Connection.InvalidTPP" moreInformation: "Invalid TPP Code" moreInformationTr: "Geçersiz Yös Kodu" errorCode: "TR.OBHS.Connection.InvalidASPSP" moreInformation: "Invalid ASPSP Code" moreInformationTr: "Geçersiz HHS Kodu" errorCode: "TR.OBHS.Connection.

]

}

```

InvalidTPPRole"

moreInformation: "Invalid TPP Role" moreInformationTr: "Hatalı Yös Rolü"

API Principles and Rules | February 2022 30

401 Unauthorized

The request was not authorized and access was denied because the authorization header is missing, incorrect or invalid.

httpCode: 401

Possible result codes related to the error:

errorCode: "TR.OBHS.Connection.InvalidCertificate" moreInformation: "Invalid Certificate" moreInformationTr: "Geçersiz Sertifika" errorCode: " TR.OBHS.Connection.InvalidCertificate " moreInformation: "Expired Certificate " moreInformationTr: "SERTIFIKA SURESI DOLMUS" errorCode: " TR.OBHS.Connection.InvalidCertificate " moreInformation: "Revoked Certificate" moreInformationTr: "SERTIFIKA IPTAL EDILMIS"

In addition, when the YÖS uses an expired access token, the HHS must return the following error code with http code 401 (Unauthorized). This situation may occur when an Access Token expires due to any of the following reasons:

-The consent has expired (Expiration Date has passed)
-Suspicious use of the Access Token or suspicion of fraud
-Exceeding the number of days specified in the consent

API Principles and Rules | February 2022 31

This error can be resolved by requesting re-authentication or authentication from the customer with the correct permissions.

errorCode: " TR.OBHS.Connection.InvalidToken " moreInformation: "Invalid Token" moreInformationTr: "Geçersiz Token"

403 Forbidden

The scope of the access token or consent does not match.

-The YÖS attempts to access an account/transaction resource and the YÖS does not have a consent with valid permissions to access the requested resource.

For example; the account information consent has not been granted balance permission but a request has been made to the /balances address.

httpCode: 403 httpMessage: "Forbidden" errorCode: "TR.OBHS.Resource.Forbidden" moreInformation: "Insufficient rights" moreInformationTr: "İzin verilmedi."

404 Not Found

If the HHS does not provide a valid API access address, it must respond with 404 (Not Found) for requests to that URL.

If the YÖS attempts to access a URL for a resource not defined in the implementation principles (e.g., GET /foreignpayment), the HHS may choose to respond with 404 (Not Found).

httpCode: 404 httpMessage: "Not Found" errorCode: "TR.OBHS.Resource.NotFound" moreInformation: "Resource not found" moreInformationTr: "Kayıt bulunamadı"

API Principles and Rules | February 2022 32

405 Method Not Allowed

The YÖS attempted to access the resource with an unsupported method.

httpCode: 405 httpMessage: "Method Not Found" errorCode: "TR.OBHS.Resource.MethodNotAllowed" moreInformation: "Method Not Allowed" moreInformationTr: "İstek yapılan URL için izin verilmeyen metot"

E

406 Not Acceptable

The request contains an invalid character set.

httpCode: 406 httpMessage: "Not Acceptable" errorCode: " TR.OBHS.Resource.NotAcceptable" moreInformation: "Accept Headers not supported" moreInformationTr: "Desteklenmeyen kabul başlıkları"

E

API Principles and Rules | February 2022 33

415 Unsupported Media Type

The transaction was rejected because the request body was created in a format not supported by this method on the target resource.

httpCode: 415 httpMessage: "Unsupported Media Type" errorCode: " TR.OBHS.Resource.UnsupportedMediaType" moreInformation: "Content type not supported" moreInformationTr: "Desteklenmeyen içerik tipi"

E H H

422 Unprocessable Entity

Used for the error situation exemplified in section 3.17 Idempotency Rules.

httpCode: 422,

httpMessage: "Unprocessable Entity", moreInformation: "Gönderilen istek başlığı x-request-id değeri ile veri gövdesi sağlama toplamı önceki veri ile uyuşmuyor", moreInformationTr: "x-request-id header and request checksum does not match with previously sent payload.", errorCode: "TR.OBHS.Business.InvalidContent"

429 Too Many Requests

The transaction was rejected because too many requests were made within a certain period of time.

API Principles and Rules | February 2022 34

HHSs may restrict requests exceeding fair usage policies.

httpCode: 429 httpMessage: "Too Many Requests" errorCode: " TR.OBHS.Connection.ExceededRate" moreInformation: "The rate limit has been exceeded for the plan or operation being used" moreInformationTr: "Planda tanımlanmış olan çağrı limiti aşıldı"

500 Internal Server Error

A problem occurred in the API server / service layer. Transaction failed.

httpCode: 500 httpMessage: "Internal Server Error" errorCode: "TR.OBHS.Server.InternalError" moreInformation: "Unexpected condition was encountered" moreInformationTr: "Beklenmedik bir durumla karşılaşıldı."

E

503 Service Unavailable

Service version has been deprecated.

In cases where an API has been deprecated and is no longer operationally supported by an HHS, the URI path may still be active and may accept API requests. In this case, it is recommended to return 503 Service Unavailable so that the YÖS is aware that the API version is offline.

API Principles and Rules | February 2022 35

httpCode: 503

httpMessage: "Service Unavailable" errorCode: "TR.OBHS.Server.ServiceUnavailable " moreInformation: "API is currently unable to handle the request" moreInformationTr: "API şu anda isteği işleyemiyor"

API Principles and Rules | February 2022 36

3.19. Masking Rules

The masking rules for data that must be transmitted masked are as follows:

-IBAN data Account Number: The first 4 and last 4 characters must be clear, other characters must be masked. Example: TR544812
-Name-Surname / Trade Title: The first 2 characters of each word must be clear, and 4 '*' characters must be placed instead of the following characters.

For example: "FATİH SERKAN EREN" should be shown as "FA SE ER".

-Signboard Title: The first 2 characters of each word must be clear, and 4 '*' characters must be placed instead of the following characters. For example, "BANKALARARASI KART MERKEZİ ANONİM ŞİRKETİ" should be shown as "BA KA ME AN Şİ".
-The title and IBAN information entered from the YÖS are returned clear in the payment order consent and payment order response, and are carried masked in the payment order consent response and payment order request and response in the Kolas flow.

3.20. Non-Functional Requirements

-HHSs must design the services they offer to respond within a maximum of 3000 ms.
-The following limits have been determined for automated queries not initiated by the user by the YÖS.
-The YÖS may make at most 4 queries per day per account for Individual ÖHKs.
-The YÖS may make at most 12 queries per hour per account for Corporate ÖHKs.

On the other hand, queries within the scope of the Account Information Service initiated by the user can be defined within the upper rate limits determined by the HHS.

-If HHSs need to impose rate limits on the services they offer in order to ensure the security and continuity of the system, they can make a configuration in accordance with standards and needs. E.g.: YÖS - X queries per day per user, etc.

That the request is initiated by the user can be understood from the Payment Service User (PSU) fields in the Request Header.

-HHSs must also establish a healthcheck service to determine whether the services are up. HHSs are expected to model all network and database or infrastructural accesses their services need with this service and share this service with BKM. It is planned that this service will be called regularly by BKM to check whether the services are up.

For each API offered, they are expected to provide the following information with the /health endpoint.

GET /{api name}/{version}/health

Example:

GET /obh/s1.0/health

GET /hbh/s1.0/health

API Principles and Rules | February 2022 37

GET /gkd/s1.0/health

Health services for HHS and YÖS API can be checked with the following services.

GET /hhs-api/s1.0/health

GET /yos-api/s1.0/health

Http 200 code must be returned in a successful response.

Successful Response:
Field NameJSON Field NameFormatConditional / OptionalDescription
statusstatusAN2..20ZCan take the values "UP", "DOWN".

If no response is received from the Health service, an error is received, or the status comes as DOWN, the request will not be forwarded from the API Gateway to the HHS side.

-Regarding OHVPS services, HHSs will be regularly queried by BKM, and accessibility and usage rates will be monitored.
-HHSs must structure their services to ensure they are up at a rate of 99.75% annually in terms of access percentages.

4. Consent States

The ÖHK starts the Payment Order Initiation Service or the Account Information Service with the establishment of customer consent.

As a result of the transactions made by the ÖHK through the YÖS application, consent states may change.

The status codes that the Consent can take have been determined as follows.

B: Authorization Pending – In the first consent request

Y: Authorized – When the authCode is generated after a successful GKD

K: Authorization Used – When the Access Token is obtained

E: Authorization converted to payment order – For ÖBHS

S: Authorization Terminated

For HBHS: When the Last Date Access is Valid arrives

For ÖBHS: When the Refresh token Last Date arrives

I: Authorization Cancelled

In the case of consent cancellation, in order to provide accurate information from both a reporting and customer experience perspective, it has been enriched with the following detail codes:

Consent Cancellation Detail Code:

'01': Cancellation with New Consent Request

'02': Cancellation by User Request via HHS

'03': Cancellation by User Request via YÖS

'04': Timeout: Authorization Pending

'05': Timeout: Authorized

'06': Timeout: Authorization Did Not Convert to Payment

API Principles and Rules | February 2022 38

'07': GKD cancellation: Duplicate call with the same consent no

'08': GKD cancellation: Consent no and TCKN mismatch

'09': GKD cancellation: No suitable product found

'10': GKD cancellation: HHS Open Banking channel closed for processing

'11': GKD cancellation: Account Authorization Problem

'12': GKD cancellation: ÖHK is not an HHS customer

'13': GKD cancellation: ÖHK could not pass HHS checks

'14': GKD cancellation: Failed GKD

'15': GKD cancellation: GKD abandoned upon ÖHK request

'16': GKD cancellation: Other

In the consent state changes detailed in sections 4.1 and 4.2, status codes are used.

For example, when B→ I/01 is stated, it is expressed that from the "Authorization Pending" status to the "Authorization Cancelled" status, the Consent Cancellation Detail Code should be updated as '01', i.e., 'Cancellation with New Consent Request'.

If one of the accounts selected by the ÖHK during the consent it gives is closed, it continues to see the information of the other accounts. However, in the case where the ÖHK does not want the information of its account to be transmitted to the YÖS, it must cancel its consent completely and give a new consent with a new account list. In other words, the consent does not lose its validity due to account closure. If the customer proactively removes this account from the consent, the consent is cancelled.

As long as the consent is not cancelled and is valid, the method applied in other online channels should be followed for closed accounts. If information regarding closed accounts is not returned in other online channels, no return is made from ÖHVPS either. In the case where all of the open accounts for which the ÖHK has given consent are closed on the HHS side, the HHS again decides whether to show these accounts in the YÖS application according to the rules it has set in its online channels.

Account closure and authorization changes of commercial users on accounts are managed by checks made by the HHS's internal systems. With these changes, the HHS cannot perform consent cancellation systemically. Consent cancellation must be carried out with the customer's permission and approval.

4.1. Account Information Service Consent state changes

Rule: 1 ÖHK can have 1 consent in Y, K, B status at 1 HHS for 1 YÖS.

An ÖHK can be both a personal user and a user of an institution. In this case, institutional and personal consent must be able to exist at the same time. Consent objects must be managed appropriately by the HHS.

1.The Account Information Consent request is transmitted to the HHS.
a.The HHS checks whether there is an existing consent for the customer. If not, it creates a new consent no of type CONSENT = B Authorization Pending.
b.If there is an existing consent
i.If the consent type is Authorization Pending (B)

Since the HHS has a record in the Authorization Pending (B) status in the system, it first brings the old record to the Cancelled (I) status. The Consent Cancellation Detail Code must be "Cancellation with New Consent Request". B → I / 01

Afterwards, it creates a new consent in the Authorization Pending (B) status.

ii. If the Consent Type is Authorized (Y) and Authorization Used (K)

The customer already has a consent given. The HHS first returns an error stating that consent cancellation should be made.

TR.OBHS.Resource.ConsentMismatch

iii.If the consent type is Authorization Terminated (S), it creates a new consent no of type Authorization Pending (B).
iv.If the consent type is Cancelled (I), it creates a new consent no of type Authorization Pending (B).
2.When GKD is completed successfully, the Consent status is updated from Authorization Pending to Authorized. B → Y

The HHS may not be aware of situations where GKD does not occur.

-The customer may have left without performing GKD. (E.g.: may have closed the browser)

API Principles and Rules | February 2022 39

The consent remains in the Authorization Pending (B) status. Within 5 minutes, the records in the Authorization Pending (B) status are updated by the system as Authorization Cancelled: Authorization Pending Timeout. B → I / 04 See Article 9.

The HHS is aware of situations where GKD does not occur. The HHS must notify the YÖS of this situation by adding the rizaIptDtyKod value to the query parameters of the redirection address.

-A duplicate call has been made with the same consent no. Authorization Pending → Authorization Cancelled

B → I / 07

-Consent no and TCKN mismatch. Authorization Pending → Authorization Cancelled

B → I / 08

-The situation where the ÖHK does not have the relevant product at the HHS (account/card) Authorization Pending → Authorization Cancelled B →I / 09
-Your open banking channel is closed for processing. Authorization Pending →Authorization Cancelled

B →I / 10

-The situation where the user does not have sufficient authorization on their accounts at the HHS Authorization Pending →Authorization Cancelled

B →I / 11

-The situation where the ÖHK is not a customer of the relevant HHS Authorization Pending →Authorization Cancelled

B→I / 12

-The situation where the checks made by the HHS for the ÖHK fail Authorization Pending →Authorization Cancelled B → I / 13
-The customer may not have been able to authenticate themselves. Failed GKD Authorization Pending →Authorization Cancelled

B → I / 14

-The ÖHK may have left without performing GKD. The situation where the HHS is aware (E.g.: may have pressed the ABANDON button on the HHS screen.) Authorization Pending →Authorization Cancelled

B → I / 15

-Other Authorization Pending →Authorization Cancelled

B → I / 16

If GKD has occurred and the consent status is in a status other than Authorization Pending, and the YÖS redirects to the HHS to perform GKD again, the HHS must terminate the transaction with an appropriate error message. The error given here will not be transmitted to the YÖS. This situation may occur when the authcode parameter cannot be transmitted to the YÖS or in a different way.

3.The customer enters the YÖS screen to update one or more of the accounts/permission types/Last Date Access is Valid information.
a.The YÖS first calls the Consent Cancellation API. Then it makes a new consent request with new values. GKD is required again.
b.If the YÖS starts the new consent acquisition flow without cancelling the consent, flow 1.b comes into play.
c.Consent update will be addressed in future versions.
4.When the Access Token API call is made; the HHS must check that the consent number is in the Y - Authorized status. If it is in Y status, the access token is allocated.

If it is not in Y status, the TR.OBHS.Resource.ConsentMismatch error must be given.

When the access token is obtained, the consent status is set to K: Authorization Used. Y→K

5.Query: Before starting the consent acquisition flow, HBHS may optionally obtain the status of a previously created account information-consent resource. The query is made with the consent number.
6.Cancellation of Account Information Consent: In consent cancellations made via HBHS or via HHS, the Consent status is updated as Cancelled. Cancellation is provided with the consent number.
a.The HHS may have made a consent cancellation. The consent status is queried.

If the consent number has the status B- Authorization Pending and Y-Authorized and K Used, it is brought to the cancelled status. The consent gnclzmn is updated with the timestamp.

API Principles and Rules | February 2022 40

In consent cancellation, the HHS must also invalidate the access token.

B → I / 02

Y → I / 02

K → I / 02

b.In the cancellation transaction to be made via the YÖS, it can be cancelled if it is in Y and B and K status.

B → I / 03

Y → I / 03

K → I / 03

If the consent number has the status Authorization Terminated (S), cancellation does not occur. The error "Your consent is not in a status that can be cancelled." is reflected to the customer. TR.OBHS.Resource.ConsentMismatch

7.The consent period given by the AISP may have expired.

When the Last Date on which Access is Valid arrives, the consent status must be changed from Authorization Used to Authorization Terminated. K → S

8.In the Accounts, Balance and transactions services, processing must begin with a consent check. Processing must not continue for consent statuses other than "K: Authorization Used". In this case, the following error must be returned:

TR.OBHS.Resource.ConsentMismatch

When the PISP calls these services, if the AISP consent is in cancelled status, this cancellation may have been made via the ASPSP. (When the PISP performs the cancellation flow from its own application, it is considered that it will start transactions by obtaining a new consent. However, if a query is still made by the PISP, the ConsentRevoked error must be returned from the ASPSP.) If the consent status is Cancelled and the Consent Cancellation Detail Code is 2, the following error code must be returned so that the PISP can be informed of the Cancellation made via the ASPSP:

TR.OBHS.Resource.ConsentRevoked

In the Consent query and Consent cancellation APIs, if the relevant consent record cannot be found or the querying institution does not have authorization (e.g., the PISP querying a consent number belonging to a different PISP), the error TR.OBHS.Resource.NotFound must be returned.

9.On the ASPSP/PISP side, consent information is scanned by the system user at certain intervals:

Records that remain in "Authorization Pending" status for more than 5 minutes have their statuses updated.

Authorization Pending → Consent Cancelled / Timeout: Authorization Pending B → I / 04

Records that remain in "Authorized" status for more than 5 minutes have their statuses updated.

Authorized → Consent Cancelled / Timeout: Authorized B → I / 05

Before making the consent cancellation status updates due to PISP Timeout mentioned above, the PISP must query the ASPSP to learn the consent status, and if it has a code other than timeout, it must update its own system with the same code.

When the Last Date on which Access is Valid arrives, the consent status is updated from Authorization Used to Authorization Terminated. K → S

4.2. Payment Information Service Consent Status Changes

Rule: 1 AISP may have as many consents as it wants with 1 ASPSP for 1 PISP.

Institutional and personal consent must be able to exist at the same time. Consent objects must be managed appropriately by the ASPSP.

API Principles and Rules|February 2022 41

1.The Payment Order Consent request is transmitted to the ASPSP. Regardless of whether there is an internal consent, it creates a new consent number of type Authorization Pending (B).
2.When SCA is successfully completed, the Consent status is updated from Authorization Pending to Authorized.

B → Y

The ASPSP may not be aware of cases where SCA did not occur.

-The customer may have left without performing SCA. (E.g., may have closed the browser)

The consent remains in Authorization Pending (B) status. Within 5 minutes, records in Authorization Pending (B) status are updated by the system as Consent Cancelled: Authorization Pending Timeout.

See Article 9.

The ASPSP is aware of cases where SCA did not occur. The ASPSP must notify the PISP of this situation by adding the rizaIptDtyKod value to the query parameters of the redirection address.

-A duplicate call was made with the same consent number. Authorization Pending → Authorization Cancelled

B → I / 07

-Consent number and TR ID number mismatch. Authorization Pending → Authorization Cancelled

B → I / 08

-The situation where the AISP does not have the relevant product at the ASPSP (account/card) Authorization Pending → Authorization Cancelled B

→I / 09

-Your open banking channel is closed to processing. Authorization Pending → Authorization Cancelled

B →I / 10

-The situation where the user does not have sufficient authority over their accounts at the ASPSP Authorization Pending

→Authorization Cancelled

B →I / 11

-The situation where the AISP is not a customer of the relevant ASPSP Authorization Pending →Authorization Cancelled

B→I / 12

- The situation where the checks made by the ASPSP for the AISP fail Authorization Pending →Authorization Cancelled B

→ I / 13

-The customer may not have been able to verify themselves. Failed SCA Authorization Pending →Authorization Cancelled B

→ I / 14

-The AISP may have left without performing SCA. The situation where the ASPSP is aware (E.g., the CANCEL button on the ASPSP screen may have been pressed.) Authorization Pending →Authorization Cancelled

B → I / 15

- Other Authorization Pending →Authorization Cancelled

B → I / 16

3.When there is an SCA exemption, the PISP obtains approval from the ASPSP in the background. During this approval, the consent status is set to Authorized. B → Y
4.When the Access Token API call is made; the ASPSP must check that the consent number is in Y - Authorized status. If it is in Y status, an access token is allocated.

If it is not in Y status, the error TR.OBHS.Resource.ConsentMismatch must be returned.

When the access token is obtained, the consent status is set to K: Authorization Used. Y→K

5.The Payment Initiation API must begin processing with a consent check.

Processing must not continue for consent statuses other than "K: Authorization Used". In this case, the following error must be returned: TR.OBHS.Resource.ConsentMismatch

If the consent is in cancelled status, an error code is returned so that the PISP is informed.

TR.OBHS.Resource.ConsentRevoked

6.Query: In cases where the sender account selection is made on the ASPSP screen during the successful completion of the SCA process and the authorization of the Payment Order Consent, since the sender account information field is mandatory in the payment order request, the sender account information (account number and/or account reference) must be obtained by querying the odemeEmriRizasi object.

API Principles and Rules|February 2022 42

In the Consent query and Payment Order Query APIs, if the relevant consent record cannot be found or the querying institution does not have authorization (e.g., the PISP querying a consent number belonging to a different PISP), the error TR.OBHS.Resource.NotFound must be returned.

7.There is no Cancellation of Payment Order Consent.
8.When the Payment Order is executed, the K: Authorization Used Status changes to E: Authorization converted to payment order. K→E
9.On the ASPSP/PISP side, consent information is scanned by the system user at certain intervals:

Records that remain in "Authorization Pending" status for more than 5 minutes have their statuses updated.

Authorization Pending → Consent Cancelled / Timeout: Authorization Pending B → I / 04

Records that remain in "Authorized" status for more than 5 minutes have their statuses updated.

Authorized → Consent Cancelled / Timeout: Authorized B → I / 05

Records that remain in "Authorization used" status for more than 5 minutes have their statuses updated.

Authorization used → Consent Cancelled / Timeout: Authorization Did Not Convert to Payment B → I / 06

When the Refresh token Last Date arrives, the consent status is updated from Authorization converted to payment order to Authorization Terminated. E → S

10.SCA exemption exists only in payment initiation services.

5. Strong Customer Authentication

Strong customer authentication for the customer defines the method used to verify the identity of the AISP (customer), consisting of at least two components, where the compromise of one component does not compromise the security of the other, and these two components are selected from two different component classes that the customer "knows", "possesses", or "has a biometric characteristic".

In accordance with the Communiqué on Information Systems of Payment and Electronic Money Institutions and Data Sharing Services of Payment Service Providers in the Field of Payment Services, it is essential that strong customer authentication (SCA) is applied by the ASPSP to the customer during the obtaining of the customer's approval in the account information service and in each payment order initiation transaction in the payment order initiation service. Accordingly:

1.During the obtaining of the AISP's approval in the account information service, SCA is applied to the AISP by the ASPSP pursuant to paragraph 1 of Article 26 of the Communiqué.
2.In the payment order initiation service, strong customer authentication is applied to the AISP by the ASPSP pursuant to paragraph 2 of Article 26 of the Communiqué, and the AISP's approval is obtained with the transaction verification code.
3.In the payment order initiation service, exceptions or additional security measures regarding the application of strong customer authentication to the AISP by the ASPSP pursuant to paragraph 3 of Article 26 of the Communiqué are defined in these API Principles and Rules document.
4.The ASPSP may use SMS OTP or a transaction verification code via SMS as the component class possessed by the AISP during the strong customer authentication process.
5.The ASPSP may perform authentication with a single component in the following cases or according to the result of the risk assessment specified in paragraph 2 of Article 10 of the Communiqué.
-The sender and recipient of the payment are the same,
-Payment is made to a previously defined list of trusted recipients,
-It is a regular payment made based on the AISP's instruction.
6.The obligation to prove that the transaction performed in relation to these transactions authenticated with a single component was performed by the customer belongs to the ASPSP.

API Principles and Rules|February 2022 43

7.In Transaction Verification, in accordance with the transaction information definition in subparagraph (ğ) of paragraph 1 of Article 3 of the Communiqué, the following information is used together with the transaction verification code specially generated for the transaction as defined in subparagraph (hh) of paragraph 1 of Article 3 of the Communiqué.
-Recipient Title (masked in the collection flow) (payment order initiation service)
-Amount (payment order initiation service)
-Reference information (if less than 8 characters, the entire value of the field; if greater, the first 4 and last 4 digits)

The flow must be designed such that when at least one of the above information pertaining to the transaction changes, a new transaction verification code is generated as specified in subparagraph (hh) of paragraph 1 of Article 3 of the Communiqué.

8.The ASPSP is responsible for sending the transaction verification code. The ASPSP may obtain the AISP's approval without using a transaction verification code according to the result of the risk assessment specified in paragraph 2 of Article 10 of the Communiqué. The obligation to prove that the transaction performed in relation to transactions where a transaction verification code is not used was performed by the AISP belongs to the ASPSP.
9.Within the scope of the PSDSS API standard, two Strong Customer Authentication (SCA) methods will be used:
-Redirected SCA Method
-Decoupled SCA Method
10.The ASPSP must at minimum support the browser-based Redirected SCA method.
11.One-time payment transactions not within the scope of a framework contract can only be performed with the Redirected SCA method.

5.1. Redirected Strong Customer Authentication

In the Redirected SCA Method, the customer is redirected by the PISP to the ASPSP interface for identity verification. After the customer is redirected to the ASPSP (via application or web interface), the customer's strong customer authentication is carried out step by step and directly between the ASPSP and the customer. After the completion of SCA, the customer is redirected back to the PISP application.

The high-level example workflow for the Redirected SCA Method consists of the following steps:

1.The PISP redirects to the interface defined by the ASPSP for SCA (browser or application).
2.The customer leaves the PISP interface and performs identity verification operations on the ASPSP interface to which they are redirected.
3.After SCA is completed, the customer is redirected back to the PISP interface and the transaction result is displayed.
The basic requirements for Redirected SCA are as follows:
-The payment service (account information or payment order initiation service) can be offered in a browser or application-based manner. Therefore, PISPs and ASPSPs must at minimum support the browser-based redirection flow for Redirected SCA.
-One-time payment transactions not within the scope of a framework contract (FC) can only be performed with the Redirected SCA method.
Browser-Based Redirection
Redirection to the ASPSP's web interface is performed in the following cases:
-The ASPSP does not have a mobile application,
-The ASPSP application is not installed on the mobile device on which the AISP offers the payment service (account information or payment order initiation service).

API Principles and Rules|February 2022 44

If the PISP has a mobile application, redirection is made from the application to the browser on the mobile device; if the PISP does not have a mobile application, redirection is made via the browser on the device on which the payment service is offered (Personal Computer or Mobile Device).

Application-Based Redirection

If the AISP uses the payment service (account information or payment order initiation service) with the PISP's mobile application, and the ASPSP's mobile application is installed on the same mobile device, application-based redirection is performed so that AISP verification is performed by the ASPSP mobile application. Thus, the AISP can be verified with the verification method used when accessing the ASPSP's mobile channel for access to the payment service.

Table 5: Redirected Strong Customer Authentication Channels

Verification Method PISP Possible Environment ASPSP Possible Environment

Browser-Based Redirection

Personal Computer (desktop, laptop) /

Mobile Device

Personal Computer (desktop, laptop) /

Mobile Device

Application-Based Redirection Mobile Device Mobile Device

5.2. Decoupled Strong Customer Authentication

The Decoupled SCA Method workflow is similar to the workflow of the Redirected SCA Method. The difference is that the ASPSP requests authentication from the customer by sending a push notification containing the payment transaction details through any application or device independent of its online interface. A (very simplified) high-level example information flow for a transaction based on the Decoupled SCA Method is as follows:

1.The customer initiates their transaction on the PISP interface.
2.The PISP transmits its request to the ASPSP including the unique identifier identity number information such as TR ID, Tax ID, Foreigner ID belonging to the customer.
3.The ASPSP sends a push notification to the customer via a different device or application using the unique identifier information and ensures verification is performed. In this way, the ASPSP will be able to use the verification method used for accessing its own mobile application in exactly the same way.
4.The PISP waits for the transaction result without redirecting anywhere; the customer does not leave the PISP interface (the interface remains the same).
5.After identity verification, the transaction result is displayed on the PISP interface.

5.3. Redirection/Notification Addresses and State Code Parameter

In order to protect against CSRF attacks and to enable the PISP application to restore its previous state; a state code (drmKod) parameter, equivalent to the state parameter in Oauth2 standards, must be added to the redirection and notification addresses transmitted by the PISP. The state code parameter must be a unique and not easily guessable value generated by the PISP. It must be created during the consent request submission phase. It must be stored in an appropriate place in the PISP application (such as cookie, session, local storage).

API Principles and Rules|February 2022 45

The state code is added as a parameter to the redirection address in the consent request. After the SCA process, this information, together with the authorization code, is transmitted by the ASPSP to the PISP. The PISP checks the equality of the value it stored with the value coming as a parameter. If they are the same, it proceeds with the flow to obtain an access token. If different, it terminates the transaction.

5.4 Healthcheck API

GET /health

This service, to be provided by ASPSPs, is planned to be called regularly by the BKM to check whether the services are up.

Http 200 code must be returned in a successful response.

Successful Response:

Field Name JSON Field Name Format Conditional / Optional Description status status AN2..20 Z Can take the values "UP", "DOWN".

5.5 Strong Customer Authentication Controls

When the AISP is redirected to the ASPSP application for SCA, the ASPSP must confirm the accuracy of the transaction by performing various checks. The basic scenarios for the checks to be performed are specified in the table below. Based on these scenarios, they can be enriched by ASPSPs.

The implementation of the mandatory error situations by ASPSPs and the transmission of appropriate error codes to the PISP will eliminate potential reconciliation problems in the future, contribute to system and process improvements within the scope of reporting to be made, and provide informative content regarding the error received from the end user's perspective.

Error descriptions; provided they are appropriate or compatible with the error code, may be presented in different ways by the ASPSP and the PISP.

API Principles and Rules|February 2022 46

Checks to be performed during SCA
Consent Cancellation
Detail Code

ASPSP error description*

Example message

text to be listed on the PISP screen*

Example Scenario

Mandatory /

Optional

Situation where consent status is not "Authorization Pending"

Authorization Error

After the SCA process is completed, the AISP redirects to the ASPSP again by going forward-backward on the PISP screen or by copying the AISP's redirection address and pasting it into the browser. In this case, the ASPSP transmits this error message.

Mandatory

Consent number and identity information mismatch.

Your transaction could not be performed.

In the case where the identity information (TR ID) in the consent initiated by the PISP and the information of the AISP who performed SCA at the ASPSP do not match Mandatory

Situation where the AISP does not have the relevant product at the ASPSP (account/card)

No account/card that can be displayed could be found.

In the case where the AISP does not have an account with appropriate status Mandatory

Your open banking channel is closed to processing.

Your open banking channel is closed to processing.

In ASPSPs that have defined open banking as a separate channel, in the case where the AISP closes their transactions to the OB channel

Optional

Situation where the user does not have sufficient authority over their accounts at the ASPSP

You do not have authorization.

1- In the case where corporate company users do not have transaction authority over accounts

2- If there is an account restriction in individual joint accounts (in the case where outflow of funds is not allowed)

Mandatory

API Principles and Rules|February 2022 47

Situation where the AISP is not a customer of the relevant ASPSP

You do not have authorization.

In one-time payments, AISP identity information is not present in the consent request.

In other flows, a customer status check can be made in the consent request.

Mandatory

Situation where the checks made by the ASPSP for the AISP fail

You do not have authorization.

The failure of the checks made by the ASPSP in its internal systems for the AISP. For example:

In the case where the customer has deficiencies preventing them from performing transactions on the Internet branch such as a banking service contract not yet in place, or in the case where a corporate user cannot perform transactions on the channel due to the expiration of the power of attorney/incomplete documents

Mandatory

14 Failed SCA

You do not have authorization.

1-The AISP cannot provide the necessary 2FA information for SCA

2- According to the ASPSP risk perception, instead of returning error code 12, it may also return error code 14 to the PISP.

Mandatory

Situation where SCA is abandoned upon AISP request (E.g., the CANCEL button on the ASPSP screen may have been pressed.)

The customer has abandoned the transaction.

1- The situation where the CANCEL button on the ASPSP screen is pressed (There may be a CANCEL button both before AISP login and after SCA (before giving consent).)

2-The customer waited on the Bank login screen without taking any action and the ASPSP SCA timeout period is shorter than 5 minutes.

Mandatory

16 Other

Your transaction could not be performed.

Optional

If the consent number transmitted during SCA cannot be found in the ASPSP's system, there will be no consent number whose status will be updated. The ASPSP may display a message appropriate to this situation on its own front end. It may also transmit this situation to the PISP with the Other error code.

API Principles and Rules|February 2022 48

6. Payment Order Initiation Service

The payment order initiation process may result in a transfer, FAST or PÖS payment. The purpose of the payment transaction may be different payment types such as person-to-person money transfer, e-commerce payment. There may be differences in the data set to be transmitted by the PISP depending on the purpose of the payment.

The Payment Order Initiation Service consists of 5 basic flows:

0.Triggering of the Payment Order Initiation Request: The AISP initiates the payment order from the PISP mobile application or website.
1.Preparation of Payment Order Consent: The PISP transmits the request to create permission for the "Payment Order Initiation" transaction to the ASPSP.
2.Authorization of Payment Order Consent: The ASPSP verifies the AISP with SCA when it deems necessary and ensures that an access token is defined for access to the payment order consent.
3.Initiation of the Payment Order: The PISP transmits the "payment order" to the ASPSP.
4.Payment Order Consent Status, Payment Order Status, Payment Order Detail Queries: The PISP may optionally query the Payment Order Consent Status, Payment Order Status, Payment Order Detail information.

Figure 4: Payment Order Initiation Service High-Level Workflow

API Principles and Rules|February 2022 49

Access Addresses (Endpoints) for the Payment Order Initiation Service

Table 6: Access Addresses for the Payment Order Initiation Service

Scope ="odeme_emri"

No Resource HTTP operation

Access Address Mandatory

/ Optional

Authorization

Type

Signing Request

Object

Response

Object odemeemririzasi

POST

POST /odemeemri-rizasi

Z

Client

Identity

Information

Signed Request and Response

OdemeEmri

RizasiIstegi

OdemeEmriRi zasi erisimbelirteci (for SCA)

POST

POST/erisimbelirteci

Z

Client

Identity

Information

Signed Request and Response

ErisimBelirte ciIstegi

ErisimBelirteci

2.1 odemeemririzasi

GET

GET /odemeemririzasi/{rizaNo}

Z

Client

Identity

Information

Signed Response -

OdemeEmriRi zaYaniti odemeemri

POST

POST /odemeemri

Z

Client

Identity

Information &

Authorization

Code (SCA)

Signed Request and Response

OdemeEmriI stegi

OdemeEmri

3.1 odemeemri

GET

GET /odemeemri/{odeme

EmriNo}

Z

Client

Identity

Information &

Authorization

Code (SCA)

Signed Response - OdemeEmri

6.1. STEP 0 - Payment Order Initiation Request

o The AISP approves the payment order initiation transaction in the PISP application (web interface/mobile application).

o Specifying the sender account details at this stage is not mandatory.

API Principles and Rules|February 2022 50

6.2. STEP 1 - Preparation of Payment Order Consent

Figure 5: Preparation of Payment Order Consent

o The PISP connects to the ASPSP where the payment service user account is located and ensures the creation of the payment order consent resource (odemeEmriRizasi).

o The POST request is performed over the communication layer where the TLS protocol is established. Qualified certificates are used for TLS.

o The authorization of the client is ensured using the fields in the header of the POST request and the special fields in the client's certificate:

-Is the requesting PISP authorized?
-Does the requesting authorized payment service provider have the PISP role?
-Is the ASPSP code being requested correct?

o If the POST is successful, the ASPSP returns an odemeEmriRizasi response containing a new consent identifier RizaNo, regardless of whether there is an internal consent for the payment order.

o 1 AISP may have as many consents as it wants with 1 ASPSP for 1 PISP.

o On the ASPSP side, the status of the RizaDurumu variable is updated to "Authorization Pending".

o The PISP also creates the URL address it will open to the AISP as the verification screen according to the relevant consent number. Here it can create the URL with 2 different methods.

-Static URL: ASPSP's base path/sub-directory/{rizaNo}Example hhsYonAdr:

https://xbank.com.tr/ohvps/cb54834e36f742d09af3d534ece3352a

For this address, the relevant verification page must be prepared in advance and must be published for the AISP's access to the verification page.

- Dynamic URL:

ASPSP's base path/sub-directory/SCA Welcome Screen?rizano={rizano}

Example:

https://xbank.com.tr/ohvps/gkd?rizano=cb54834e36f742d09af3d534ece3352a

API Principles and Rules|February 2022 51

POST /odeme-emri-rizasi

REQUEST:

OBHS sends a request to HHS via this API access address to create a new OdemeEmriRizasi:

-OBHS notifies HHS that there is a payment order initiation request.
-OBHS ensures that a copy of the consent given by OHK through the OBHS interface ("Pre-Approval") is sent to HHS for approval by the customer at HHS.
-HHS performs mandatory, length and content checks on the fields in the request message in accordance with the conditions specified in the API document. (Mandatory)
-HHS checks whether the redirection and notification addresses in the OBHS information obtained via the YOS API are compatible with the addresses shared in the payment order consent object request message. (Mandatory)
-HHS checks whether OHK is an HHS customer with this data, if identity information is transmitted in the identity information object. This check must be performed for both individual and corporate OHKs. (Conditionally Mandatory)
-HHS checks that the sender title is compatible with the identity information. (Mandatory)
-The checks specified in Table 7 regarding the Sender Account Number must be performed. (Mandatory)
-HHS creates a unique "RizaNo" and "OdemeEmriRizasi" object for the payment and returns it to OBHS.
-HHS sets the status of OdemeEmriRizasi as "Yetki Bekleniyor" (Authorization Pending) at the moment it is created.

At this stage, OHK does not need to have any information defined by HHS regarding the sender account (account to be debited) in the data field of the request.

Account balance check should not be performed at the consent stage. Because OHK can add money to its account until the payment order is executed.

In the body (BODY) of the POST /odeme-emri-rizasi request (REQUEST), the "odemeEmriRizasiIstegi" object (Table-7) is used. If the request is successful, the "odemeEmriRizasi" object (Table-8) is created on the HHS resource server.

API Principles and Rules|February 2022 52

SUCCESSFUL REQUEST:

Table 7: "OdemeEmriRizasiIstegi" object

Field Name

JSON

Field Name

Format: Data model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

Participant Information katilimci

Blg

Complex:Katilimci

Bilgisi

M

Code information assigned to participants.

>Account Service

Provider Code hhsKod AN4 M

Code of the Account Service Provider to which the request is sent. (Institution code holding the payment account. For example, Bank, Electronic Money Institution and Payment Institution)

HHS checks that hhsKod belongs to itself and is the same as the x-aspsp-code value in the request header.

In case of error, returns TR.OBHS.Connection.InvalidASPSP error code.

> Authorized Payment

Service Provider Code yosKod AN4 M

Code of the Authorized Payment Service Provider (YOS) sending the request. HHS checks that yosKod is a valid Payment Service Provider Code and is the same as the x-tpp-code value in the request header. In case of error, returns TR.OBHS.Connection.InvalidTPP error code.

GKD gkd Complex:Gkd M

API Principles and Rules|February 2022 53

Field Name

JSON

Field Name

Format: Data model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

> Authorization

Method

yetYntm AN1 O

Takes one of the values of the TR.OHVPS.DataCode.GkdTur enumerated data type.

The authorization method may not be specified by OBHS.

HHS uses the method it determines by taking into account the method determined by OBHS.

> Redirection

Address yonAdr AN1..1024 C

Mandatory for redirect strong authentication.

It is the address to be transmitted by YOS.

If YOS supports the flow with Redirected SCA method, it must transmit the redirection address regardless of the yetYntm variable.

Status code (drmKod) must be added as a parameter to the redirection address.

HHS redirects the customer application / browser to the address specified in this field.

> Notification Address bldAdr AN1..1024 C

Mandatory for decoupled strong authentication. It is the address to be transmitted by YOS.

If YOS supports the flow with Decoupled SCA method, it must transmit the notification address regardless of the yetYntm variable.

Status code (drmKod) must be added as a parameter to the redirection address.

HHS transmits the authorization code (authentication code) to the address specified in this field after decoupled SCA.

Payment Initiation odmBslt m

Complex:

OdemeBaslatma

M

> Identity kmlk Complex:Kimlik M

API Principles and Rules|February 2022 54

Field Name

JSON

Field Name

Format: Data model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

>> Identity Type kmlkTur AN1 C

Takes one of the values of the TR.OHVPS.DataCode.KimlikTur enumerated data type.

Its use is mandatory in payments within the scope of the framework agreement.

HHS checks that it is a valid Identity Number Type.

In payments made on behalf of the institution (commercial), the identity type of the user acting on behalf of the institution must be sent in this field.

>> Identity Data kmlkVrs AN1..30 C

Identifier used in user verification at HHS.

Its length and format vary according to the TR.OHVPS.DataCode.KimlikTur value.

Its use is mandatory in payments within the scope of the framework agreement.

If transmitted by OBHS, HHS must apply cross-checks on the Identity Data and perform SCA based on the Identity Data.

Checks regarding the passport number should be handled in the same way as the data, flow and other regulations currently used by HHS.

In payments made on behalf of the institution (commercial), the identity type of the user acting on behalf of the institution must be sent in this field.

API Principles and Rules|February 2022 55

Field Name

JSON

Field Name

Format: Data

model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

>> Institution Identity

Type krmKmlk

Tur

AN1 C

Institution identity type used for the legal entity under which OHK is defined in payments made on behalf of the institution.

Takes one of the values of the TR.OHVPS.DataCode.KurumKimlikTur enumerated data type.

Its use is mandatory in payments made on behalf of the institution (commercial).

HHS checks that it is a valid Institution Identity Number Type.

>> Institution Identity

Data krmKmlk

Vrs

AN1..30 C

Institution identity data used for the legal entity under which OHK is defined in payments made on behalf of the institution.

Its length and format vary according to the TR.OHVPS.DataCode.KurumKimlikTur value.

Its use is mandatory in payments made on behalf of the institution (commercial).

If transmitted by OBHS, HHS must apply cross-checks on the Institution Identity Data.

>> Payment

Service

User Type ohkTur AN1 M

Takes one of the values of the TR.OHVPS.DataCode.OhkTur enumerated data type (B: Individual, K: Corporate)

In payments made on behalf of the institution, it takes the value K. It is cross-checked that the Institution Identity Type and Institution Identity Data fields are entered.

> Transaction Amount islTtr Complex:Amount M

>> Currency prBrm AN3 M

Currency.

In the QR code flow, the Amount data defined in field 53: (Currency) in the FAST QR Code Data Organization is used.

HHS checks that it is a valid currency.

API Principles and Rules|February 2022 56

Field Name

JSON

Field Name

Format: Data

model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

>> Amount ttr N1..18 M

Amount confirmed by OBHS from the user on the front end.

In the QR code flow, the Amount data defined in field 54: (Amount) in the FAST QR Code Data Organization is used.

For example, for 1.20 TRY, the value "120" is transmitted in the amount field.

> Sender gon Complex:Account O

>> Title unv AN3..140 O

Title of the sender.

HHS may obtain this information from its own system instead of the data coming from the OBHS system when transmitting to FAST.

If this data differs from the data in HHS's own systems and does not match the Identity Number, the payment order initiation request is rejected.

If the OBHS data and HHS data differ, it is recommended to use this as input to risk assessment systems.

>> Account

Number hspNo AN26 O

IBAN selected by OBHS from previously recorded accounts on the front end or entered by the customer.

If not transmitted by OBHS, the sender account information can be selected by the customer on the HHS digital channel after SCA. For this purpose, HHS must be selected in the OBHS interface.

If transmitted by OBHS:

-The HHS code in the IBAN is the same as the HHS code in the request header (checking the account belongs to HHS)
-The accuracy of the IBAN (check digit verification)
-The account number belongs to OHK

API Principles and Rules|February 2022 57

Field Name

JSON

Field Name

Format: Data

model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

If Account Reference is used, Account Number may not be used. If a payment order consent is to be initiated with an account reference, HHS must check whether there is an existing account information consent associated with the account reference value. If there is no active consent, TR.OBHS.Business.InvalidContent error must be returned.

It is checked whether there are different statuses for which payment permission is not granted specifically to HHS.

When the check fails, TR.OBHS.Business.InvalidAccount error is transmitted to YOS.

>> Account

Reference hspRef AN5..40 O

Unique identifier (uuid) assigned by HHS for the account. It does not need to differ per YOS.

In the case where OBHS is also HBHS, payment can also be initiated via the reference of an account for which customer consent has been established.

If Account Number is used, Account Reference may not be used.

When the IBAN associated with HspRef changes, the new IBAN is expected to be associated with the relevant HspRef. In this case, when HBHS queries with HspRef, HHS will be able to return the new IBAN and account movements. It is recommended that HspRef is not changed when the IBAN changes.

> Recipient alc Complex:Account M

>> Title unv AN3..140 C

Mandatory if Easy Address System is not used.

Title of the recipient. It can be entered from OBHS screens or can be filled and sent by selection from OBHS's registered recipients.

In the FAST-TR QR Code Data Organization;

-It is the Business name field defined in field 59: of the long QR code structure provided by the business

API Principles and Rules|February 2022 58

Field Name

JSON

Field Name

Format: Data model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

-It is the Name and Surname of the Payment Recipient field defined in field 07: of the Person to Person Payment QR Code Structure.

>> Account

Number hspNo AN26 C

Recipient's Account Number (IBAN) field.

Mandatory if Easy Address System is not used.

In the QR code flow, the Business IBAN data defined in field 30-01: in the FAST QR Code Data Organization is used.

In cases where multiple accounts of the recipient are available (especially in business payments, the account at HHS (on-us transfer flow) should be preferred.

IBAN verification (check digit verification) is performed by HHS (Sending Participant).

>> Easy Address kolas Complex:Kolas C

>>> Kolas Type kolasTur AN1 M

Takes one of the values of the TR.OHVPS.DataCode.KolasTur enumerated data type.

If Recipient Account Number is not entered, its use is mandatory and it is used together with the Easy Address Type field.

It is used as input in the query made to the KOLAS Service by HHS (Sending FAST participant).

>>> Kolas Value kolasDgr AN7..50 M

Easy Address value added by the customer and verified by HHS (FAST participant). The values it can take are defined in the BKM "Easy Addressing System Application Rules" document.

If Account Number is not entered, its use is mandatory and it is used together with the Easy Address Type field.

It is used as input in the query made to the KOLAS Service by HHS (Sending FAST participant).

API Principles and Rules|February 2022 59

Field Name

JSON

Field Name

Format: Data model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

> QR Code kkod Complex:Karekod C

>> Flow Type aksTur AN2 M

Takes one of the values of the TR.OHVPS.DataCode.KareKodAksTur enumerated data type.

Not used together with Easy Address System.

>> Reference kkodRef AN1..12 C

Indicates the QR code reference number.

Mandatory if there is a reference value in the scanned QR code.

It must be used as defined in the QR code principles and rules document.

Not used together with Easy Address System.

>> Producer Code kkodUrtc

Kod

AN4 M

QR code producer code.

Payment Service Providers and payment system operators deemed appropriate by TCMB will be able to obtain a QR code producer code by applying to BKM for registration to generate TR QR codes. Banks will use EFT codes and do not need to register separately. Values shorter than 4 digits must be completed with '0' character on the left.

API Principles and Rules|February 2022 60

Field Name

JSON

Field Name

Format: Data model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

> Payment Details

odmAyr

Complex:

OdemeAyrintilari

M

>> Payment

Source odmKyn k

AN1 M

Indicates the source that initiated the payment.

Takes one of the values of the TR.OHVPS.DataCode.OdemeKaynak enumerated data type.

HHS checks that a valid Payment Source code is used.

>> Payment Purpose odmAmc AN2 M

Takes one of the values of the TR.OHVPS.DataCode.OdemeAmaci enumerated data type.

In the QR code flow, the Payment Purpose data defined in field 62-08: in the FAST QR Code Data Organization is used.

HHS checks that it is a valid Payment Purpose code.

>> Reference Information

refBlg AN1..140 C

Reference Information field specific to the payment. Mandatory if not a QR code transaction.

-In person-to-person fund transfers: Reference information uniquely created for OHK within the day
-In e-commerce transactions: order/tracking number/customer/subscriber number
-In the QR code flow, one of the data defined in the FAST QR Code Data Organization:
-62-01: Invoice Number
-62-06: Customer Number is used.

HHS must show this value as an element of the "transaction verification code" on the front end used for SCA.

API Principles and Rules|February 2022 61 odmAckl

m

AN1..50 O

Transaction description information obtained by OBHS from OHK or assigned by itself.

> OBHS Expense

Amount

ObhsMsr fTtr

Complex:Amount O

>> Currency prBrm AN3 M Currency (TRY, USD, EUR, etc.).

>> Amount ttr N1..18 M

Expense amount that OBHS specifies to be debited from OHK regarding the transaction. It must be in the same currency as the Transaction Amount.

For example, for 1.20 TRY, the value "120" is transmitted in the amount field.

Business Payment Information

isyOdmB

lg

Complex:IsyeriOd emeBilgileri

O

Fields that can be used in business payments.

In the QR code business payment flow, since these fields come filled, they can be sent optionally.

It is included in the request if at least one of the Business Payment Information fields is filled.

> Business Category

Code isyKtgKo d

N4 O

Merchant Category Code (MCC) of the transaction in compliance with ISO 18245:2003.

Can be filled for payment transactions with Payment Purpose = '06' or '04'.

API Principles and Rules|February 2022 62

Field Name

JSON

Field Name

Format: Data model Name

Mandatory /

Conditional /

Optional

Description

Checks and operations to be performed by HHS during the creation of payment order consent

> Sub-Business

Category Code altIsyKtg

Kod

N4 O

If the transaction is performed from a sub-business, the Merchant Category Code (MCC) in compliance with ISO 18245:2003.

>Member Business Unique

Identity genelUy eIsyeriN o

AN8 O

Global merchant number (GlobalMerchantId) generated by BKM for the Business registered in the business registry system. If less than 8 digits, '0' must be added at the beginning.

Example value '01630618'

API Principles and Rules|February 2022 63

SUCCESSFUL RESPONSE:

The "OdemeEmriRizasi" object constituting the RESPONSE body (BODY) of the POST operation consists of the parameters in Table-8:

Table 8: "OdemeEmriRizasi" object

Field Name

JSON Field

Name

Format

Mandatory /

Conditional /

Optional

Description

Consent Information rzBlg

Complex:

RizaBilgileri

M

> Consent No rizaNo AN1..128 M

Unique identifier assigned by the HHS resource server during the creation of the OdemeEmriRizasi object

> Creation Time olusZmn ISODateTime M Creation time of the OdemeEmriRizasi object

> Update Time gnclZmn ISODateTime M Update time of the OdemeEmriRizasi object

> Consent Status rizaDrm AN1 M Takes one of the values of the TR.OHVPS.DataCode.RizaDurumu enumerated data type.

> Consent Cancellation Detail Code rizaIptDtyKod AN2 C

Mandatory when the consent status is cancelled. The values it can take are detailed in Section 4.

Participant Information katilimciBlg

Complex:Katilimci

Bilgisi

M

Code information assigned to participants.

>Account Service Provider

Code hhsKod AN4 M

Code of the Account Service Provider to which the request is sent. (Institution code holding the payment account. For example, Bank, Electronic Money Institution and Payment Institution)

API Principles and Rules|February 2022 64

Field Name

JSON Field

Name

Format

Mandatory /

Conditional /

Optional

Description

> Authorized Payment Service

Provider Code yosKod AN4 M

Code of the Authorized Payment Service Provider (YOS) sending the request

SCA gkd Complex:Gkd M

> Authorization Method yetYntm AN1 M Takes one of the values of the TR.OHVPS.DataCode.GkdTur enumerated data type.

> Redirection Address yonAdr AN1..1024 C Mandatory for redirect strong authentication.

> Notification Address bldAdr AN1..1024 C Mandatory for decoupled strong authentication.

> HHS Redirection Address hhsYonAdr AN1..1024 C

Address of the redirection page to be opened from the application for entering SCA verification information

> Authorization

Completion Time

yetTmmZmn ISODateTime M

Indicates the last time the authorization flow must be completed. HHS creates a timestamp such that the transaction is completed within a maximum of 5 minutes. When timeout occurs, HHS must return an error message such that it does not allow SCA.

It is the period until the consent status changes to Authorized status.

Payment Initiation odmBsltm

Complex:OdemeB aslatma

M

> Identity kmlk Complex:Kimlik M

API Principles and Rules|February 2022 65

Field Name

JSON Field

Name

Format

Mandatory /

Conditional /

Optional

Description

>> Identity Type kmlkTur AN1 C Takes one of the values of the TR.OHVPS.DataCode.KimlikTur enumerated data type.

>> Identity Data kmlkVrs AN1..30 C

Identifier used in user verification at HHS.

Its length and format vary according to the TR.OHVPS.DataCode.KimlikTur value.

>> Institution Identity Type krmKmlkTur AN1 C

Institution identity type used for the legal entity under which OHK is defined in payments made on behalf of the institution.

Takes one of the values of the TR.OHVPS.DataCode.KurumKimlikTur enumerated data type.

>> Institution Identity Data krmKmlkVrs AN1..30 C

Institution identity data used for the legal entity under which OHK is defined in payments made on behalf of the institution.

Its length and format vary according to the TR.OHVPS.DataCode.KurumKimlikTur value.

>> Payment Service

User Type ohkTur AN1 M

Takes one of the values of the TR.OHVPS.DataCode.OhkTur enumerated data type (B: Individual, K: Corporate)

> Transaction Amount islTtr Complex:Amount M

>> Currency prBrm AN3 M

Currency.

In the QR code flow, the Amount data defined in field 53: (Currency) in the FAST QR Code Data Organization is used.

>> Amount ttr N1..18 M

Amount confirmed by OBHS from the user on the front end.

In the QR code flow, the Amount data defined in field 54: (Amount) in the FAST QR Code Data Organization is used.

API Principles and Rules|February 2022 66

Field Name

JSON Field

Name

Format

Mandatory /

Conditional /

Optional

Description

For example, for 1.20 TRY, the value "120" is transmitted in the amount field.

> Sender gon Complex:Account O

>> Title unv AN3..140 O

Title of the sender.

HHS may obtain this information from its own system instead of the data coming from the OBHS system when transmitting to FAST.

>> Account Number

hspNo AN26 O

IBAN selected by OBHS from previously recorded accounts on the front end or entered by the customer.

If not transmitted by OBHS, the sender account information can be selected by the customer on the HHS digital channel after SCA. For this purpose, HHS must be selected in the OBHS interface.

The Account Number selected on the HHS screen after SCA cannot be returned in the response of the POST operation, but can be returned with an optional GET query.

If Account Reference is used, Account Number may not be used.

>> Account Reference hspRef AN5..40 O

Unique identifier (uuid) assigned by HHS for the account. It does not need to differ per YOS.

In the case where OBHS is also HBHS, payment can also be initiated via the reference of an account for which customer consent has been established.

The Account Reference selected on the HHS screen after SCA cannot be returned in the response of the POST operation, but can be returned with an optional GET query.

API Principles and Rules|February 2022 67

Field Name

JSON Field

Name

Format

Mandatory /

Conditional /

Optional

Description

If Account Number is used, Account Reference may not be used.

> Recipient alc Complex:Account M

>> Title unv AN3..140 M

In the Easy Address Recipient Query, it is the masked name-surname or masked commercial title information of the recipient who has registered the address returned as a result of a successful query. The "account owner" field returned from Kolas must be used.

If it is not an easy address, it is the title information transmitted by OBHS in the request message.

>> Account Number hspNo AN26 M

It is the masked IBAN information of the recipient transmitted by OBHS in the request message and verified or returned as a result of a successful query in the Easy Address Recipient Query.

>> Easy Address kolas Complex:Kolas C

>>> Kolas Type kolasTur AN1 M

Takes one of the values of the TR.OHVPS.DataCode.KolasTur enumerated data type.

If Recipient Account Number is not entered, its use is mandatory and it is used together with the Easy Address Type field.

>>> Kolas Value kolasDgr AN7..50 M

Easy Address value added by the customer and verified by HHS (FAST participant). The values it can take are defined in the BKM "Easy Addressing System Application Rules" document.

If Account Number is not entered, its use is mandatory and it is used together with the Easy Address Type field.

API Principles and Rules|February 2022 68

Field Name

JSON Field

Name

Format

Mandatory /

Conditional /

Optional

Description

>>> KOLAS Reference

Number kolasRefNo N12 M

Reference number returned as a result of a successful query in the Easy Address Recipient Query, defined in the BKM Easy Addressing System Application Rules, generated specifically for the relevant query by KOLAS.

>>> KOLAS Account Type kolasHspTur AN1 M

Account type information returned as a result of a successful query in the Easy Address Recipient Query, defined in the BKM Easy Addressing System Application Rules:

Takes one of the values of the TR.OHVPS.DataCode.KolasHspTur enumerated data type.

> QR Code kkod Complex:Karekod C

>> Flow Type aksTur AN2 M

Takes one of the values of the TR.OHVPS.DataCode.KareKodAksTur enumerated data type.

Not used together with Easy Address System.

>> Reference kkodRef AN1..12 C

Indicates the QR code reference number.

>> Producer Code kkodUrtcKod AN4 M

QR code producer code.

Payment Service Providers and payment system operators deemed appropriate by TCMB will be able to obtain a QR code producer code by applying to BKM for registration to generate TR QR codes. Banks will use EFT codes and do not need to register separately. Values shorter than 4 digits must be completed with '0' character on the left.

API Principles and Rules | February 2022 69

Field NameJSON Field NameFormatMandatory / Conditional / OptionalDescription
> Payment DetailsodmAyrComplex:OdemeAyrintilariM 
>> Payment SourceodmKynkAN1MSpecifies the source that initiated the payment. Takes one of the sequential data values of TR.OHVPS.DataCode.OdemeKaynak.
>> Payment PurposeodmAmcAN2MTakes one of the sequential data values of TR.OHVPS.DataCode.OdemeAmaci. In the QR code flow, the Payment Purpose data defined in field 62-08 of the FAST QR Code Data Organization is used.
>> Reference InformationrefBlgAN1..140CReference Information field specific to the payment. Mandatory if not a QR code transaction. - In person-to-person fund transfers: reference information uniquely created for the PSU within the day - In e-commerce transactions: order/tracking number/customer/subscriber number - In QR code flow, one of the following data defined in the FAST QR Code Data Organization is used: - Invoice Number defined in field 62-01 - Customer Number defined in field 62-06
>> DescriptionodmAcklmAN1..50OTransaction description information that the AISP receives from the PSU or assigns itself.
>> PSU Message FieldohkMsjAN1..200OMessage forwarded by the HHS to be shown to the PSU.

API Principles and Rules | February 2022 70

Field NameJSON Field NameFormatMandatory / Conditional / OptionalDescription
>> Payment SystemodmStmAN1MTakes one of the sequential data values of TR.OHVPS.DataCode.OdemeSistemi.
>> Expected Payment TimebekOdmZmnISODateTimeCIf the payment system to which the transaction is directed is PÖS and outside PÖS transaction hours, this is the first time the transaction can be performed. This field is intended for future-dated payments. It is considered unnecessary to fill in the first phase.
> AISP Fee AmountobhsMsrfTtrComplex:TutarO 
>> CurrencyprBrmAN3MCurrency (TRY, USD, EUR, etc.).
>> AmountTtrN1..18MThe fee amount that the AISP indicates to be debited from the PSU related to the transaction. Must be in the same currency as the Transaction Amount. For example, for 1.20 TRY, the value "120" is sent in the amount field.
> HHS Fee AmounthhsMsrfTtrComplex:TutarO 
>> CurrencyprBrmAN3MCurrency (TRY, USD, EUR, etc.).
>> AmountTtrN1..18MThe fee amount that the HHS indicates to be debited from the PSU related to the transaction. Must be in the same currency as the Transaction Amount. For example, for 1.20 TRY, the value "120" is sent in the amount field.
Merchant Payment InformationisyOdmBlgComplex:IsyeriOdemeBilgileriOThese are fields that can be used in merchant payments. In the QR code merchant payment flow, these fields can be sent optionally since they come filled.

API Principles and Rules | February 2022 71

Field NameJSON Field NameFormatMandatory / Conditional / OptionalDescription
    If at least one of the isyOdmBlg fields is filled, it is included in the response.
> Merchant Category CodeisyKtgKodN4OMerchant Category Code (MCC) compatible with ISO 18245:2003 for the transaction. Can be filled for payment transactions with Payment Purpose = '06' or '04'.
> Sub-Merchant Category CodealtIsyKtgKodN4OIf the transaction is performed from a sub-merchant, the Merchant Category Code (MCC) compatible with ISO 18245:2003.
> Member Merchant Unique IdentitygenelUyeIsyeriNoAN8OThe global merchant number (GlobalMerchantId) generated by BKM for the Merchant registered in the merchant registry system. If less than 8 digits, '0' must be added to the beginning. Example value '81630618'.

API Principles and Rules | February 2022 72

6.3. STEP 2 - Authorization of Payment Order Consent

Figure 6: Authorization of Payment Order Consent

The AISP forwards the request for the PSU to authorize the payment order. Authorization of the payment order is performed via the Redirect or Decoupled SCA method carried out by the HHS.

o In the redirect verification flow, the AISP redirects the PSU to the HHS.

-The redirect by the AISP includes the RizaNo from the previous step.
-By including the RizaNo in the redirect, the HHS can associate which payment order the redirect is related to.
-The HHS operates the SCA process for the PSU.

If the PSU verifies,

-The PSU selects the debtor account (if not selected in the previous step).
-The HHS updates the status of the payment order consent resource to "Authorized".
-The HHS redirects the PSU to the redirect address defined by the AISP with the "positive redirect flow":

yonAdr?rizaDrm=Y&yetKod=xx&rizaNo=yy&rizaTip=O&drmKod=zzz

If the PSU cannot verify,

-The HHS updates the status of the payment order consent resource to "Authorization Cancelled".
-The HHS redirects the PSU to the redirect address defined by the AISP with the "negative redirect flow":

yonAdr?rizaDrm=I&rizaNo=yy&rizaTip=O&drmKod=zzz

There may be situations where an error occurring on the HHS side needs to be transferred to the TPP. In this case, the error code parameter must be mandatorily sent in the redirect address.

API Principles and Rules | February 2022 73

What the error descriptions may be and how the TPP will display this error in its own application are described below.

yonAdr?rizaDrm=I&rizaNo=yy&rizaTip=O&rizaIptDtyKod=11&drmKod=zzz

The "Consent Cancellation Detail Code" sent in the URL is designed to be the same as the error codes specified in the Consent statuses section (Section 4). The checks to be performed during SCA are detailed in section 5.3.

o In the decoupled verification flow, the HHS requests the PSU to verify the transaction in a "verification" application that may be different from the application where the payment order was initiated.

-The decoupled flow is initiated by the AISP sending an authorization request using a different channel.
-This authorization request carries the relevant data to find the PSU to match the payment order consent to be authorized.
-The HHS verifies the PSU.
-The PSU selects the account to be debited (if not selected in the previous step).
-The HHS updates the status of the payment order consent resource to "Authorized".

After successful SCA (rizaDrm='Y'), following the receipt of the authorization code (yetKod) for the relevant consent object (a specific rizaNo), a POST call is made to the access token access address to obtain the access token and refresh token in exchange for the authorization code. The POST /access-token endpoint is described in ANNEX-3.

After the access token is obtained; the HHS updates the status of the payment order consent resource to "Authorization Used".

6.4. STEP 2.1 – Querying Payment Order Consent (optional)

During the successful completion of the SCA process and authorization of the Payment Order Consent, there may be cases where the sender account selection is made on the HHS screen. In such cases, since the sender account information field is mandatory in the payment order request, the sender account information (account number and/or account reference) must be obtained by querying the OdemeEmriRizasi object. The HHS enables the PSU to choose among accounts in the "STEP 2 - Authorization of Payment Order Consent" flow and writes the selected account information to the OdemeEmriRizasi object.

API Principles and Rules | February 2022 74

Figure 7: Querying the "odemeEmriRizasi" object (optional)

GET /odeme-emri-rizasi/{RizaNo}

The AISP may optionally retrieve the status of a created OdemeEmriRizasi resource to check its current status.

Status

The status indicators that can be used for the OdemeEmriRizasi resource are as follows:

-Awaiting Authorization
-Authorized
-Authorization Used
-Authorization Converted to Payment Order
-Authorization Terminated
-Authorization Cancelled

Payment order consent status changes are detailed in section 4.2.

SUCCESSFUL RESPONSE:

In the body (BODY) of the GET /odeme-emri-rizasi/{RizaNo} response (RESPONSE), the "OdemeEmriRizasiIstegi" object is used. If the request is successful, an "OdemeEmriRizasi" containing the parameters in Table-8 is created on the HHS resource server.

In the flow where the Sender Account Information is selected from the HHS screen after STEP 2 (Authorization of Payment Order Consent), the "OdemeEmriRizasi" object is updated and the AISP must make a GET /odeme-emri-rizasi/{RizaNo} request to retrieve the "OdemeEmriRizasi" object including the updated sender account information.

API Principles and Rules | February 2022 75

6.5. STEP 3 - Creation of Payment Order

Figure 8: Creation of Payment Order

POST /odeme-emri

o After the PSU authorizes the transaction with Strong Customer Authentication, the AISP creates the OdemeEmri resource.

o The payment order (OdemeEmri) is initiated by making a POST request to the appropriate payment source.

-The POST is processed by the HHS: If RizaDurumu is "Authorization Used", the transaction is started.
-The request fields in POST /odeme-emri-rizasi and POST /odeme-emri are expected to be the same. The HHS must ensure this check. If the Sender Account Number and Recipient Account Number in the POST data belong to the same bank, the HAVALE workflow is used; otherwise, the FAST or PÖS workflow is used.
-The POST data is checked according to the model (field checks)
-Logical checks of the POST data are performed (IBAN check, cross-field checks)
-OdemeEmriDurumu is updated as "Realized" / "Sent" / "Not Realized".

o If the POST is successful, the OdemeEmri object, which also contains the OdemeEmriNo and OdemeEmriDurumu variables, is returned to the AISP and the value of the RizaDurumu variable is updated to "Authorization Converted to Payment Order".

API Principles and Rules | February 2022 76

SUCCESSFUL REQUEST:

Table 9: "OdemeEmriIstegi" object

Field NameJSON Field NameFormatMandatory / Conditional / OptionalDescriptionChecks and operations to be performed by the HHS during payment order creationFAST A01 PÖS M01 message mapping
Consent InformationrzBlgComplex:RizaBilgileriM   
> Consent NorizaNoAN1..128MA unique identifier assigned by the HHS resource server during the creation of the OdemeEmriRizasi object.  
> Creation TimeolusZmnISODateTimeMCreation time of the OdemeEmriRizasi object  
> Consent StatusrizaDrmAN1MTakes one of the values of the TR.OHVPS.DataCode.RizaDurumu sequential data type.  
Participant InformationkatilimciBlgComplex:KatilimciBilgisiMCode information assigned to participants.  
> Account Servicing Payment Service Provider CodehhsKodAN4MThe code of the Account Servicing Payment Service Provider to which the request is sent. (The code of the institution with which the PSU holds an account. For example, Bank, Electronic Money Institution, and Payment Institution) The HHS checks that hhsKod belongs to itself and is the same as the x-aspsp-code value in the request header. In case of error, returns TR.OBHS.Connection.InvalidASPSP error code.Sender participant code (i.e., the bank's Participant code in FAST/PÖS) 
> Authorized Payment Service Provider CodeyosKodAN4MThe code of the Authorized Payment Service Provider (AISP) sending the request. The HHS checks that yosKod is a valid Payment Service Provider Code and is the same as the x-tpp-code value in the request header. In case of error, returns TR.OBHS.Connection.InvalidTPP error code.YosKod 
SCAGkdComplex:GkdM   
> Authorization MethodyetYntmAN1MTakes one of the values of the TR.OHVPS.DataCode.GkdTur sequential data type.  
> Redirect AddressyonAdrAN1..1024CMandatory for redirect strong customer authentication.  
> Notification AddressbldAdrAN1..1024CMandatory for decoupled strong customer authentication.  

API Principles and Rules | February 2022 77

Field NameJSON Field NameFormatMandatory / Conditional / OptionalDescriptionChecks and operations to be performed by the HHS during payment order creationFAST A01 PÖS M01 message mapping
> HHS Redirect AddresshhsYonAdrAN1..1024CThe address of the redirect page to be opened from the application so that SCA verification information can be entered.  
> Authorization Completion TimeyetTmmZmnISODateTimeMIndicates the latest time by which the authorization flow must be completed. This is the period until the consent status changes to Authorized.  
Payment InitiationodmBsltmComplex:OdemeBaslatmaM   
> IdentitykmlkComplex:KimlikM   
>> Identity TypekmlkTurAN1MTakes one of the values of the TR.OHVPS.DataCode.KimlikTur sequential data type. Mandatory for payments within the framework contract. Must be the same as the Identity Number Type data in the Payment Order Consent object. In payments made on behalf of an institution (commercial), the identity type of the user acting on behalf of the institution must be sent in this field. GonKimN / Psp
>> Identity DatakmlkVrsAN1..30MThe identifier used in user verification at the HHS. Its length and format vary according to the TR.OHVPS.DataCode.KimlikTur value. Mandatory for payments within the framework contract. The HHS must apply cross-checks on the Identity Data if sent by the AISP and perform SCA based on the Identity Data. Must be the same as the Identity Number data in the Payment Order Consent object. In payments made by natural persons, 1. The HHS sends the Sender Name and Sender Account Number in the payment order request (Havale/FAST/PÖS). - The Sender Name and all other customer information are obtained via the Identity Number. Checks regarding passport number should be handled in the same way as the data, flow, and other regulations currently used by the HHS. In payments made on behalf of an institution (commercial), the identity data of the user acting on behalf of the institution must be sent in this field.  
>> Institution Identity TypekrmKmlkTurAN1CThe institution identity type used for the legal entity under which the PSU is defined in payments made on behalf of an institution. Takes one of the values of the TR.OHVPS.DataCode.KurumKimlikTur sequential data type. Mandatory for payments made on behalf of an institution (commercial). Must be the same as the Institution Identity Type data in the Payment Order Consent object. GonKimN / VKN
>> Institution Identity DatakrmKmlkVrsAN1..30CThe institution identity data used for the legal entity under which the PSU is defined in payments made on behalf of an institution. Its length and format vary according to the TR.OHVPS.DataCode.KurumKimlikTur value. Mandatory for payments made on behalf of an institution (commercial). Must be the same as the Institution Identity Data in the Payment Order Consent object.  
>> Payment Service User TypeohkTurAN1MTakes one of the values of the TR.OHVPS.DataCode.OhkTur sequential data type (B: Individual, K: Corporate). Takes the value K in payments made on behalf of an institution. It is cross-checked that the Institution Identity Type and Institution Identity Data fields are filled. Must be the same as the PSU Type in the Payment Order Consent object.  
> Transaction AmountislTtrComplex:TutarM   
>> CurrencyprBrmAN3MCurrency. In the QR code flow, the Amount data defined in field 53: (Currency) of the FAST QR Code Data Organization is used. Must be the same as the Currency data in the Payment Order Consent object. Ttr
>> AmountttrN1..18MThe amount for which the AISP received confirmation from the user on the front end. In the QR code flow, the Amount data defined in field 54: (Amount) of the FAST QR Code Data Organization is used. For example, for 1.20 TRY, the value "120" is sent in the amount field. Must be the same as the Transaction Amount data in the Payment Order Consent object. The HHS must carry the transaction amount exactly in the payment message (Havale/FAST/PÖS).  
> SendergonComplex:HesapM   
>> NameunvAN3..140MName and surname or commercial title information of the sender. HHS and AISP data must be consistent. If the AISP data and HHS data differ, it is recommended to use this as input to risk assessment systems. GonAd
>> Account NumberhspNoAN26CIBAN that the AISP has the user select/enter on the front end. At least one of the Account Number or Account Reference fields must be filled. Must be the same as the Sender Account Number data in the Payment Order Consent Response object. GonHesN
>> Account ReferencehspRefAN5..40CIn the case where the AISP is also an AISP, payment can also be initiated via the reference of an account for which customer consent has been established. The Account Reference selected on the HHS screen after SCA cannot be returned in the response of the POST operation but can be returned with an optional GET query. If Account Number is used, Account Reference may not be used.  
> RecipientalcComplex:HesapM   
>> NameunvAN3..140MThe masked name-surname or masked commercial title information of the recipient who has registered the address returned as a result of the Easy Address query. If not an easy address, the title information sent by the AISP in the request message. If recipient name-surname information comes from the TPP and successfully passes the HHS's check, the HHS does not need to have the recipient name-surname information entered again. AlAd
>> Account NumberhspNoAN26MThe Recipient's Account Number field (IBAN). The masked IBAN information of the recipient who has registered the address returned in the Easy Address query. If not an easy address, the IBAN information sent by the AISP in the request message. Must be the same as the Recipient Account Number data in the Payment Order Consent Response object. If the checks are successful, the information is transferred directly to the FAST/PÖS AlHesN field and the Recipient HHS Code is used as the FAST/PÖS Participant Code (AlKK). In the QR code flow, the Merchant IBAN data defined in field 30-01 of the FAST QR Code Data Organization is used. As a result of the KOLAS query, the masked information sent in the payment order and the information returned from the KOLAS query held by the HHS in its own payment order consent request are masked and compared. If they are not the same, the transaction is terminated by returning the appropriate error code. AlHesN
>> Easy AddresskolasComplex:KolasC   
>>> Easy Address TypekolasTurAN1MThe Easy Address Type value that the customer requests to query. Takes one of the values of the TR.OHVPS.DataCode.KolasTur sequential data type. Mandatory if Recipient Account Number is not entered and used together with the Easy Address Type field. Must be the same as the Easy Address Type data in the Payment Order Consent Response object. FAST (KolasRef)
>>> Easy Address ValuekolasDgrAN7..50MThe Easy Address value added by the customer and verified by the HHS (FAST participant). The values it can take are defined in the BKM "Easy Addressing System Application Rules" document. Must be the same as the Easy Address Value data in the Payment Order Consent Response object. Mandatory if Recipient Account Number is not entered and used together with the Easy Address Type field.  
>>> Easy Address Reference NumberkolasRefNoN12MReference Information field specific to the payment. Mandatory if not a QR code transaction. - In person-to-person fund transfers: reference information uniquely created for the PSU within the day - In e-commerce transactions: order/tracking number/customer/subscriber number - In QR code flow, one of the following data defined in the FAST QR Code Data Organization is used: - Invoice Number defined in field 62-01 - Customer Number defined in field 62-06 Must be the same as the Reference Information data in the Payment Order Consent object. FAST: In transactions initiated with QR Code, it corresponds to the QR Code Reference (KrkdRef) field in the FAST A01 message. In this case, the FAST A01 message fields are created in accordance with the "FAST Message Structure and Transaction Types" document: The QR Code Flow Type (KrkdAksTur) and QR Code Reference (KrkdRef) fields in the QR Code (KrKd) section must be filled. In person-to-person fund transfers and e-commerce transactions, the Reference Information (RefBlg) field is filled. FAST (KrkdRef) and (RefBlg)
>>> Easy Address Account TypekolasHspTurAN1MThe account type information returned as a result of a successful query in the Easy Address Recipient Query, defined in the BKM Easy Addressing System Application Rules: Takes one of the values of the TR.OHVPS.DataCode.KolasHspTur sequential data type.  
> QR CodekkodComplex:KarekodC   
>> Flow TypeaksTurAN2MQR Code Flow Type indicates which flow the QR code payment is performed with. Not used together with the Easy Address System. 01: Merchant payment with dynamic verification service from FAST participant 02: Merchant payment with static verification service from FAST participant 03: Person-to-person payments Must be the same as the QR Code Flow Type data in the Payment Order Consent object. FAST: KrkdAksTur
>> ReferencekkodRefAN1..12CIndicates the QR code reference number. Mandatory if there is a reference value in the scanned QR code. Not used together with the Easy Address System. Must be the same as the QR Code Reference data in the Payment Order Consent object. For static QR codes without online verification service, in cases where the Reference number is not present, the expression "NONREF" is entered by the HHS. FAST: QR Code Reference (KrkdRef)
>> Producer CodekkodUrtcKodAN4MThe code of the QR code producer. Payment Service Providers and payment system operators deemed appropriate by the TCMB will be able to obtain a QR code producer code by applying to BKM to generate TR QR codes. Banks will use their EFT codes and do not need to register separately. Values shorter than 4 digits must be completed with '0' on the left side.  
> Payment DetailsodmAyrComplex:OdemeAyrintilariM   
>> Payment SourceodmKynkAN1MSpecifies the source that initiated the payment. Takes one of the sequential data values of TR.OHVPS.DataCode.OdemeKaynak. Must be the same as the Payment Source data in the Payment Order Consent object. Must be carried exactly by the HHS in the payment message (FAST/PÖS). FAST/PÖS: OdmKynk
>> Payment PurposeodmAmcAN2MTakes one of the sequential data values of TR.OHVPS.DataCode.OdemeAmaci. Must be the same as the Payment Purpose data in the Payment Order Consent object. Must be carried exactly by the HHS in the payment message (FAST/PÖS). FAST (OdmAmc) / PÖS (OdmAmaci)
>> Reference InformationrefBlgAN1..140CReference Information field specific to the payment. Mandatory if not a QR code transaction. FAST (KrkdRef) and (RefBlg)

API Principles and Rules|February 2022 89 message mapping

-In person-to-person fund transfers: Reference information that uniquely creates for the ÖHK within the day
-In e-commerce transactions: order/tracking number/customer/subscriber number
-In QR code flow, in the FAST QR Code Data Organization
-62-01: Invoice Number defined in the field
-62-06: Customer Number defined in the field one of the data is used.

>> Description odmAcklm AN1..50 O Transaction description information received by ÖBHS from ÖHK or assigned by itself.

FAST/PÖS Acklm

>> ÖHK Message Field ohkMsj AN1..200 O Message transmitted by HHS to be shown to ÖHK.

>> Payment System odmStm AN1 M Takes one of the sequential data values of TR.OHVPS.DataCode.OdemeSistemi.

Must be the same as the Payment System data in the Payment Order Consent Object.

API Principles and Rules|February 2022 90 message mapping

>> Expected Payment Time bekOdmZmnISODateTime C If the payment system to which the transaction is directed is PÖS and outside PÖS transaction hours, the first time information when the transaction can be performed

> ÖBHS Fee Amount obhsMsrfTtr Complex: Amount

O

>> Currency prBrm AN3 M Currency (TRY, USD, EUR, etc.). Must be the same as the ÖBHS Fee Currency data in the Payment Order Consent Object.

>> Amount ttr N1..18 M The fee amount that ÖBHS specifies for debiting the ÖHK related to the transaction.

Must be in the same currency as the Transaction Amount.

For example, for 1.20 TRY, the value "120" is transmitted in the amount field

Must be the same as the ÖBHS Fee Amount data in the Payment Order Consent Object.

> HHS Fee Amount hhsMsrfTtr Complex: Amount

Forms and report formats · 75 · 13 with the sentence that requires it

research, not legal advice

Similar documents from other regulators

CBRT published 2 documents in the last 30 days — get each new one by email the day it lands.

Source: Central Bank of Republic of Turkey — original document · Summary generated with machine assistance and checked by an AI reviewer before publication; the authoritative text is the regulator's original document. How RegAlert works

In RegAlert: added