{ "openapi": "3.0.0", "info": { "title": "Open Banking: Bank API", "description": "API documentation for OBB Bank services.", "version": "2.0.0" }, "servers": [ { "url": "%bank_api_url%/bank/v2" } ], "tags": [ { "name": "Authorization" }, { "name": "Payment" }, { "name": "Performance" } ], "paths": { "/init_authorization": { "post": { "summary": "Initiate authorization", "description": "The \"Initial authorization\" is the part of the [Authorization flow](#appendix--workflow--authorization) between the BANK and TOB. The BANK sends `POST /init_authorization` request to TOB immediately after the user reaches the BANK. The TOB responds with the TPP and necessary consent information and adds the URL that needs to be used if the BANK does not want to provide access.\n", "tags": ["Authorization"], "requestBody": { "description": "Request for initial authorization", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InitAuthorizationRequest" } } } }, "responses": { "200": { "description": "A successful response with the TPP and necessary consent information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InitAuthorizationResponse" } } } } } } }, "/consent": { "post": { "summary": "Save consent", "description": "\"Save consent\" is the part of the [Authorization flow](#appendix--workflow--authorization) between the BANK and TOB. BANK sends the request with the consents (scopes) and accounts for which the consents were approved. When TOB gets a request from the BANK, it responds with the callback URL and the token.", "tags": ["Authorization"], "requestBody": { "description": "A request to save approved consents and accounts for which consents were approved.", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveConsentRequest" } } } }, "responses": { "200": { "description": "Successful response with the callback URL and generated token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SaveConsentResponse" } } } } } } }, "/token/revoke": { "post": { "summary": "Revoke token", "description": "A request with a currently used access token is used to revoke the PSU token.\n", "tags": ["Authorization"], "requestBody": { "description": "A Request with a currently used access token to revoke the PSU token.", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevokeTokenRequest" } } } }, "responses": { "200": { "description": "Token revoked successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevokeTokenResponse" } } } } } } }, "/daily_performance": { "post": { "summary": "Daily Performance", "description": "The Bank should inform the TOB each day about the daily performance average on consent authorization and payment confirmation flows.\n", "tags": ["Performance"], "requestBody": { "description": "Daily performance data request", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DailyPerformanceRequest" } } } }, "responses": { "200": { "description": "Daily performance metrics retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DailyPerformanceResponse" } } } } } } }, "/payments/status": { "post": { "summary": "Payment Status", "description": "In case of payment status changes, the Bank should inform TPP of it by calling this endpoint.\n", "tags": ["Payment"], "requestBody": { "description": "The payload containing payment status information.", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentStatusRequest" } } } }, "responses": { "200": { "description": "Payment status updated successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentStatusResponse" } } } } } } } }, "components": { "schemas": { "InitAuthorizationRequest": { "type": "object", "properties": { "requestUrl": { "type": "string", "description": "The URL with Oauth2 authorization information.", "example": "https://bank.example.com/obb/authorize?client_id=gt34tg3tg34tg&redirect_uri=http%3A%2F%2Ftpp.example.com%2Ftoken&state=1111111&response_type=code&scope=account.list+account.details" } }, "required": ["requestUrl"] }, "InitAuthorizationResponse": { "type": "object", "properties": { "tppName": { "type": "string", "description": "The TPP name." }, "tppRegistrationNumber": { "type": "string", "description": "The TPP registration number.", "example": "UK-145441" }, "scopes": { "type": "array", "items": { "type": "string", "description": "Scopes to be approved." } }, "cancelUrl": { "type": "string", "description": "The URL for canceling authorization." } } }, "SaveConsentRequest": { "type": "object", "properties": { "scopes": { "type": "array", "items": { "type": "string", "description": "A list of approved consents." } }, "requestUrl": { "type": "string", "description": "The used authorization URL.", "example": "https://bank.example.com/obb/authorize?client_id=gt34tg3tg34tg&redirect_uri=http%3A%2F%2Ftpp.example.com%2Ftoken&state=1111111&response_type=code&scope=account.list+account.details" }, "ibans": { "type": "array", "items": { "type": "string", "description": "A list of IBANs approved by the scope." } }, "accountIds": { "type": "array", "items": { "type": "string", "description": "A list of account IDs approved by the scope." } }, "accountNumbers": { "type": "array", "items": { "type": "string", "description": "A list of account numbers approved by the scope (possibly in combination with sort codes)." } } } }, "SaveConsentResponse": { "type": "object", "properties": { "callbackUrl": { "type": "string", "description": "A callback URL to redirect the user back to the TPP.", "example": "https://tpp.example.com/signed" }, "accessToken": { "type": "string", "description": "A generated token used for accessing user data.", "example": "$#@%#$%^$@#$56445641653!@#$%3" }, "validUntil": { "type": "string", "description": "The expiration date of the token.", "example": "2020-10-13T12:54:58+00:00" } } }, "RevokeTokenRequest": { "type": "object", "properties": { "accessToken": { "type": "string", "description": "An access token used with PSU account(s).", "example": "defdb58e7a412c74ff9ee692ce9abe3f36d900676edf07ce90cdb30f1529a1e3c0209515a81d2a314f7e740415b1f0fa691e38fecdd380d7d1924f97300aa3232ce1a76e56c59b081e604003a2382b0b67f32500a70cb33af319e4668277a0ad7c72bf8b85708fd530591514d270dd8faa43349d251288ddb6a3a524d0aad6" } } }, "RevokeTokenResponse": { "type": "object", "properties": { "status": { "type": "string", "description": "Confirms token revocation by returning the success status.", "example": "success" } } }, "PaymentStatusRequest": { "type": "object", "properties": { "paymentId": { "type": "string", "description": "The Payment ID." }, "paymentStatus": { "type": "string", "description": "The Payment Status." } }, "required": ["paymentId", "paymentStatus"] }, "PaymentStatusResponse": { "type": "object", "properties": { "status": { "type": "string", "description": "Confirms the correct response by returning the success status." } } }, "DailyPerformanceRequest": { "type": "object", "properties": { "date": { "type": "string", "description": "The specific date for which the duration data is being submitted.", "example": "2023-11-27" }, "consentDuration": { "type": "integer", "description": "The average time, in milliseconds, taken for users to confirm consent in the process.", "example": 51144 }, "paymentDuration": { "type": "integer", "description": "The average time, in milliseconds, taken for users to complete the payment confirmation step.", "example": 21215 } }, "required": ["date"] }, "DailyPerformanceResponse": { "type": "object", "properties": { "status": { "type": "string", "description": "Confirms the correct response by returning the success status." } } } } } }