Skip to content
An App for Your Business· Part 4 of 7

Connecting Your Mobile App to Payments, Stock and Sign-In

Short answer

Most of a mobile app's value sits behind the screen: the backend and APIs linking it to payments, stock, orders, customer records and sign-in. This part shows how to make every number in the app come from one system, what Apple and Google require for payments, login and account deletion, and an exercise that maps each screen to its data source.

Origami Team

Editorial Team · · 7 min read

Share on WhatsApp
Like what we publish? Pin Origami as a preferred source on Google.Add as a preferred source on Google
Connecting Your Mobile App to Payments, Stock and Sign-In

Most of a mobile app's value is not on the screen. Each number on screen comes from the backend and the APIs linking the app to payments, stock, orders, customers and sign-in. The rule: every number in the app should come from one system that owns it, not from a copy the app keeps for itself. For physical goods, Apple's guideline 3.1.3(e) requires a payment method other than in-app purchase, and Google Play's billing does not support them either, so you will connect a payment gateway. For national ID sign-in, see Nafath national SSO integration for your apps.

Part three settled who builds the app and who owns the accounts; part four asks what it connects to.

What sits behind the screen? Three layers in plain words

Every business app has three layers, and it helps to know the name of each when you read a quote or listen to a developer:

  • The front end. What the customer or employee sees on the phone: screens, buttons and menus. It is the part that appears in the store, and it is the least valuable layer if nothing stands behind it.
  • The backend. A server that receives the app's requests, checks them, stores them and decides what goes back to the phone. This is where the rules live: who may see what, when an order counts as confirmed, and what the right price is now.
  • The APIs. The agreed way two systems exchange data. Through them, the app's backend talks to the payment gateway, the stock or accounting system, the customer system, the shipping provider and the messaging provider.

Why not let the app talk to your systems directly? Because the phone is in the user's hand, and any password or key placed inside it can be extracted. So the keys stay in the backend, and the app asks it only for what the user is allowed to see.

Payments: the order is confirmed in the backend, not on the screen

If your app sells goods or services consumed outside the app, such as ordering products, booking an appointment or delivery, Apple's App Review Guidelines say in guideline 3.1.3(e) that you must use purchase methods other than in-app purchase, such as Apple Pay or traditional card entry. Google Play's Payments policy page lists purchases of physical goods and physical services, such as food delivery and gym memberships, as not supported by its billing system. The practical result: your app will connect to a payment gateway, and we went through the details in integrating Mada, Apple Pay and STC Pay into your app.

What matters to you as an owner is one point: when does an order count as paid? The right answer is that the gateway tells the backend directly that the payment succeeded, and the backend then changes the order status, deducts the stock and sends the notification. Relying on a success message shown on the app screen opens the door to orders that look paid but are not, or paid orders that were never recorded because the connection dropped at the moment of payment. Ask the developer one question: how does the system know the payment went through, from the screen or from the gateway?

Stock, orders and customer records: one version of the truth

This is where the most expensive app problems happen. When the app is built with its own database and the team enters products, prices and quantities into it by hand, you end up with two versions of the truth: one in the stock or accounting system and one in the app. Within the first working week the gaps start:

  • Selling what is not there. A branch sold the last unit, the app still shows it in stock, the customer pays, and then you call to apologise.
  • Two prices for one product. You changed the price in the system and someone forgot to change it in the app, so the customer sees one price and the invoice shows another.
  • One customer, two records. The customer changed their mobile number in the app, the old one stayed in the customer system, the team cannot reach them and their orders never come together in one history.
  • Double entry. An employee re-enters app orders into the system every morning: the same copy and paste the app was supposed to end.

The fix is not to stop the app storing anything; it is to decide who owns each piece of data. Quantity belongs to the stock system, price to the pricing or accounting system, customer details to the customer system. The app either reads from them directly through an API, or keeps a temporary copy that it refreshes on a known schedule and treats as not the reference. If your online store runs on Salla or Zid, the app, the store and your internal systems must agree on the same stock, which we explained in integrating Salla and Zid with your internal systems via API.

Sign-in and account deletion: what Apple and Google require

Sign-in is part of the integration, because every user must map to one record in your systems. These points come from the official pages as we read them on 25 November 2026; the rules change, so check them before you build:

  • Signing in with Google, Facebook or similar: Apple's guideline 4.8 says an app that uses a third-party login service for the user's primary account must also offer an equivalent login option that limits data collection to name and email and lets users keep their email private.
  • When that is not needed: the same guideline exempts apps that use only the company's own account system, business apps that require sign-in with an existing enterprise account, and apps that use a government-backed citizen identification system or electronic ID. So a staff app tied to company accounts, or a customer app that relies on the mobile number alone, is in a different position from an app built on Google sign-in.
  • Single sign-on for staff: if employees already have accounts in the company's system, it is better for them to enter the app with the same account (single sign-on) rather than a new password. When an employee leaves and their account is disabled, their access to the app stops at the same moment.
  • Account deletion: Apple's guideline 5.1.1(v) says an app that supports account creation must offer account deletion within the app. Google Play's account deletion requirements page asks for two paths, in the app and through a web link, and for deleting the user data associated with the account, while allowing some data to be kept for legitimate reasons such as security, fraud prevention or regulatory compliance, provided users are told.

That deletion request is not carried out in the app alone. If the customer's data is copied into three systems, the deletion has to reach all of them, or what remains has to be documented with the reason. That is one more reason for every piece of data to have one known owner.

The Origami view

We build apps and systems for Saudi businesses, and we start every app project by drawing the data map before drawing the screens: every screen, every number on it, and the system that owns it. That map is what sets the real size of the work, because connecting an existing system is very different from rebuilding a copy of it inside the app.

That is why we prefer the app to read from your existing systems through clear APIs, and we build the backend and the admin panel as part of the project rather than as a later add-on, so you keep one reference for stock, prices and customers. You can see our services in app building and systems integration.

Exercise: every screen and where each number comes from

Take the requirements document you wrote in part two and fill in this table for every screen in the first version before you approve any quote:

ScreenNumber or dataSystem that owns itHow it reaches the appWhen it updates
Product pagePrice and quantity availableStock or accounting systemRead through the APIWhen the page opens
CheckoutPayment statusPayment gatewayNotification from the gateway to the backendAt the moment of payment
My accountName, mobile and addressCustomer systemRead and write through the APIOn every change
Order trackingShipping statusShipping providerNotification or queryWhen the status changes

Any cell you cannot fill is a question for the developer before you sign. And any row whose owner column says the app itself deserves a question: why, and who will keep that copy in line with your systems?

In the next part

Once the app is connected to your systems, it starts collecting your users' data: name, mobile, location and payment references. Part five explains your app users' data and what the Personal Data Protection Law requires, from purpose and consent to breach notification, and how that ties to the disclosure forms in the Apple and Google stores.

Sources

  • #Make the Most of Tech
  • #An App for Your Business: From Idea to Launch
  • #App Development
  • #Mobile App

Frequently asked questions

Why is it not enough for the app to have its own database?

Because it becomes a second copy of stock, prices and customers next to your systems, and over time the two drift apart: an out-of-stock product gets sold, one product shows two prices, or orders are re-entered by hand. It is better to decide one owning system for each piece of data and have the app read from it through an API.

Do I have to use Apple and Google in-app purchase to sell my products?

For goods and services consumed outside the app, Apple's guideline 3.1.3(e) says you must use purchase methods other than in-app purchase, and Google Play's Payments policy page lists physical goods as not supported by its billing system. So you connect the app to a payment gateway; check both pages before you build, as the rules change.

When does an order count as paid in a mobile app?

When the payment gateway tells the backend directly that the payment succeeded, not when a success message appears on the phone. The backend then changes the order status, deducts the stock and sends the notification, which prevents orders that look paid but are not.

Does my app need an account deletion option?

If the app lets users create an account, Apple's guideline 5.1.1(v) requires deletion within the app, and Google Play asks for an in-app path and a web link plus deletion of the data tied to the account. The deletion must also reach every system the customer's data was copied into.

Have a project in mind?

We build custom systems, apps and websites for your business. Tell us your idea and we will give you a straight answer on it.

See our services

Newsletter

New articles and series, in your inbox.

Follow Origami in Google

Pin Origami as a preferred source and our articles will surface first for you in Google Search and Top Stories.

Add as a preferred source on Google