Regonet AI

2-Month Business Development Program · Phase 1

Month 1 — Web & Mobile App Development

PHASE 1 · WEEK 3 · DAY 13

Day 13 — APIs and External Services

Focus: Understanding how an app talks to outside services — the language of requests and responses, the keys that protect the conversation, and how to connect a third-party service safely.

Section 1

What an API Actually Is

By this point in the program you have an app that works on its own: screens, data, forms, a domain on the way. But no serious app lives alone. The moment it needs to take a payment, send an SMS, verify an email or show a map, it is talking to another company's computer — and the language they talk in is called an API.

This is one of those terms that sounds far more technical than it is. By the end of today, the word API will stop being noise, because you will see that every API conversation is built from the same small set of ideas, and that you already take part in dozens of them every day without noticing.

1

An App Never Does Everything Alone

Think about the ordinary things an app does in a week. It sends a customer a six-digit code to verify their phone number. It charges a card for an order. It shows a rider's location on a map. It emails a receipt. None of those things happen inside the app itself, because each of them is a whole specialised business of its own.

The SMS travels through a messaging company that has spent years negotiating with Nigerian phone networks. The card charge goes through a payment gateway that is licensed to move money. The map comes from a company that has photographed and mapped the entire world. Your app does not rebuild any of that — it asks. Asking, in an organised way, is the whole subject of today.

2

The Waiter Analogy

Picture a restaurant. You sit at your table and you want food, but you do not walk into the kitchen. You tell the waiter what you want, in words the kitchen understands, and the waiter carries your request in and your food back out. You never see the kitchen. You do not need to know where the pans are kept.

An API is that waiter. Your app is the table. The outside service is the kitchen. The menu — the list of what you can order and exactly how to ask for it — is called the documentation, and every serious API publishes one. When a developer says an API is well documented, it means the menu is clear enough that a first-time customer can order correctly.

3

Request and Response

Every API conversation has two halves, and they always come in the same order. The request is your app asking: it states which service it wants, what it wants done, and proves who is asking. The response is the service answering: it states whether the thing was done, and hands back whatever was asked for.

Take a delivery-tracking request. Your app asks the delivery company's API: where is order 82401? The response comes back: collected, in transit, 20 minutes away. Your app takes that answer and puts it on the customer's screen. The customer never knows a conversation happened — they just see the answer. That invisibility is the point: the outside service's work arrives inside your app wearing your app's clothes.

Section 2

REST APIs — The Common Language

APIs are built by thousands of different companies, and each could have invented its own way of being asked. Thankfully, almost the entire industry settled on one set of shared manners, called REST. It means you learn the pattern once, and you can talk to almost any service on the internet.

1

What REST Means in Plain Language

REST is not a tool or a product. It is an agreement about how a conversation should be structured: requests go to a predictable address, carry their information in a predictable format, and come back with a predictable status. It is the reason a developer who has never used Korapay can connect a Korapay account in an afternoon — the menu is different, but the restaurant works the same way.

You do not need to know the theory behind the name. You need the four habits REST gives every API: addresses, methods, JSON and status codes. Those are the next four topics, and together they are the entire working vocabulary.

2

Endpoints: The Address of Each Ability

A service exposes one address per thing it can do, and each of those addresses is called an endpoint. The base address belongs to the company, and the part after it names the ability. A payment provider might keep charging at one endpoint, verification at another, and customer lists at a third.

The pattern reads like the branches of a building. The base address is the company's front door; each endpoint is a labelled counter inside it. When a developer says they are hitting the verify endpoint, they mean they sent a request to that specific counter, because that counter is the only one that does verification.

3

GET and POST

Every request also declares what kind of action it is, and two kinds cover almost everything. GET is the read-only question: where is this order, what is this customer's balance, what is today's exchange rate? A GET never changes anything — you could send it a hundred times and the world stays the same, like reading a menu.

POST is the action that changes something: submit this payment, create this account, send this message. The rule of thumb for safety is exact: if money moves, or a record is created, or a message leaves the building, it is a POST. Developers are careful never to mix the two up, because a browser re-loading a page re-sends a request — and you do not want a re-loaded page charging a customer's card twice.

4

JSON — The Language of the Response

The answer inside a response is written in a format called JSON, and it is blessedly boring: a set of labelled fields with values. A payment response might read { "status": "success", "amount": 25000, "currency": "NGN" }. Each label is a field name, each value is the answer. Nothing more mysterious than that.

JSON is worth making peace with early, because it is also how your app's own database stores its records. The same skill — reading a field name and picking out its value — carries from reading an API response to reading an order to reading a customer profile. It is the closest thing the technical world has to a universal packing slip.

5

Status Codes — The First Thing You Check

Before reading anything else in a response, you look at its status code: a three-digit number that says how the conversation went. You will meet the same handful forever, and knowing them is like knowing the traffic-light colours.

200 — success — the request was understood and done. Everything in the response can be trusted as the result.

400 — bad request — you sent something the service could not read: a missing field, a badly shaped phone number, a typo in the field name. Your side fixable, usually a small correction to the request.

401 — unauthenticated — your key is missing, wrong, or expired. The service is saying: I do not know who you are, so I will do nothing for you.

429 — too many requests — you are asking faster than you are allowed. Covered properly later in this class.

500 — their side broke — the problem is inside the service, not your request. Nothing you change will fix it; you wait and retry, ideally gently.

Section 3

API Keys and Authentication

Anybody in the world can find a service's front door. The question every API has to answer is: who is knocking, and are they allowed in? That answer is the API key — and handling it well is where non-technical business owners most often put their business at risk without knowing it.

1

Why a Key Exists

An API key is a long, random-looking string of characters that identifies your account. When your request arrives carrying your key, the service looks it up and answers three questions in one instant: is this really you, what are you allowed to do, and who gets the bill?

That last part is why keys matter commercially. Almost every API charges by usage, and the usage is measured against the key. Two businesses sending identical requests get separate bills, separate limits and separate logs — all because their keys are different.

2

The Two Keys: Public and Secret

Most services give you a pair, and the pair has a strict division of labour. The public key can be shown inside your app — it identifies your account to the checkout screen, like the name on your shopfront. The secret key can do everything the account can do — charge, refund, move money — and so it is treated like the key to the shop's back door and cash safe in one.

The rule is absolute and it never bends: the public key may appear in your app's pages; the secret key must never appear anywhere a customer, a screenshot or an exported code file can reach. If you remember one sentence from today, it is that one.

3

What Happens When a Secret Key Leaks

A leaked secret key does not read like a security story in the news. It reads like this: a business owner publishes their code to share it, or pastes a screenshot of a configuration screen into a group chat, or forwards an email that happens to include the key. Days later, requests start arriving from a country they have never sold to. The gateway is doing exactly its job — the requests carry a valid key, so they are valid. The money leaves at the speed of the internet.

The defences are simple. Use the test key while building, and only issue the live key at the moment you launch. Store the live key in a secrets store — the next section covers exactly that — never in a chat, never in a message, never in a document. And if a key ever leaves your control, revoke it and issue a fresh one; a compromised key is not a suspicion you investigate, it is a door you lock immediately.

Section 4

Webhooks — When the Service Calls You

Everything so far has your app doing the asking. But some of the most important answers arrive when you are not asking — and for those, the conversation turns around. A webhook is the service calling your app, and if APIs are waiters, a webhook is the kitchen's own doorbell.

1

The Doorbell Analogy

When a payment is settled, when a delivery status changes, when a message is delivered — the event happens on the service's side, not yours. With a webhook, you give the service a private address on your app and say: when anything changes, press this doorbell and leave the details. From that moment, the updates arrive on their own, whether or not anyone is standing at the counter asking.

The classic case is payment. A customer pays, sees a success screen and walks away — but the money moving between banks is not instant, and a success screen by itself proves nothing. The trustworthy confirmation is the gateway's webhook arriving at your app a moment later saying: transaction XYZ has actually settled. Serious apps treat the webhook as the truth and the on-screen success as a courtesy, because only the webhook comes from the side that holds the money.

2

Webhooks Instead of Endless Checking

Before webhooks, apps did the clumsy thing: ask every thirty seconds — is it settled yet? is it settled yet? — hundreds of times per order, across thousands of orders. That burns your rate limit, slows the service down for everyone, and still leaves you waiting up to half a minute after the truth is known.

The doorbell is cheaper and faster because it fires exactly once, exactly when the fact becomes true. One webhook can also carry news for many users at once. The trade for you is a small one: your app must keep the doorbell address working and stable, because a service that cannot reach your doorbell gives up quietly, and the news simply never arrives.

3

Trust but Verify

One discipline completes the picture. A webhook arrives as a message at a door that, in principle, anyone could knock on — so every gateway signs its webhooks, and your app checks the signature before acting. Without that check, a stranger who guesses your doorbell address could ring it with a fake payment confirmed message and unlock your app for free.

This is the last of the four security habits in this class, and they stack: keys prove who you are to the service, secrets keep the proof private, webhooks bring you the truth, and signatures prove the webhook itself is genuine.

Section 5

Environment Variables and Secrets

Where does the key live? The answer is not in the code, and today's class explains why. A secret belongs in a dedicated secrets store, and your code learns the secret only at the moment it needs to act.

1

Not In the Code, Never In the Browser

Code has a way of travelling. It gets shared with a developer, exported to a repository to keep a copy, pasted into a chat when someone needs help with an error, shown on a screen during a call. Any key written directly into the code arrives at every one of those destinations with it, and you cannot un-share something once it has been pasted.

The same logic closes the browser. Everything sent to a customer's browser can be read by that customer, so anything sensitive never goes there at all. A payment initiated from a screen is fine; the secret key doing the charging lives only on the server side, where no customer can reach.

2

A Named Box the Platform Fills In

The professional pattern is simple and it is what every serious platform uses, including the one you build on. Your secret key is stored once, in a secrets store, under a name you choose — say PAYMENT_SECRET_KEY. Your code never contains the key itself; it contains only the name, and asks the store: give me whatever is behind PAYMENT_SECRET_KEY.

The benefit is quiet but enormous. The code you share, export, back up or paste into a chat contains nothing worth stealing — just a name with nothing behind it, like an empty labelled jar. The secret itself exists in exactly one place, from which it can be inspected, rotated and revoked in seconds, without touching the app at all.

3

Good Secret Hygiene

Three habits keep a secrets store honest, and all three are cheap.

One service, one key — never let one key serve two purposes or two apps. Separate keys mean a leak in one place can be revoked without disturbing anything else.

Build with the test key — services issue test keys that behave exactly like live ones without touching real money. Stay on the test key until the day you launch.

Rotate and revoke without sentiment — any time a key may have been seen by the wrong eyes — a departed developer, a shared screen, a forwarding accident — issue a replacement and retire the old one the same day.

Section 6

Connecting a Third-Party Service, Start to Finish

The theory now assembles into a procedure. This is the path from we should send SMS messages to customers actually receiving them — the same seven steps every time, for any service.

1

The Seven Steps

Each step exists to catch a mistake while it is still cheap. The most expensive place to discover a wrong assumption is in production, with real customers and real money.

1

Define the job in one sentence

When a new order is placed, the customer receives an SMS confirming it. If you cannot state the job in one sentence, the connection is not ready to be built — you will wire the wrong thing confidently.

2

Choose the service and read its documentation

Compare two or three providers on price per message, coverage and reliability, then read the provider's documentation properly. An hour in the menu saves a week of wrong orders.

3

Open an account and collect your keys

Sign up, keep the test key at hand, and store the secret key in the secrets store immediately — before any code is written at all.

4

Test the request without your app

Send one manual test request — most providers offer a sandbox or an example you can run as-is. This proves your key works and shows you a real response before any code has to handle one.

5

Build the smallest working connection

Send one real test SMS to your own phone. Nothing else. Do not build the whole messaging system first — connect, then expand.

6

Handle the failures deliberately

Decide what happens when the service is down, the number is wrong, or the response is 429: show a clear message, retry gently, log the failure. Failures handled on purpose read as reliability; failures handled by accident read as a broken app.

7

Watch it after launch

Check the logs and the provider's dashboard in the first days. Usage and failures both leave tracks, and the first week of watching catches almost everything a plan missed.

Section 7

Rate Limits and Costs

Every API conversation has a meter running — one meter for how fast you may ask, and one for what asking costs. A business owner who ignores both learns about them from the app failing on its busiest day, which is the most expensive way to learn either.

1

Rate Limits: The Speed Cap

A rate limit is a cap on how many requests a service will accept from you in a window — a hundred per minute, a thousand per day, whatever the plan allows. The cap exists for a fair reason: one runaway app hammering an endpoint could slow the service down for every other business on it, so everyone gets a lane.

When you cross the line, the response is 429 — too many requests — and the service pauses you, sometimes for seconds, sometimes for the rest of the window. The professional responses are three: ask less often, ask for more in each request, and when told to slow down, back off and retry after the stated pause rather than knocking harder.

2

What an API Costs

Pricing models come in a small number of shapes, and knowing which shape you are signing is more important than the headline number.

Free tier — a monthly allowance — so many messages, so many map views — free up to a threshold, then paid. Perfect for building and early days, and the moment you should plan for is the day you outgrow it.

Per-use pricing — a flat fee per action: per SMS, per verification, per email. Predictable and easy to pass on to customers, as long as you know your volume.

Percentage pricing — payment gateways typically take a slice of what moves — a few percent per transaction — so the service only earns when you do.

Monthly subscription — a flat fee for the plan regardless of usage. Worth it once your volume is steady and predictable, wasteful before that.

3

Estimating Before You Commit

The arithmetic is not technical, and it is the business owner's job, not the developer's. Take your honest expected volume — orders per day, messages per customer, whatever the action is — multiply by the unit price, and read the monthly figure against your margins. A five-naira SMS sounds like nothing until a business sends four per customer and does a hundred orders a day.

Also check where the free tier ends before you rely on it, because free tiers tend to expire at the exact moment you finally have traffic. The right pattern is to write the estimate down, agree it with whoever builds, and revisit it after the first month of real usage numbers.

Section 8

Where APIs Appear in Base44

Everything in this class is about to stop being theory, because the platform you build on has been quietly using APIs on your behalf all along — and it gives you three graded ways to bring a service into your own app.

1

Connectors: The Ready-Made Waiters

The most common services — calendars, messaging platforms, spreadsheets, payment providers and dozens more — already have their waiter trained. These are called connectors, and connecting one is an authorisation: you sign in to your own account on the service and approve the connection, and the platform handles the requests, the formats and the token refreshes from then on.

This is the first thing to check for any need, because a connector that exists costs you nothing to build. If the menu already has your dish, order it.

2

Backend Functions: Your Own Recipe

When no connector exists — a Nigerian payment provider, a niche service, a company API of your own — you connect through a backend function: a small piece of your own code, running on the server side, that makes the API request and shapes the answer for your app.

Notice how the security habits of this class line up in that one pattern. The secret key sits in the secrets store. The function reads it by name at the moment it acts. The request goes out from the server, never the browser. The response's status code is checked before anything else. The failure paths show clear messages instead of a silent nothing. That is not five separate disciplines — it is one connection done properly.

3

This Very App Is the Case Study

The enrollment app you are using right now runs on exactly this pattern, and you can name every part of it from today's class. It collects payments through a payment gateway's API, and when a payment settles, it is the gateway's webhook that confirms it — never the success screen alone. It sends one-time Telegram invite links to students through the Telegram API. It emails receipts and confirmations through an email API. Every one of those keys lives in the secrets store, called by name, from the server side.

That is the true size of today's topic. Not a specialist skill for a specialist role, but the plumbing behind every feature you have tapped in this program. When you connect your first service to your own app next week, you will not be starting; you will be repeating a pattern you have been watching work, as a user, for weeks.

© 2026 Regonet AI. All rights reserved.

2-Month Business Development Program · Phase 1 · Day 13 of 20