AUTHENTICATION ACCOUNT BANK TRANSACTION TRANSACTION REQUEST OAUTH2 Open Bank Project + OAuth2 Server Specification (v1.0) Download OpenAPI specification: Download Contact: Easypay / Open Bank Project tec@easypay.pt Terms conditions and legal terms Privacy Policy EasyPay's implemetation of OBP (Open Source API for Banks) To start using this API, you'll need to submit your application first. You need to provide the following details: - Application Name - Redirect URL to be used by the OAuth2 system - Scopes that you'll be needing to retrieve/submit information via this API (you can find the available scopes on the Authentication menu) You can also use our OpenID implementation to get the configuration details Authentication OAuth2 Security scheme type: OAuth2 OAuth2 Flow accessCode Authorization URL https://banking-api.test.easypay.pt/oauth2/auth Token URL https://banking-api.test.easypay.pt/oauth2/token OAuth2 Scopes read:account Read account details read:transaction Read transaction details write:transaction Create transactions challenge:transaction Challenge transactions Account Get Account by Id (Core) OAuth2 scopes required: read:account PARAMETERS Path Parameters ? ACCOUNT_ID string Required The account id BANK_ID string Required The bank id Responses 200 Success 400 Error GET /obp/v3.1.0/my/banks/{BANK_ID}/accounts/{ACCOUNT_ID}/account RESPONSE SAMPLES 200 Success 400 Error { "label": "string", "owners": [ { } ], "type": "string", "balance": { "amount": "100", "currency": "EUR" }, "account_rules": [ { } ], "bank_id": "string", "number": "string", "account_routings": [ { } ], "id": "f8b202f4-079d-43ef-9fc0-2c825d21e2e9" } Get Accounts at Bank (IDs only). OAuth2 scopes required: read:account PARAMETERS Path Parameters ? BANK_ID string Required The bank id Responses 200 Success 400 Error GET /obp/v3.1.0/banks/{BANK_ID}/accounts/account_ids/private RESPONSE SAMPLES 200 Success 400 Error { "accounts": [ { } ] } Get Accounts at Bank (Minimal). OAuth2 scopes required: read:account PARAMETERS Path Parameters ? BANK_ID string Required The bank id Responses 200 Success 400 Error GET /obp/v3.1.0/banks/{BANK_ID}/accounts/private RESPONSE SAMPLES 200 Success 400 Error { "accounts": [ { } ] } Get Accounts Held OAuth2 scopes required: read:account PARAMETERS Path Parameters ? BANK_ID string Required The bank id Responses 200 Success 400 Error GET /obp/v3.1.0/banks/{BANK_ID}/accounts-held RESPONSE SAMPLES 200 Success 400 Error { "accounts": [ { } ] } Bank Get Transaction Types at Bank OAuth2 scopes required: read:transaction PARAMETERS Path Parameters ? BANK_ID string Required The bank id Responses 200 Success 400 Error GET /obp/v3.1.0/banks/{BANK_ID}/transaction-types RESPONSE SAMPLES 200 Success 400 Error { "transaction_types": [ { } ] } Transaction Get Transactions for Account (Core) OAuth2 scopes required: read:account, read:transaction PARAMETERS Path Parameters ? BANK_ID string Required The bank id ACCOUNT_ID string Required The account id Responses 200 Success 400 Error GET /obp/v3.1.0/my/banks/{BANK_ID}/accounts/{ACCOUNT_ID}/transactions RESPONSE SAMPLES 200 Success 400 Error { "transactions": [ { } ] } Get Transaction by Id. OAuth2 scopes required: read:transaction PARAMETERS Path Parameters ? BANK_ID string Required The bank id ACCOUNT_ID string Required The account id VIEW_ID string Required The view id TRANSACTION_ID string Required The transaction id Responses 200 Success 400 Error GET /obp/v3.1.0/banks/{BANK_ID}/accounts/{ACCOUNT_ID}/{VIEW_ID}/transactions/{TRANSACTION_ID}/transaction RESPONSE SAMPLES 200 Success 400 Error { "this_account": { "holder": { }, "number": "1234", "kind": "3456", "IBAN": "UK234DB", "swift_bic": "UK12321DB", "bank": { }, "id": "00000000-0000-0000-0000-000000000000" }, "other_account": { "metadata": { }, "holder": { }, "number": "1234", "kind": "3456", "IBAN": "UK234DB", "swift_bic": "UK12321DB", "bank": { }, "id": "00000000-0000-0000-0000-000000000000" }, "details": { "new_balance": { }, "description": "OBP", "completed": "Tue Sep 19 00:00:00 UTC 2017", "type": "AC", "value": { }, "posted": "Tue Sep 19 00:00:00 UTC 2017" }, "metadata": { "narrative": "NONE", "tags": [ ], "where": { }, "images": [ ], "comments": [ ] }, "id": "00000000-0000-0000-0000-000000000000" } Transaction Request Get Transaction Request Types for Account OAuth2 scopes required: read:transaction PARAMETERS Path Parameters ? BANK_ID string Required The bank id ACCOUNT_ID string Required The account id VIEW_ID string Required The view id Responses 200 Success 400 Error GET /obp/v3.1.0/banks/{BANK_ID}/accounts/{ACCOUNT_ID}/{VIEW_ID}/transaction-request-types RESPONSE SAMPLES 200 Success 400 Error { "transaction_request_types": [ { } ] } Answer Transaction Request Challenge. OAuth2 scopes required: challenge:transaction PARAMETERS Path Parameters ? BANK_ID string Required The bank id ACCOUNT_ID string Required The account id VIEW_ID string Required The view id TRANSACTION_REQUEST_TYPE string Required The transaction request type TRANSACTION_REQUEST_ID string Required The transaction request id REQUEST BODY id string Required This is challenge.id, you can get it from Create Transaction Request. response, only is useful if status ==INITIATED there. answer string Required Responses 200 Success 400 Error POST /obp/v3.1.0/banks/{BANK_ID}/accounts/{ACCOUNT_ID}/{VIEW_ID}/transaction-request-types/{TRANSACTION_REQUEST_TYPE}/transaction-requests/{TRANSACTION_REQUEST_ID}/challenge REQUEST SAMPLES { "id": "string", "answer": "123" } RESPONSE SAMPLES 200 Success 400 Error { "challenge": { "challenge_type": "SANDBOX_TAN", "allowed_attempts": "3", "id": "00000000-0000-0000-0000-000000000000" }, "start_date": "Tue Sep 19 00:00:00 UTC 2017", "end_date": "Tue Sep 19 00:00:00 UTC 2017", "status": "COMPLETED", "from": { "account_id": "String", "bank_id": "String" }, "details": { "description": "String", "to": { }, "value": { } }, "charge": { "value": { }, "summary": "Rent the flat" }, "type": "SANDBOX_TAN", "transaction_ids": "666666-9c63-4246-abfc-96c20ec46188", "id": "00000000-0000-0000-0000-000000000000" } Create Transaction Request (COUNTERPARTY) OAuth2 scopes required: write:transaction PARAMETERS Path Parameters ? BANK_ID string Required The bank id ACCOUNT_ID string Required The account id VIEW_ID string Required The view id REQUEST BODY to TransactionRequest_To_Counterparty Required description string Required value Account_Balance Required charge_policy string Required Responses 200 Success 400 Error POST /obp/v3.1.0/banks/{BANK_ID}/accounts/{ACCOUNT_ID}/{VIEW_ID}/transaction-request-types/COUNTERPARTY/transaction-requests REQUEST SAMPLES { "to": { "counterparty_id": "String" }, "description": "Some description", "value": { "amount": "100", "currency": "EUR" }, "charge_policy": "SHARED" } RESPONSE SAMPLES 200 Success 400 Error { "challenge": { "challenge_type": "SANDBOX_TAN", "allowed_attempts": "3", "id": "00000000-0000-0000-0000-000000000000" }, "start_date": "Tue Sep 19 00:00:00 UTC 2017", "end_date": "Tue Sep 19 00:00:00 UTC 2017", "status": "COMPLETED", "from": { "account_id": "String", "bank_id": "String" }, "details": { "to_transfer_to_phone": { }, "to_transfer_to_atm": { }, "to_counterparty": { }, "to_sepa": { }, "to_transfer_to_account": { }, "to_sandbox_tan": { }, "description": "String", "value": { } }, "charge": { "value": { }, "summary": "Rent the flat" }, "type": "SANDBOX_TAN", "transaction_ids": "666666-9c63-4246-abfc-96c20ec46188", "id": "00000000-0000-0000-0000-000000000000" } Create Transaction Request (SEPA) OAuth2 scopes required: write:transaction PARAMETERS Path Parameters ? BANK_ID string Required The bank id ACCOUNT_ID string Required The account id VIEW_ID string Required The view id REQUEST BODY to TransactionRequest_To_Iban Required description string Required value Account_Balance Required charge_policy string Required Responses 200 Success 400 Error POST /obp/v3.1.0/banks/{BANK_ID}/accounts/{ACCOUNT_ID}/{VIEW_ID}/transaction-request-types/SEPA/transaction-requests REQUEST SAMPLES { "to": { "iban": "String" }, "description": "Some description", "value": { "amount": "100", "currency": "EUR" }, "charge_policy": "SHARED" } RESPONSE SAMPLES 200 Success 400 Error { "challenge": { "challenge_type": "SANDBOX_TAN", "allowed_attempts": "3", "id": "00000000-0000-0000-0000-000000000000" }, "start_date": "Tue Sep 19 00:00:00 UTC 2017", "end_date": "Tue Sep 19 00:00:00 UTC 2017", "status": "COMPLETED", "from": { "account_id": "String", "bank_id": "String" }, "details": { "to_transfer_to_phone": { }, "to_transfer_to_atm": { }, "to_counterparty": { }, "to_sepa": { }, "to_transfer_to_account": { }, "to_sandbox_tan": { }, "description": "String", "value": { } }, "charge": { "value": { }, "summary": "Rent the flat" }, "type": "SANDBOX_TAN", "transaction_ids": "666666-9c63-4246-abfc-96c20ec46188", "id": "00000000-0000-0000-0000-000000000000" } Get Transaction Requests. OAuth2 scopes required: read:transaction PARAMETERS Path Parameters ? BANK_ID string Required The bank id ACCOUNT_ID string Required The account id VIEW_ID string Required The view id Responses 200 Success 400 Error GET /obp/v3.1.0/banks/{BANK_ID}/accounts/{ACCOUNT_ID}/{VIEW_ID}/transaction-requests RESPONSE SAMPLES 200 Success 400 Error { "transaction_requests_with_charges": [ { } ] } OAuth2 Invalidate access token Responses 200 Empty body with 200 code 403 Access Token already invalidated or not found 500 Internal server error DELETE /oauth2/token Request Access Token Partner makes a request to the token endpoint by adding the following parameters described below PARAMETERS FormData Parameters ? grant_type string Required "authorization_code" Value MUST be set to "authorization_code" as per RFC code string Required The code received in the query string when redirected from authorization page Responses 200 Authorisation token (Bearer) 400 As per RFC authorisation server responds with 400 in case of error POST /oauth2/token RESPONSE SAMPLES 200 Authorisation token (Bearer) 400 As per RFC authorisation server responds with 400 in case of error "{ "access_token": "ACCESS_TOKEN", "token_type": "Bearer", "expires_in": 3600, }" Authentication Endpoint PARAMETERS Query Parameters ? response_type string Required "code" client_id string Required redirect_uri string Required scope string state string Responses 302 Redirect to OAuth provider GET /oauth2/auth Powered by ReDoc