Introduction
The QiCard Payment Gateway is a PCI-DSS–compliant payment platform that lets merchants accept digital payments — card payments, saved-card tokens, and the Pay with SuperQi wallet — across the web and inside native mobile apps. This documentation gives developers, technical teams, and stakeholders everything needed to integrate, test, and operate payments on the QiCard platform.
At its core the gateway sits between three parties: your application, the card schemes / SuperQi wallet, and the acquiring bank. You never handle raw card data yourself — the gateway takes on the sensitive parts of the flow (cardholder authentication, 3-D Secure, authorization, and settlement notifications), which dramatically reduces your compliance scope and lets you focus on your product.
Read this page end-to-end for the concepts, then jump to Integration Requirements and the API Authentication section to make your first call.
What the gateway does for you
A payment gateway is more than a single API call — it is an orchestration layer. When a customer pays, a lot has to happen correctly and securely in a few seconds: the amount must be validated, the cardholder authenticated, the issuing bank asked to authorize the funds, the result recorded, and your system reliably notified. The QiCard Payment Gateway abstracts all of this behind a small, predictable surface so you can integrate quickly:
- Security & compliance — card data is captured on QiCard-hosted surfaces (a hosted payment page
or the native SDK screens), so raw PANs never touch your servers. The platform performs 3-D Secure
authentication (the sandbox host is literally
uat-sandbox-3ds-api.qi.iq) to reduce fraud and shift liability. - Authorization & processing — the gateway talks to the card schemes and the acquirer to authorize and capture the payment.
- Reliable notifications — every meaningful state change is delivered to your backend through webhooks, so your systems stay in sync even if the customer closes their browser.
- Lifecycle management — you can query a payment's status, refund it, or cancel it through the API at any time.
How a payment flows
Conceptually, every payment follows the same lifecycle regardless of the channel (web or mobile):
- Create the payment. Your backend calls Create Payment with
the amount, currency, and callback URLs. The gateway returns a Payment object containing a unique
paymentIdand aformUrl(a secure payment link). - Collect the payment. The customer completes payment either on the hosted page (
formUrl) for web flows, or inside your app through the Mobile Payment SDK for in-app flows. - Authenticate. The gateway runs 3-D Secure and any method-specific step (for example, approving the charge in the SuperQi app).
- Authorize & finalize. The issuer authorizes the funds and the gateway settles the transaction,
resolving it to a terminal status such as
SUCCESS,FAILED, orAUTHENTICATION_FAILED. - Get notified. The gateway sends a signed webhook to your
notificationUrl. This is the source of truth for your backend — see Webhook Notifications. - Confirm. For belt-and-suspenders reliability, your backend confirms the outcome with Get Payment Status before releasing goods or services.
Never rely on the customer being redirected back to your finishPaymentUrl to mark an order as paid.
Browsers close, apps get backgrounded, networks drop. Treat the webhook (verified per
Message Verification) as authoritative and reconcile with
Get Payment Status.
Two ways to integrate
The platform exposes the same payment engine through two complementary integration surfaces. Most merchants use one; larger merchants use both (server-to-server for orchestration, SDK for the in-app experience).
1. The REST API
The REST API is the backbone of the integration. Your backend uses it to create and manage payments without ever rendering a card form itself. It is a small, resource-oriented HTTP API that speaks JSON.
- Base URL (sandbox):
https://uat-sandbox-3ds-api.qi.iq/api/v1 - Authentication: Basic Auth for straightforward setups, or
Signature-based for stronger request integrity. Each request is
scoped to a Merchant Terminal via the
X-Terminal-Idheader. - Core operations: Create Payment, Get Payment Status, Refund Payment, and Cancel Payment.
- Tooling: import the ready-made Postman Collection to try every endpoint in minutes.
The REST API is ideal for headless commerce, web checkouts (redirect the shopper to formUrl), server
reconciliation, and back-office operations like refunds.
2. The Mobile Payment SDK — native in-app payments
The Mobile Payment SDK embeds the entire payment experience directly inside your app, so customers never leave to a browser. It ships for Android (Kotlin), iOS (Swift), Flutter, and React Native, and — like the API — keeps card data inside PCI-DSS–compliant, QiCard-maintained screens.
Beyond simply rendering a payment form, the SDK provides capabilities that only make sense on-device:
- Card tokenization — save a card as a reusable payment token so returning customers can pay with one tap, and manage those tokens (list, block, transfer) from within the app.
- Deep customization — theme colors, light/dark, custom labels, and full RTL/LTR support with multiple languages (including Arabic and Kurdish).
- Pay with SuperQi — from SDK 2.0.2+, customers can pay from their SuperQi wallet; 2.0.4+ adds same-device deep-link (URI redirect) support. See Pay with SuperQi.
Payments initiated from a mobile app must be created with appChannel = true so the gateway tailors the
authentication flow for an in-app context. See Mobile SDK Overview.
For teams that use a CMS instead of a custom backend, there are also drop-in WordPress & CMS plugins.
Key features at a glance
| Capability | What it gives you |
|---|---|
| Card payments | Accept card payments on the web (hosted page) or in-app (SDK). |
| Pay with SuperQi | Let customers pay from the SuperQi wallet (SDK 2.0.2+, deep-link 2.0.4+). |
| Tokenization | Save cards as tokens for fast, one-tap repeat purchases. |
| 3-D Secure | Built-in cardholder authentication and liability shift. |
| Webhooks & events | Real-time, verifiable notifications to your notificationUrl. |
| Refunds & cancellations | Reverse or void payments programmatically. |
| Multi-language & RTL | Localized payment surfaces, including Arabic and Kurdish. |
| PCI-DSS compliance | Sensitive card data stays off your servers. |
Core concepts and terminology
A few terms recur throughout the docs — it helps to know them up front:
- Merchant Terminal — the payment configuration your acquirer provisions for you. Its identifier is
sent as the
X-Terminal-Idheader on every API request and determines which payment methods and permissions are enabled. - Payment object — the record the gateway creates for each transaction. It carries the
paymentId(the transaction reference),formUrl(payment link),status, and related metadata. paymentId— the canonical reference for a transaction; use it to query status, refund, or cancel.notificationUrl— your webhook endpoint where the gateway posts payment results.finishPaymentUrl— the URL the shopper is redirected to after finishing on the hosted page (a UX convenience, not a payment confirmation).- Payment token — a saved-card reference issued by the SDK for repeat payments.
Environments
Development and testing happen against the sandbox environment
(https://uat-sandbox-3ds-api.qi.iq/api/v1), where you can exercise the full flow with test data before
going live. Start with Sandbox & Testing to get set up.
Before you begin
To integrate, you'll need:
- Merchant Terminal credentials (
X-Terminal-Idand API credentials) provided by your acquirer. - A backend able to make authenticated HTTPS requests and to receive webhook callbacks on a
publicly reachable
notificationUrl. - For in-app payments, a supported mobile project (Android, iOS, Flutter, or React Native).
Review Integration Requirements and API Usage Guidelines for the full checklist.
Where to go next
- Integration Requirements — prerequisites and setup.
- API Authentication — how to authenticate your requests.
- API Endpoints — create, query, refund, and cancel payments.
- Webhook Notifications — receive and verify payment events.
- Mobile Payment SDK — build native in-app checkout.
- Pay with SuperQi — enable the SuperQi wallet method.
- Error Codes — reference for handling failures.