Rule · 14 Feb 2022
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".
API Principles and Rules|February 2022 1
Table of Contents
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.1. Account Information Service Consent State Changes ...... 38
4.2. Payment Information Service Consent State Changes...... 40
API Principles and Rules|February 2022 2
6.6. STEP 3.1- Payment Order Query (Optional) ...... 102
GET /odeme-emri/{odemeEmriNo} ......102
SUCCESSFUL RESPONSE:......114
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.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
GET /hhs/{hhsKod}......153
GET /yos/{yosKod}......157
GET /health ......157
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
| Abbreviation | Definition | Description | English Description | English Abbreviation |
|---|---|---|---|---|
| ÇS | Framework Agreement | Agreement 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 | ||
| EPK | Electronic Money Institution | Legal entity authorized to issue electronic money within the scope of the Law | Electronic Money Institution | EMI |
| FAST | Instant and Continuous Transfer of Funds | Instant and Continuous Transfer of Funds System operated by the CBRT | ||
| FAST TRKarekod | FAST-TR QR Code Technical Principles and Rules Guide | Document containing detailed technical principles and rules regarding the use of TR QR Code in transactions to be realized through the FAST System | ||
| GKD | Strong Customer Authentication | Method 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 characteristic | Strong Customer Authentication | SCA |
| İB | Transaction Information | Information 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 | ||
| İDK | Transaction Verification Code | Information 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 changes | Authentication Code | AC |
| KOLAS | Easy Addressing Service | Layer 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 | ||
| HBHS | Account Information Service Provider | Legal entity providing the payment service (account information service) defined in Article 12, paragraph 1, subparagraph (g) of the Law | Account Information Service Provider | AISP |
| HHS | Account Servicing Provider | Payment service provider that holds a payment account | Account Servicing Payment Service Provider | ASPSP |
| ÖBHS | Payment Order Initiation Service Provider | Legal entity providing the payment service (payment order initiation service) defined in Article 12, paragraph 1, subparagraph (f) of the Law | Payment Initiation Service Provider | PISP |
| ÖDK | Payment Institution | Legal entity authorized under the Law to provide and execute payment services | Payment Institution | PI |
| ÖH | Payment Account | Account opened on behalf of the payment service user and used in the execution of the payment transaction | Payment Account | PA |
| ÖHK | Payment Service User (Customer) | Real or legal person benefiting from a specific payment service as sender, recipient, or both | Payment Service User | PSU |
| ÖHS | Payment Service Provider | Banks under Law No. 5411, EPK, ÖDK and PTT | Payment Service Provider | PSP |
| ÖHVPS | Payment Services Data Sharing Services | Data sharing services used in payment services specified in Article 12, paragraph 1, subparagraphs (f) or (g) of the Law | ||
| PÖS | Retail Payment System | Interbank Turkish Lira Transfer System operated by the CBRT, where transactions are realized in Turkish Lira | ||
| TRKarekod | TR-QR Code Principles and Rules | Document determining the national QR code (TR QR Code) principles and rules | ||
| YÖS | Authorized Payment Service Provider | Legal entity providing payment order initiation service and/or account information service | Third Party Payment Service Providers | TPP |
API Principles and Rules|February 2022 9
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):
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.
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
API Principles and Rules | February 2022 12
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.
APIs are developed in versions to meet potential future requirements and more complex use cases, and this is considered during design.
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
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.
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:
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.
Fixed text "ohvps" (abbreviation for Payment Services Data Sharing Services)
The resource group defines the endpoint group according to the payment service used to access the API (AIS, PIS) ("hbh" or "obh").
Refers to the API version ("/s[major-version].[minor-version]/").
Refers to resource details.
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:
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
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
https://apigw-prod.bkm.com.tr/api/main/ohvps/gkd/s1.0/erisim-belirteci
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.
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.
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.
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
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.
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.
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.
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).
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.
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.
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.
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.
APIs use two status codes serving two different purposes:
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
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
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
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:
1- Payment order consent creation
2- Access token creation
3- Payment order
4- Account information consent creation
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.
API Principles and Rules | February 2022 25
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
| HTTP Status | Request Result and Explanations | |
|---|---|---|
| P O S T | G E T | D E L E T E |
| 200 OK | Request Completed Successfully. Used for requests made to update a resource (e.g., PUT) and completed successfully. | H |
| 201 Created | Request Successful. The resource creation request (e.g., POST /payment-order-consent) concluded successfully. | E H H |
| 204 No Content | Deletion operation completed successfully. The resource deletion request (e.g., DELETE /account-consent/{ConsentNo}) concluded successfully. | H H E |
| 400 Bad Request | There 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: 400 | E |
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
The request was not authorized and access was denied because the authorization header is missing, incorrect or invalid.
httpCode: 401
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:
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"
The scope of the access token or consent does not match.
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."
If the HHS does not provide a valid API access address, it must respond with 404 (Not Found) for requests to that URL.
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
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
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
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
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"
The transaction was rejected because too many requests were made within a certain period of time.
API Principles and Rules | February 2022 34
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ı"
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
Service version has been deprecated.
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
The masking rules for data that must be transmitted masked are as follows:
For example: "FATİH SERKAN EREN" should be shown as "FA SE ER".
That the request is initiated by the user can be understood from the Payment Service User (PSU) fields in the Request Header.
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.
| Field Name | JSON Field Name | Format | Conditional / Optional | Description |
|---|---|---|---|---|
| status | status | AN2..20 | Z | Can 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.
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:
'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.
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.
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.
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.
The customer already has a consent given. The HHS first returns an error stating that consent cancellation should be made.
TR.OBHS.Resource.ConsentMismatch
The HHS may not be aware of situations where GKD does not occur.
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.
B → I / 07
B → I / 08
B →I / 10
B →I / 11
B→I / 12
B → I / 14
B → I / 15
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.
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
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 → 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
When the Last Date on which Access is Valid arrives, the consent status must be changed from Authorization Used to Authorization Terminated. K → S
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.
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
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
B → Y
The ASPSP may not be aware of cases where SCA did not occur.
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.
B → I / 07
B → I / 08
→I / 09
B →I / 10
→Authorization Cancelled
B →I / 11
B→I / 12
→ I / 13
→ I / 14
B → I / 15
B → I / 16
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
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
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.
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
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:
API Principles and Rules|February 2022 43
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é.
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:
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).
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.
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
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:
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.
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.
Field Name JSON Field Name Format Conditional / Optional Description status status AN2..20 Z Can take the values "UP", "DOWN".
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.
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.
API Principles and Rules|February 2022 46
ASPSP error description*
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
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.
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
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.
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.
API Principles and Rules|February 2022 48
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:
API Principles and Rules|February 2022 49
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
GET
GET /odemeemri/{odeme
EmriNo}
Z
Client
Identity
Information &
Authorization
Code (SCA)
Signed Response - OdemeEmri
o The AISP approves the payment order initiation transaction in the PISP application (web interface/mobile application).
API Principles and Rules|February 2022 50
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:
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 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.
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.
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
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
Field Name
JSON
Field Name
Format: Data model Name
Mandatory /
Conditional /
Optional
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.
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.
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
Checks and operations to be performed by HHS during the creation of payment order consent
yetYntm AN1 O
Takes one of the values of the TR.OHVPS.DataCode.GkdTur enumerated data type.
HHS uses the method it determines by taking into account the method determined by OBHS.
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
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.
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
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.
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.
For this purpose, HHS must be selected in the OBHS interface.
If transmitted by OBHS:
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.
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.
In the FAST-TR QR Code Data Organization;
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
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
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.
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
odmAyr
Complex:
OdemeAyrintilari
M
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.
refBlg AN1..140 C
Reference Information field specific to the payment. Mandatory if not a QR code transaction.
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.
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.
isyOdmB
lg
Complex:IsyeriOd emeBilgileri
O
Fields that can be used in business payments.
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.
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
The "OdemeEmriRizasi" object constituting the RESPONSE body (BODY) of the POST operation consists of the parameters in Table-8:
Field Name
JSON Field
Name
Format
Mandatory /
Conditional /
Optional
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.
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
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.
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
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.
hspNo AN26 O
IBAN selected by OBHS from previously recorded accounts on the front end or entered by the customer.
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.
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.
>> 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.
Values shorter than 4 digits must be completed with '0' character on the left.
API Principles and Rules | February 2022 69
| Field Name | JSON Field Name | Format | Mandatory / Conditional / Optional | Description |
|---|---|---|---|---|
| > Payment Details | odmAyr | Complex:OdemeAyrintilari | M | |
| >> Payment Source | odmKynk | AN1 | M | Specifies the source that initiated the payment. Takes one of the sequential data values of TR.OHVPS.DataCode.OdemeKaynak. |
| >> Payment Purpose | odmAmc | AN2 | M | Takes 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 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 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 |
| >> Description | odmAcklm | AN1..50 | O | Transaction description information that the AISP receives from the PSU or assigns itself. |
| >> PSU Message Field | ohkMsj | AN1..200 | O | Message forwarded by the HHS to be shown to the PSU. |
API Principles and Rules | February 2022 70
| Field Name | JSON Field Name | Format | Mandatory / Conditional / Optional | Description |
|---|---|---|---|---|
| >> Payment System | odmStm | AN1 | M | Takes one of the sequential data values of TR.OHVPS.DataCode.OdemeSistemi. |
| >> Expected Payment Time | bekOdmZmn | ISODateTime | C | If 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 Amount | obhsMsrfTtr | Complex:Tutar | O | |
| >> Currency | prBrm | AN3 | M | Currency (TRY, USD, EUR, etc.). |
| >> Amount | Ttr | N1..18 | M | The 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 Amount | hhsMsrfTtr | Complex:Tutar | O | |
| >> Currency | prBrm | AN3 | M | Currency (TRY, USD, EUR, etc.). |
| >> Amount | Ttr | N1..18 | M | The 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 Information | isyOdmBlg | Complex:IsyeriOdemeBilgileri | O | These 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 Name | JSON Field Name | Format | Mandatory / Conditional / Optional | Description |
|---|
| If at least one of the isyOdmBlg fields is filled, it is included in the response. | ||||
|---|---|---|---|---|
| > Merchant Category Code | isyKtgKod | N4 | O | Merchant 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 Code | altIsyKtgKod | N4 | O | If the transaction is performed from a sub-merchant, the Merchant Category Code (MCC) compatible with ISO 18245:2003. |
| > Member Merchant Unique Identity | genelUyeIsyeriNo | AN8 | O | The 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
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.
If the PSU verifies,
yonAdr?rizaDrm=Y&yetKod=xx&rizaNo=yy&rizaTip=O&drmKod=zzz
If the PSU cannot verify,
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.
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".
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
GET /odeme-emri-rizasi/{RizaNo}
Payment order consent status changes are detailed in section 4.2.
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
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.
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
| Field Name | JSON Field Name | Format | Mandatory / Conditional / Optional | Description | Checks and operations to be performed by the HHS during payment order creation | FAST A01 PÖS M01 message mapping |
|---|---|---|---|---|---|---|
| Consent Information | rzBlg | Complex:RizaBilgileri | M | |||
| > Consent No | rizaNo | AN1..128 | M | A 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 | ||
| > Consent Status | rizaDrm | AN1 | M | Takes one of the values of the TR.OHVPS.DataCode.RizaDurumu sequential data type. | ||
| Participant Information | katilimciBlg | Complex:KatilimciBilgisi | M | Code information assigned to participants. | ||
| > Account Servicing Payment Service Provider Code | hhsKod | AN4 | M | The 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 Code | yosKod | AN4 | M | The 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 | |
| SCA | Gkd | Complex:Gkd | M | |||
| > Authorization Method | yetYntm | AN1 | M | Takes one of the values of the TR.OHVPS.DataCode.GkdTur sequential data type. | ||
| > Redirect Address | yonAdr | AN1..1024 | C | Mandatory for redirect strong customer authentication. | ||
| > Notification Address | bldAdr | AN1..1024 | C | Mandatory for decoupled strong customer authentication. |
API Principles and Rules | February 2022 77
| Field Name | JSON Field Name | Format | Mandatory / Conditional / Optional | Description | Checks and operations to be performed by the HHS during payment order creation | FAST A01 PÖS M01 message mapping |
|---|---|---|---|---|---|---|
| > HHS Redirect Address | hhsYonAdr | AN1..1024 | C | The address of the redirect page to be opened from the application so that SCA verification information can be entered. | ||
| > Authorization Completion Time | yetTmmZmn | ISODateTime | M | Indicates the latest time by which the authorization flow must be completed. This is the period until the consent status changes to Authorized. | ||
| Payment Initiation | odmBsltm | Complex:OdemeBaslatma | M | |||
| > Identity | kmlk | Complex:Kimlik | M | |||
| >> Identity Type | kmlkTur | AN1 | M | Takes 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 Data | kmlkVrs | AN1..30 | M | The 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 Type | krmKmlkTur | AN1 | C | The 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 Data | krmKmlkVrs | AN1..30 | C | The 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 Type | ohkTur | AN1 | M | Takes 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 Amount | islTtr | Complex:Tutar | M | |||
| >> Currency | prBrm | AN3 | M | Currency. 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 | |
| >> Amount | ttr | N1..18 | M | The 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). | ||
| > Sender | gon | Complex:Hesap | M | |||
| >> Name | unv | AN3..140 | M | Name 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 Number | hspNo | AN26 | C | IBAN 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 Reference | hspRef | AN5..40 | C | In 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. | ||
| > Recipient | alc | Complex:Hesap | M | |||
| >> Name | unv | AN3..140 | M | The 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 Number | hspNo | AN26 | M | The 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 Address | kolas | Complex:Kolas | C | |||
| >>> Easy Address Type | kolasTur | AN1 | M | The 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 Value | kolasDgr | AN7..50 | M | The 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 Number | kolasRefNo | N12 | M | 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 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 Type | kolasHspTur | AN1 | M | The 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 Code | kkod | Complex:Karekod | C | |||
| >> Flow Type | aksTur | AN2 | M | QR 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 | |
| >> Reference | kkodRef | AN1..12 | C | Indicates 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 Code | kkodUrtcKod | AN4 | M | The 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 Details | odmAyr | Complex:OdemeAyrintilari | M | |||
| >> Payment Source | odmKynk | AN1 | M | Specifies 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 Purpose | odmAmc | AN2 | M | Takes 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 Information | refBlg | AN1..140 | C | Reference 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
>> 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
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
formHeader Names Format Notes Usage Status · X-Request-ID · AN1..36
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
formNo Resource HTTP · operation · Access Address Mandatory · / Optional · Authorization
No sentence in the document names this form.
Required by
“- The checks specified in Table 7 regarding the Sender Account Number must be performed.”OBHS sends a request to HHS via this API access address to create a new OdemeEmriRizasi
form>Account Service · Provider Code · hhsKod AN4 M
Required by
“| > Account Servicing Payment Service Provider Code | hhsKod | AN4 | M | Code of the Account Servicing Payment Service Provider to which the request is transmitted. (Code of the institution holding the payment 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 erro…”Table 12: "HesapBilgisiRizasiIstegi" object
formGKD gkd Complex:Gkd M · JSON · Field Name · Format: Data · model Name
No sentence in the document names this form.
form> Redirection · Address · yonAdr AN1..1024 C
No sentence in the document names this form.
formPayment Initiation odmBslt · Complex: · OdemeBaslatma
No sentence in the document names this form.
formMandatory / · Conditional / · Optional · Description · >> Institution Identity
No sentence in the document names this form.
form>> Institution Identity · Data · krmKmlk · Vrs · AN1..30 C
No sentence in the document names this form.
No sentence in the document names this form.
form> Sender gon Complex:Account O · >> Title unv AN3..140 O
No sentence in the document names this form.
form>> Account · Number hspNo AN26 O
No sentence in the document names this form.
form>> Account · Reference · hspRef AN5..40 O
No sentence in the document names this form.
form> Recipient alc Complex:Account M · >> Title unv AN3..140 C
No sentence in the document names this form.
No sentence in the document names this form.
form>> Account · Number · hspNo AN26 C
No sentence in the document names this form.
form>> Easy Address kolas Complex:Kolas C · >>> Kolas Type kolasTur AN1 M
No sentence in the document names this form.
formField Name · JSON · Format: Data · model Name
No sentence in the document names this form.
form>> Producer Code kkodUrtc · Kod · AN4 M
No sentence in the document names this form.
formJSON · Field Name · Format: Data · model Name · Mandatory /
No sentence in the document names this form.
form> Payment · Details · odmAyr · Complex: · OdemeAyrintilari · >> Payment
No sentence in the document names this form.
No sentence in the document names this form.
formBusiness Payment · Information · isyOdmB · Complex:IsyeriOd · emeBilgileri
No sentence in the document names this form.
form> Business Category · Code · isyKtgKo · N4 O
No sentence in the document names this form.
formTable 8: "OdemeEmriRizasi" object · Field Name · JSON Field · Name · Format · Mandatory /
Required by
“| > Account Servicing Payment Service Provider Code | hhsKod | AN4 | M | Code of the Account Servicing Payment Service Provider to which the request is transmitted. (Code of the institution holding the payment 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 erro…”Table 12: "HesapBilgisiRizasiIstegi" object
formJSON Field · Name · Format · Mandatory / · Conditional /
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
formField Name · JSON Field · Name · Format · Mandatory /
No sentence in the document names this form.
form>> Easy Address kolas Complex:Kolas C · >>> Kolas Type kolasTur AN1 M
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
formField Name · JSON Field Name · Format · Mandatory / Conditional / Optional · Description
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
Required by
“- In the body (BODY) of the POST /hesap-bilgisi-rizasi request (REQUEST), the "HesapBilgisiRizasıIstegi" object (Table-12) is used.”Figure 11: Preparation of Account Information Customer Consent
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
Required by
“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 receive the access token and refresh token in return for the authorization code.”Figure 12: Establishment of Account Information Customer Consent
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
No sentence in the document names this form.
research, not legal advice
Note from RegAlert. AI assistants can read this document in full, and search 70,000+ more, through the RegAlert MCP connector (https://mcp.regalert.today/mcp). How to connect ChatGPT, Claude or Cursor.
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