AI agents, API or document upload: how bank data reaches a lender in Africa
Three ways bank and administrative data reach a lender in Africa: bank APIs, AI agents that retrieve it with the customer's consent, and document upload. What each needs, what it covers and where Morocco stands.
The Sahl Team · · 19 min read
Bank data reaches a lender in one of three ways. The bank can expose an API that the lender calls with the customer's permission. An AI agent can, with the customer's explicit consent, open a session on the bank's or the administration's portal and retrieve only what the file needs, such as statements, balances, salary credits or a tax or CNSS certificate. Or the customer can upload PDFs and photos. APIs grow where a regulator sets common rules. Agents work today on the portals customers already use. Uploads cover every customer, including those who bring paper. Morocco is preparing its open banking framework, so today lenders combine agents and uploads.
In short
Where banks offer APIs, traffic moves to them. In the US, through bank-by-bank agreements, Plaid reported 80% of its traffic on or committed to APIs in September 2024. In the UK, where common rules apply, there were 18.81 million open banking user connections in June 2026.
A good agent session follows five principles: consent first, the customer present at sign-in, a narrow scope, a log of what was read, and a clean end with nothing kept. EU law sets similar conditions when a provider works through the customer's own interface.
Morocco has 24 banks. Bank Al-Maghrib is preparing an open banking framework with the banking association and expects to define it by the first quarter of 2027. Agents can work within it and move to bank APIs as they become available.
What are the three ways bank data reaches a lender?
Bank API. The bank publishes an interface. The customer is sent to the bank to approve a scope, and the bank gives the lender a token limited to that scope and period. In most markets banks built these interfaces within a framework set by the regulator. Our open banking explainer covers the steps.
AI agent. A software agent works on the portal the customer already uses: online banking, or an administration's site such as the tax authority's. The customer consents to a stated scope and signs in during the session. The agent then reads or downloads only the items in that scope and ends the session. Nothing is needed from the bank beyond the portal it already runs, and the agent is maintained as portals evolve.
Document upload. The customer sends a PDF statement, a scan or a photo. It covers every bank that issues statements and every customer, including those who prefer to bring paper. The lender then reads the document, checks that it is genuine, and matches it to the customer.

What makes a good AI agent session?
An agent works through the same front door as the customer, so the quality of the session depends on how it is designed. Five principles matter.
- Consent first. The customer sees what will be read, for what purpose and for how long, and agrees before anything happens. The consent is recorded.
- The customer is there at sign-in. The customer signs in during the session, and the one-time codes and checks the bank or administration applies stay in place.
- Narrow scope. The agent opens only the pages named in the consent, such as three months of statements or one certificate.
- A log. What was opened, when and for which lender is recorded for each file.
- A clean end. The session closes when the retrieval is done, and no credential or code is kept.

The same pattern is appearing in general-purpose agents. When OpenAI launched its browser agent Operator on 23 January 2025, it said the agent is trained to ask the user to take over for tasks that require login or payment details, and that in this takeover mode it "does not collect or screenshot information entered by the user" (OpenAI).
European law offers the most precise checklist for this kind of session. The EU technical standards under PSD2 ask banks to offer a dedicated interface for licensed providers. If it is unavailable, article 33(4) of Regulation (EU) 2018/389 lets those providers use the interface the bank offers its own customers until the dedicated one is restored. Article 33(5) sets the conditions. The provider must be identifiable to the bank, must not access, store or process data for any purpose other than the service the user asked for, must log the data it accesses and hand the logs to the supervisor on request, and must be able to justify its use of the customer interface. Article 36(5) adds that without the user actively asking, account information may be fetched no more than four times in 24 hours unless agreed otherwise.
These rules do not apply in Morocco. They are still a useful reference for any provider, including us.
How did access move to APIs in the US?
Gradually, and through agreements between banks and data providers before any federal rule. Plaid, a US data provider, wrote in November 2020 that when it launched in 2013, "few banks in the United States had external APIs" (Plaid). The same post set a goal of putting 75% of Plaid's traffic on APIs by the end of 2021.
In May 2023 Plaid reported that 75% of connections through it used APIs, and that it had moved 100% of its traffic to APIs for Capital One, JPMorgan Chase, USAA and Wells Fargo, among others (Plaid). In September 2024 it reported more than 80% of its traffic "on or committed to" APIs (Plaid). The last figure combines traffic already moved with traffic under agreement, and all three are company figures.
80%
A federal rule came later. The CFPB finalised its personal financial data rights rule on 22 October 2024, with compliance dates from 1 April 2026 for the largest institutions to 1 April 2030 for the smallest (CFPB). A law firm note of 9 April 2026 reports that a federal court in the Eastern District of Kentucky has enjoined the CFPB from enforcing the rule while the bureau reconsiders it (Cozen O'Connor).
Plaid's own figures show the move to APIs still under way more than a decade after its 2013 launch: in May 2023, a quarter of its connections did not yet use an API.
What did Europe and the UK decide?
The EU chose common rules and a timetable. From 14 September 2019 (article 38 of Regulation 2018/389), banks offering online accounts had to provide an interface for licensed third parties (article 30). The interface is presumed unavailable when five consecutive requests get no reply within 30 seconds (article 33(1)), and supervisors may exempt a bank from the contingency mechanism if its interface meets the conditions of article 33(6).
The UK publishes the clearest adoption series. Open Banking Limited, set up under the competition authority's order, publishes monthly figures for the nine largest banks.

The units change along the way. Early releases give rounded milestones. The Impact Report 7 counts 13.3 million active users in March 2025, one in five consumers and small businesses, against one in 17 in March 2021. From mid-2025 the releases count user connections, which the publisher says are not individual users.
Brazil reports larger numbers, measured differently. Open Finance Brasil had 22 million active consents in 2023 according to the central bank, as reported by Finsiders, and 208.79 million on 31 July 2026 according to the ecosystem dashboard, as reported by Let's Money. Sources use different definitions, so these two numbers are best read as orders of magnitude. The central bank's own Pix management report shows Pix payments started through Open Finance rising from 7.4 million in 2024 to 64.5 million in 2025.
What happened in Africa and the Middle East?
Nigeria. The central bank approved its Operational Guidelines for Open Banking in March 2023. They ask participants to "ensure secret credentials remain secret at all times" (section 9.3.2) and, on page 56, to avoid practices the central bank considers inimical to the ecosystem, such as copying what appears on customers' screens. The rollout has taken longer than first planned: press reports in October 2025 quoted the central bank saying open banking had not yet gone live, after an August 2025 target.
In the meantime, providers connected accounts with the customer signing in. Mono's developer blog of August 2022 describes a connection where the login request carries "the user's credentials", followed when needed by a one-time code or security question (Mono). In January 2026 Flutterwave bought Mono in a deal reported at 25 to 40 million dollars (TechCrunch). Another provider, Okra, which had raised 16.5 million dollars, closed; Techpoint Africa reported the closure on 2 July 2025 (Techpoint), and its founder gave slow adoption of its last product, a cloud service, as the reason.
8M+
South Africa. There is no open banking regime in force. On 26 November 2020 the central bank, the market conduct regulator and the payments association advised that "consumers should not share their Internet banking logon credentials with any third party", warned that handing them over puts credentials "at risk of being compromised", and noted that it might breach banks' terms (joint statement). The point for any provider is clear: a third party should never hold a customer's password.
Saudi Arabia. The central bank (SAMA) ran a sandbox first and announced on 26 March 2026 that it had begun licensing fintechs for open banking. Lean Technologies received the first licence, according to The Fintech Times. Tarabut Gateway had received an open banking certification in May 2023 within the sandbox (Arab News).
1M+
The common thread: frameworks take years to build, and in the meantime lenders and providers work with the customer's own access, under conditions that regulators increasingly spell out. Credentials stay with the customer.
Where does Morocco stand?
Banks and accounts. Bank Al-Maghrib supervised 95 credit institutions and similar bodies at the end of 2025, including 19 conventional banks and 5 participative banks, so 24 banks (2025 supervision report, page 17). It counts 39.8 million bank accounts and a holding rate of 62% of adults, and 16.35 million payment accounts, up 18% in a year. The World Bank survey, which asks people instead of counting accounts, puts account ownership at 44.39% of adults in 2024 (Global Findex 2025). The two measure different things.

Digital banking. The same report notes that the branch network fell by 151 to 5,541 at the end of 2025, which it links to the growing digitalisation of banking services and the optimisation of urban networks. It also describes a 2025 study by Bank Al-Maghrib of how banks use artificial intelligence, from customer assistants to fraud detection and credit scoring, and work with the banking association (GPBM) on a charter for responsible, secure and controlled use of AI in the sector (pages 19 and 173).
Open banking. Section 2.3 of the report (page 174) describes two parallel workstreams. With the GPBM, Bank Al-Maghrib is setting up a contractual framework for open banking, meant to strengthen interoperability, control of data-sharing risks and consumer protection. With World Bank technical assistance, it is defining API standards and technical prerequisites and a governance model. The work should lead, "à l'horizon du premier trimestre de l'année 2027", to the definition of the reference framework and the conditions for its progressive rollout. Agents built on consent and logs fit that direction: they can work within the framework and move to bank APIs as banks make them available.
Administrations. Part of a credit file comes from public bodies, not banks: a tax certificate, an income certificate, a CNSS salary declaration. A 2018 Hespress article lists certificates the tax authority (DGI) then issued online to account holders, including the certificate of tax compliance, the income certificate and the turnover certificate.
Paper. Many customers still bring paper statements and certificates to their lender. That is why document upload stays part of any complete offer, alongside agents and, later, bank APIs.
What does each method need to get right?
API. Coverage and depth. An API covers the banks that offer one, and shows the fields it was designed to show. In the EU, article 36(1)(a) of Regulation 2018/389 asks banks to give providers the same information the customer sees, except sensitive payment data.
Agent. Credentials, scope and upkeep. The customer's password and one-time codes should be entered by the customer and never kept. The provider should be able to show that it read only what the consent covered. Connectors need updating when a portal evolves. Bank terms of use also matter and should be respected. The South African regulators' 2020 advice and EU article 33(5) together give a clear standard.
Document upload. Authenticity and ease. Published figures come from vendors and describe documents sent to their own customers, not a national rate.
1 in 16
On ease, Tink, an open banking provider, also reported that 22% of the 1,000 UK borrowers aged 18 to 34 it surveyed had abandoned a loan application because the process was too cumbersome.
36%
Nobody publishes upload error rates or agent success rates for Morocco, so none of these numbers describes the Moroccan market.
Questions to ask any provider
- Which banks and administrations do you cover today, by name, and with which method for each?
- How is consent shown to the customer, recorded and withdrawn?
- Are credentials ever stored? If so, where, encrypted how and for how long?
- Can you show a log of exactly what was read for a given file?
- Where is the data processed and stored, and under which authorisation?
- What happens when a portal changes: how long until the connector works again?
- How do you check documents when the customer uploads instead?
How Sahl answers these
- Coverage. We run 15 connectors in production, built in-house. We share the list by name under NDA.
- Consent. Every retrieval starts with the customer's consent to a stated scope. Our consent-based aggregation is covered by an authorisation from the CNDP, the Moroccan data protection authority.
- Credentials. Never stored. The customer signs in during the session, including any one-time code, and nothing is kept after it ends.
- Log. Every session is logged for each file: what was read, when and for which lender. The lender can consult that log.
- Data location. On the Enterprise plan, data stays on the customer's premises.
- Portal changes. The connectors are built in-house, so our own team updates them.
- Documents. Document upload remains part of the offer, and we read and check what customers bring.
How does Sahl use agents today?
Our 15 connectors in production are AI agents built in-house. Each works as described above: consent first, the customer signs in during the session, the agent reads only what the file needs, every session is logged per file for the lender to consult, and no credential or one-time code is kept. The work is covered by a CNDP authorisation for consent-based aggregation, and on the Enterprise plan the data stays on the customer's premises.
We built them to fit the framework Bank Al-Maghrib is preparing with the banking sector, and to switch to bank APIs as they become available. Document reading stays alongside them, because many customers still bring paper.
About Sahl
At Sahl we build document reading, KYC and KYB checks, scoring and bank-data connectors for lenders. The platform page describes what is available, the developers page shows how teams integrate it, and the security page covers how we handle data. Related: what open banking is and where Morocco stands and thin-file borrowers in Morocco.
This article is general information, not legal advice.
What to do next
- Lenders: list the documents in your credit file and mark, for each, whether it comes from a bank, an administration or the customer. That shows where an agent, an API or an upload fits.
- Product teams: offer both an agent connection and a document upload in every flow.
- Compliance teams: use the seven questions above with every data provider, and keep the answers in the file.
- Everyone: follow Bank Al-Maghrib's work on the reference framework, expected to be defined by the first quarter of 2027.
Glossary
- API: a set of rules that lets one program ask another for data or an action.
- AI agent: software that carries out a task in a web portal on a person's behalf, here with the customer's explicit consent and within a stated scope.
- Consent: the customer's agreement to a stated scope, purpose and period, which can be withdrawn.
- Session log: the record of what an agent opened, when and for which lender, kept for each file.
- One-time code: a code sent by the bank or administration to confirm a sign-in.
- Contingency mechanism: in EU law, a provider's use of the customer interface when the bank's dedicated interface is unavailable.
- CNDP: the Moroccan data protection authority.
- CNSS: the Moroccan social security fund.
- DGI: the Moroccan tax authority.
- GPBM: Groupement Professionnel des Banques du Maroc, the banking association.
- User connection: the UK's unit of measure, a link between a user and a service, not a unique person.
FAQ
What is an AI agent in bank data retrieval?
Software that, with the customer's explicit consent, opens a session on the bank's or administration's portal and retrieves only what the credit file needs, such as statements, balances, salary credits or a certificate. The customer signs in during the session.
Does a Sahl agent keep my password?
No. The customer signs in during the session, including any one-time code, and nothing is kept after it ends. Every session is logged per file, and the lender can consult the log.
Is it legal to retrieve bank data with an agent in Morocco?
There is no open banking law yet. Law 09-08 makes consent the main basis for processing personal data, and article 180 of Law 103-12 lets banks disclose what the customer has authorised. Bank terms may add conditions. Sahl's consent-based aggregation is covered by a CNDP authorisation. This is not legal advice.
Does Morocco have open banking APIs?
Bank Al-Maghrib is preparing the framework with the banking association and World Bank technical assistance, and expects to define it by the first quarter of 2027. In the meantime, agents and document upload already cover the need.
What does EU law say about access through the customer's own interface?
Banks had to offer a dedicated interface from 14 September 2019. If it is unavailable, licensed providers may use the customer interface, but must identify themselves, take only what the service needs and log what they access (article 33 of Regulation 2018/389).
Should a lender use agents or document upload?
Both. Agents give data straight from the source portal, with consent and a log. Uploads serve customers who bring paper, and need reading and checks: Inscribe reports that 1 in 16 documents in its network showed signs of manipulation in 2025.
How many banks are there in Morocco?
24 at the end of 2025: 19 conventional and 5 participative, within 95 institutions supervised by Bank Al-Maghrib.
Sources
All links were opened on 2 December 2026 unless noted. Statistics keep their own reference dates.
Morocco, primary
- Bank Al-Maghrib, Rapport sur la supervision bancaire 2025: institution counts (page 17), accounts, branch network (page 19), artificial intelligence (page 173), open banking section 2.3 (page 174), opened 7 October 2026.
- Law 09-08, article 4, and Law 103-12, article 180, opened 7 October 2026.
International, primary
- World Bank Global Findex 2025, account ownership, opened 2 December 2026.
- Commission Delegated Regulation (EU) 2018/389, articles 30, 33, 36 and 38, opened 2 December 2026.
- CFPB press release of 22 October 2024, opened 2 December 2026.
- Open Banking Limited releases: 20 January 2020, 16 February 2022, 20 February 2023, 23 July 2024, Impact Report 7, 16 May 2025, 1 September 2025, 13 January 2026, opened 2 December 2026; 30 July 2026, opened 7 October 2026.
- Central Bank of Nigeria, Operational Guidelines for Open Banking in Nigeria, approved March 2023, section 9.3.2 and page 56, opened 2 December 2026.
- South African Reserve Bank, FSCA and PASA, joint statement of 26 November 2020, opened 2 December 2026.
- SAMA news release of 26 March 2026, opened 2 December 2026.
- Banco Central do Brasil, Pix management report 2023-2025, opened 7 October 2026.
Company statements
- Plaid: 19 November 2020, 11 May 2023, 10 September 2024, opened 2 December 2026.
- Mono developer blog, 12 August 2022, opened 2 December 2026.
- OpenAI, Introducing Operator, 23 January 2025, opened 2 December 2026.
- Inscribe, 2026 Document Fraud Report, opened 2 December 2026.
Secondary
- Cozen O'Connor, 9 April 2026, on the status of the CFPB rule, opened 2 December 2026.
- TechCrunch, 5 January 2026, opened 2 December 2026.
- Techpoint Africa, 4 July 2025, opened 2 December 2026.
- The Fintech Times, 27 March 2026 and 6 March 2024, opened 2 December 2026.
- Arab News, 30 May 2023, opened 2 December 2026.
- Finsiders Brasil, 28 January 2025 and Let's Money, 27 August 2026, for Brazilian consent counts, opened 2 December 2026.
- Hespress, 26 July 2018, for DGI online certificates, opened 2 December 2026.
- open banking
- AI agents
- bank statements
- consent
- Morocco
- data access