Skip to content

Open Banking API

The Open Banking API defines consent-based account access and payment initiation. It follows OAuth 2.0 Authorization Code with PKCE and explicit scopes so TPPs receive only the access the customer approved.

OpenAPI

StepEndpointPurpose
1POST /ob/consentsTPP creates a consent request with scopes, redirect URI, PKCE challenge, expiry, and customer-facing purpose.
2Hosted consent URLCustomer sees TPP identity, bank, accounts, duration, and exact scopes.
3Bank SCACustomer approves using OTP, push, or another bank-supported SCA method.
4POST /ob/tokenTPP exchanges authorization code and PKCE verifier for tokens.
5Account APIsTPP calls only APIs covered by granted scopes.

Example responses

json
{
  "consent_id": "cns_01HX7W0F4KZK2G8C6TW6EN10XR",
  "status": "AWAITING_CUSTOMER_AUTH",
  "authorization_url": "https://gateway.example.com/ob/consent/cns_01HX7W0F4KZK2G8C6TW6EN10XR",
  "scopes": ["accounts:read", "balances:read", "transactions:read"],
  "expires_at": "2026-08-06T00:00:00Z",
  "code_challenge_method": "S256"
}

Token response

json
{
  "access_token": "owat_...",
  "refresh_token": "owrt_...",
  "token_type": "Bearer",
  "expires_in": 900,
  "scope": "accounts:read balances:read transactions:read",
  "consent_id": "cns_01HX7W0F4KZK2G8C6TW6EN10XR"
}

Accounts response

json
{
  "accounts": [
    {
      "account_id": "acc_01HX7W4QK2A95X2FGPVT7HHBZJ",
      "bank_id": "andalus",
      "display_name": "Current Account",
      "masked_iban": "LY83*****************2345",
      "currency": "LYD"
    }
  ]
}

Common scopes

ScopeAccess
accounts:readAccount list and masked identifiers.
balances:readCurrent and available balances.
transactions:readTransaction history for approved accounts and date ranges.
standing-orders:readStanding order and scheduled payment data.
payments:initiatePISP payment order creation.

AISP endpoints

EndpointPurpose
GET /ob/accountsList consented accounts.
GET /ob/accounts/{account_id}/balancesRead balances for one consented account.
GET /ob/accounts/{account_id}/transactionsRead transactions with pagination and date filters.
GET /ob/accounts/{account_id}/standing-ordersRead scheduled/standing orders where supported.

PISP endpoints

EndpointPurpose
POST /ob/payment-ordersCreate a payment order under customer consent.
GET /ob/payment-orders/{id}Read payment order status.
POST /ob/payment-orders/{id}/cancelCancel a payment order if still cancellable.

Security requirements

  • Merchants and TPPs must not collect the customer bank OTP inside their own UI.
  • The hosted consent screen must show requested scopes before approval.
  • Authorization codes are short-lived and bound to the PKCE challenge.
  • Tokens must be scoped, revocable, and auditable.
  • Consent revocation must stop future token use.