STC Pay Integration in Saudi Arabia: Mobile App Guide 2026
A practical guide to STC Pay integration in Saudi Arabia for mobile apps, covering OTP payments, verified webhooks, idempotency, reconciliation, refunds and secure go-live.
STC Pay integration in Saudi Arabia can look complete on day one and still lose orders after launch. The customer receives an OTP, the app displays “processing,” and the order remains stuck—or worse, is fulfilled before payment is captured.
Saudi checkout is demanding. SAMA reported that electronic payments represented 85% of retail payments in 2025, across 14.6 billion transactions. A production app must handle local wallets, bilingual interfaces, server confirmation and reconciliation. This guide explains STC Pay integration in Saudi Arabia without confusing approval with settlement.
Why STC Pay integration in Saudi Arabia matters
STC Pay gives an eligible customer another way to pay through a registered phone number and OTP, reducing card-entry friction for wallet users. It does not make STC Pay a replacement for every payment method; fit depends on the audience, cart, device mix and products.
Tap’s current STC Pay documentation states that the method supports Saudi riyal (SAR) transactions only. It also does not support authorization or recurring payments. These are product constraints, not implementation details. A booking that reserves funds for several days, a subscription or a saved-payment flow needs another approved method or a different design.
Mobile quality matters too. DataReportal counted 34.4 million internet users in Saudi Arabia. StatCounter’s October 2026 mobile traffic data was 57.96% Android and 42.03% iOS, so neither platform should be secondary. The interface should work in Arabic and English, follow right-to-left layout, and remain understandable on both platforms.
Design for the transaction, not just the payment screen
Decide which actions require a final payment state before building the UI. An order can be created, payment requested, approved, captured, failed or temporarily unknown. Separate those states from fulfilment. If the outcome is unknown, keep the order pending and give support a recovery path; never turn a timeout into failure or a “paid” label.
Choose the right payment method and integration model
Start with customer intent, then select the rail. Do not make STC Pay the only option unless the business case supports it. The main Saudi choices differ:
| Payment flow | Customer action | Strong fit | Key decision | Main constraint |
|---|---|---|---|---|
| STC Pay | Phone number plus OTP | One-time ecommerce, bookings and services | Wallet source and OTP lifecycle | SAR only; no authorize or recurring payments |
| mada | Card details plus 3D Secure when required | Domestic card acceptance | Tokenized card handling | Compliant authentication required |
| Apple Pay | Face ID, Touch ID or device passcode | Fast checkout on supported devices | Platform SDK and server token | Device and wallet setup apply |
| Bank transfer | Transfer with an order reference | High-value or invoice payments | Async reconciliation by amount and reference | Timing and reference accuracy matter |
Hosted Checkout SDK or direct API integration?
A hosted Checkout SDK reduces effort through a provider-managed screen and consistent mobile SDK. It supports a faster launch and a smaller custom PCI DSS surface. Confirm STC Pay availability for the exact merchant account and region; do not assume every method appears.
Direct API integration gives more control over the STC Pay source, phone field, customer journey and server-side state model. It fits when the wallet flow must be explicit or the product needs custom order logic, if the team can own the added testing and compliance work.
| Decision | Hosted Checkout | Direct API |
|---|---|---|
| UI and effort | Provider-managed; quicker to standardise | Customisable; more engineering |
| STC Pay | Convenient if confirmed for the account | Explicit src_sa.stcpay source and OTP updates |
| PCI DSS scope | Usually smaller for tokenized flows | Larger if sensitive card data is handled |
| Control | Fewer state controls | Full control and more maintenance |
Build the STC Pay transaction lifecycle correctly
Run a direct STC Pay implementation through your backend. The app may collect the OTP and display progress, but secret keys and state changes stay on the server.
The documented sequence is clear:
- 1The backend creates a SAR charge with
source.idset tosrc_sa.stcpayand the STC Pay-registered phone number in the source phone object. - 2The provider returns
INITIATED. This means the request was accepted; it does not mean money was captured. - 3The customer receives an OTP. Your app passes it to the backend for the documented charge update.
- 4The backend examines the updated charge. Only
CAPTUREDconfirms a successful STC Pay payment.
The source phone can differ from the customer phone, so validate them separately. Store the charge ID and order reference immediately. If the app closes during OTP entry, the server must recover the payment without starting an unrelated charge.
Treat pending and unknown outcomes as real states
A timeout, closed app or delayed response can leave the outcome uncertain. Show “payment pending,” then query the provider from the backend with controlled retries. Preserve the same charge and reference. Create a second attempt only after a known terminal outcome or a deliberate customer restart.
Make every transition replay-safe. The customer may tap “pay” twice, the network may retry, or the provider may deliver the same event twice. A unique attempt reference, provider charge ID and database constraints prevent duplicate receipts, stock allocation, delivery or entitlements.
Verify webhooks, reconcile refunds and recover safely
Tap describes payment webhooks as server-to-server calls. They matter because the app may disconnect before the customer returns. The configured post.url must be publicly reachable; Tap’s documentation says it cannot target localhost.
Do not trust a webhook merely because its body says CAPTURED. Verify the documented hashstring using HMAC-SHA-256, the secret key, exact field order and required amount formatting. Compare the values safely, then check the charge ID, amount, currency, status and your reference against the stored attempt. Record the event first and make the handler safe to replay.
A practical reconciliation loop compares provider reports with the internal ledger by provider ID, merchant reference, amount, currency, status and timestamp. Route missing callbacks, duplicates, amount mismatches, failures and delayed settlements to operational queues. Support should see the same transaction timeline as the customer.
Refunds need their own controlled workflow. The documented API supports full or partial refunds, specified reasons, webhook notification and an idempotent reference. Restrict permissions, record approvals, and prevent refunds from exceeding the captured amount. Never implement a refund as a simple “mark order cancelled” button.
Secure the app and meet Saudi obligations
Keep secret keys on the backend in a secrets manager. Public keys may be used on the frontend where required. Rotate credentials, apply least privilege, redact phone numbers and OTPs from logs, and authenticate status endpoints. A hosted or tokenized flow generally reduces PCI DSS scope; a custom form that collects raw card data expands it and requires formal compliance work.
Saudi Arabia’s Personal Data Protection Law (PDPL) applies to the phone number, order details, support records and device data connected to the journey. Document the lawful basis and purpose, minimise collection, set retention periods and separate optional analytics or marketing consent from payment processing. SDAIA’s breach guidance requires a controller to notify the authority within 72 hours where notification conditions apply. If a cloud, analytics or support provider processes data outside Saudi Arabia, assess the transfer and apply relevant safeguards, including standard contractual clauses where required.
Tax treatment is product-specific. If the business falls within ZATCA’s e-invoicing scope, link the captured payment to the correct invoice and clearance process. Do not assume every app or transaction has the same requirement; confirm the taxpayer position, invoice format and rollout wave with a Saudi tax adviser.
Before production, test a controlled release:
- Lifecycle: initiation, OTP success, decline, timeout, unknown outcome and app closure.
- Integrity: duplicate requests, repeated webhooks, amount mismatch and a failed refund.
- Security: server-side secrets, webhook verification, redacted logs and restricted refunds.
- Operations: status recovery, daily reconciliation, customer notifications and support ownership.
- Compliance: data mapping, retention, transfer safeguards, PCI scope and tax-invoice decisions.
How Zuxxis Helps Saudi Arabia Businesses
Zuxxis builds mobile products and the transaction systems behind them. Our mobile app development team can build native Android and iOS or cross-platform experiences with a clear STC Pay journey, bilingual right-to-left states and a secure server-side payment lifecycle. Our UI/UX design service can make OTP entry, pending payments, receipts and recovery understandable without treating a timeout as a final failure.
For orders, payment attempts, reconciliation, refunds and audit trails, our custom software and ERP service builds the operational model. Our cloud and DevOps service supports secrets, deployment, monitoring and incident readiness, while ecommerce can connect products, checkout and fulfilment when the business sells online.
We work as a senior-only, high-velocity partner with transparent and affordable pricing, flexible engagement models and measurable business outcomes. The engagement can begin with a transaction and compliance review, then move into a controlled pilot before wider release. Delivery includes test evidence, lifecycle diagrams, operating runbooks and ownership transfer so engineering, finance and support can work from the same source of truth. Clear scope, working software and informed handover keep the team in control. Talk to the Zuxxis team at https://zuxxis.in.
FAQ
How much does STC Pay integration cost?
Cost depends on the payment methods, ecommerce architecture, checkout design, backend and ledger work, security, compliance, reconciliation and support. A hosted SDK launch and a custom multi-method platform are different scopes. Ask for a written scope covering code ownership, testing, handover and maintenance rather than an unsupported headline price.
Why is my STC Pay integration failing?
Check the environment, merchant configuration, SAR currency and src_sa.stcpay source first. Confirm that the source phone is registered, the OTP update uses the returned charge ID, and the server reached CAPTURED. Other common problems are exposing secret keys in the app, using a localhost webhook URL, failing to verify hashstring, recording INITIATED as paid, or creating a new charge after a timeout instead of recovering it.
Should we support STC Pay and mada in the same app?
Often, yes. STC Pay offers a wallet and OTP experience, while mada serves customers who prefer a domestic card with 3D Secure. Apple Pay can add a faster device-wallet path for supported users. Offer methods according to customer need, while routing every method through one order model, permission system and reconciliation process.
Conclusion
STC Pay integration in Saudi Arabia succeeds when the team treats a wallet payment as a verified transaction state, not a successful screen. Confirm the product fit and its SAR-only, non-recurring constraints; create and update the charge through the backend; wait for CAPTURED; verify every webhook; make retries idempotent; reconcile the ledger; and support refunds as controlled actions. Build the mobile journey and compliance controls together, pilot it with real operating scenarios, and release only when support, finance and engineering trust the same record. Talk to the Zuxxis team at https://zuxxis.in.
Zuxxis Team
Principal Architect & Growth Director at Zuxxis, pioneering deterministic performance marketing and edge digital products.