Direct UPI settlement with sub-5s IMAP bank reconciliation is now active.View SDK Guide →
Deep space cosmic starfield

Precision UPI infrastructure for high-volume merchants.

Direct bank settlements with zero escrow, dynamic paise matching, and automated UTR reconciliation.

UPI ROUTER: ONLINE
Active Settled Balance
₹4,82,390.00
Primary VPA:merchant@icici• Direct Credit
7-Day Direct UPI Volume+28.4%
Recent PaymentsMatched via IMAP
₹1,499.42
ORD_91823 • ICICI VPA
Success
₹4,250.18
ORD_91822 • HDFC VPA
Success
₹850.34
ORD_91821 • SBI VPA
Success
VERIFIED INTEROPERABLE FINANCIAL RAILS • DIRECT SETTLEMENT
  • NPCI UPI RAILS
  • Direct VPAICICI Bank
  • Direct VPAHDFC Bank
  • Direct VPAAxis Bank
  • Direct VPAState Bank of India
  • UPI IntentPhonePe
  • UPI IntentGoogle Pay
  • UPI IntentPaytm
  • UPI IntentCRED UPI
TRANSACTION LIFECYCLE

Direct UPI settlement in three automated steps.

No middleman escrow accounts holding merchant liquidity. Funds transfer directly from customer UPI apps to your bank account with automatic matching.

STAGE 01● ACTIVE STAGE

Initiate & Unique Decimal Allocation

Merchant backend calls POST /api/payment/initiate. Cosmic Pay allocates a randomized 2-digit paise suffix (e.g., +₹0.42) to distinguish the transaction across concurrent payments.

POST /api/payment/initiate • 2-Key Auth • UUID Session Token Generated
STAGE 02CLICK TO EXPAND

Dynamic QR & Mobile Intent Dispatch

Customer loads /v3/pay/?token={token}. Mobile shoppers tap instant intent links (PhonePe, GPay, Paytm, CRED). Desktop shoppers scan the high-density dynamic QR code.

Intent URI: upi://pay?pa=merchant@icici&am=1499.42&cu=INR&tn=ORD_91823
STAGE 03CLICK TO EXPAND

Sub-5s IMAP Reconciliation & Webhook

When funds credit the merchant bank account, the bank generates an instant email notification. The gateway IMAP poller parses the unique paise & UTR, verifying the payment automatically.

Automated IMAP Poll • Zero Human Uploads • Webhook Dispatched
CP
Cosmic Store
ORD_91823
04:42
Exact Amount to Pay
₹1,499.42
Unique paise assigned for auto-match
Scan with any UPI app
Direct VPA: merchant@iciciVerified
GPay
PhonePe
Paytm
CRED
HORIZONTAL FEATURE SHOWCASE

Engineered for merchant autonomy and throughput.

Scroll vertically to glide through the core architectural modules powering Cosmic Pay.

index.php:605

Multi-VPA Profile Rotation

Circumvent daily bank limits per UPI ID. Cosmic Pay dynamically shifts incoming sessions across multiple registered accounts with real-time health checks.

Active Pool Size: 3 Merchant Accounts
index.php:547

Dual-Key Authentication

Public API key identifies merchant origin; secret key is cryptographically hashed with SHA-256 prior to verification in atomic transaction scope.

X-API-KEY (Public)
cp_live_9a4f810b2c89
X-SECRET-KEY (Hover to Decrypt)
SHA-256 Cryptographic Transport Guard
index.php:2334

Instant Payment Links

Generate shareable checkout links directly from the merchant dashboard. Configurable amounts, automatic expiration windows, and instant webhook callbacks.

https://merchant.cosmicpayments.in/v3/pay/?token=tok_demo842
Hosted on /v3/pay/?token=...
INTERVAL: 5000MS

Sub-5s IMAP Poller Loop

The gateway reads encrypted bank credit alerts directly over IMAP SSL, auto-matching the decimal paise fraction against pending transactions.

[11:42:01.218]IMAP: Connected to imap.mail.bank.in:993
[11:42:03.450]ALERT: Credit of ₹1,499.42 received
[11:42:03.512]MATCH: Paired with ORD_91823 (+₹0.42)
Zero manual uploads required
Cosmic vista nebula photography
LIQUIDITY ARCHITECTURE

Zero escrow. Your liquidity settles straight to your bank account.

Unlike legacy aggregators that hold funds across multi-day settlement windows, Cosmic Pay routes customer UPI payments directly to your registered bank account VPAs.

Read the security & architecture specifications
DIRECT UPI ROUTINGCOSMIC PAY
Direct-to-VPA Settlement

Funds transmit straight through NPCI rails to your merchant bank account. No holding escrow.

Settlement: ImmediateHover / Tap to compare →
INTEGRATION ENGINE • THE FLIP MODULE

Native SDKs for Next.js, PHP, and cURL.

Integrate direct UPI payments with dual-key authentication and signed session tokens in minutes.

Illustrative SDK request shape from verified integration specs
import { CosmicPay } from '@cosmicpay/sdk';

const cosmic = new CosmicPay({
  apiKey: process.env.COSMIC_API_KEY!,
  secretKey: process.env.COSMIC_SECRET_KEY!,
});

// 1. Create dynamic UPI payment session
export async function POST(req: Request) {
  const session = await cosmic.payment.initiate({
    amount: 1499, // Whole rupees
    order_id: 'ORD_91823',
    redirect_url: 'https://store.in/checkout/verify',
  });

  // Returns session UUID & allocated unique paise
  return Response.json({
    payment_url: session.payment_url,
    total_amount: session.total_amount, // 1499.42
  });
}
POST /api/payment/initiateAccepts amount, order_id, redirect_url. Returns signed UUID token.
GET /v3/pay/statusTriggers inline poller on pending sessions for immediate completion check.
Origin Whitelist GuardEnforces browser origin validation to block cross-site execution.
VERIFIED SECURITY ARCHITECTURE

Built on verified cryptographic controls.

No fabricated badges or hollow claims. Cosmic Pay implements concrete, code-enforced protections at the gateway, transport, and database layers.

01 / 04
ENFORCED IN CODE

SHA-256 Dual-Key Authentication

API requests require an active public API key (cp_live_...) combined with a server-to-server secret key. Secret keys are cryptographically hashed using SHA-256 before persistence.

Source: index.php:547 (Dual Key Verification)
02 / 04
ENFORCED IN CODE

Origin & Referer Whitelisting

All incoming payment initiation calls are verified against registered merchant domains. Requests originating from unregistered hostnames or unverified origins are immediately rejected with HTTP 403.

Source: index.php:640 (Domain Match Guard)
03 / 04
ENFORCED IN CODE

Atomic Transaction State Machine

Database operations execute within atomic transactions. Payments transition unidirectionally from pending to success, expired, or cancelled, preventing double-crediting or race conditions.

Source: db.php & index.php:260 (Atomic Status Transition)
04 / 04
ENFORCED IN CODE

Direct-to-Bank Routing (Zero Escrow)

Payments settle directly into merchant bank accounts through NPCI UPI rails. Cosmic Pay does not hold merchant funds in third-party escrow or delay payouts via multi-day settlement cycles.

Source: config.php & payment_helper.php (Direct VPA Dispatch)
VERIFIED ENGINE CONSTANTS

Technical architecture parameters.

Concrete configuration constants extracted directly from active production gateway scripts.

%
Escrow Retention Hold

Direct-to-bank settlement via NPCI UPI rails. Zero intermediary funds holding.

Ref: payment_helper.php
s
Session Window TTL

Dynamic session timeout preventing stale payments and securing paise allocation.

Ref: index.php:676
-bit
SHA Authentication

Cryptographic hashing on merchant secret keys before persistence in database.

Ref: index.php:547
s
Bank Poller Interval

IMAP poller loop and inline checkout polling for near-instant UTR reconciliation.

Ref: poller.php:12
DIRECT MERCHANT ONBOARDING

INSTANT UPI

Start accepting direct UPI payments today.

Open a merchant account, configure your bank UPI VPAs, and integrate our Next.js or PHP SDKs in under ten minutes.

0% Gateway HoldInstant Sandbox API KeysDirect Bank Settlement