Architecture Overview

Understand how ZynPay works: from payment creation to on-chain execution and fee splitting.

System Architecture

ZynPay is built on a decentralized architecture that ensures payments are non-custodial, transparent, and programmable.

Client-Side SDK
TypeScript/JavaScript and Python SDKs that create payment transactions. No backend required for basic payments.
Smart Contract Router
On-chain router contract that receives payments and automatically splits funds between merchant and platform in a single transaction.
On-Chain Storage
Payment metadata and events are stored on-chain, providing a permanent, auditable record of all transactions.
Non-Custodial
ZynPay never holds your funds. Payments go directly from customer to merchant, with fees split atomically.

Payment Flow

1

Payment Creation

Your application creates a payment object with amount, merchant address, and metadata. This happens client-side using the SDK.

2

User Approval

Customer connects MetaMask and approves the payment transaction. They can review the amount, merchant, and fee breakdown before confirming.

3

On-Chain Execution

Transaction is submitted to the blockchain. The router contract receives the payment and automatically splits it in a single atomic operation.

4

Confirmation & Events

Once confirmed, payment events are emitted on-chain. Your application can listen for these events to automatically unlock access or fulfill orders.

Fee Splitting Mechanism

Customer pays100 USDC
→ Merchant receives97 USDC (97%)
→ Platform fee3 USDC (3%)

This split happens atomically—either both transfers succeed or both fail. No partial payments, no reconciliation needed.

Security Model

  • Non-custodial: ZynPay never holds funds. Payments go directly from customer to merchant.
  • Smart contract verified: All fee splits are enforced by audited smart contracts on-chain.
  • Transparent: All transactions are publicly verifiable on the blockchain.
  • Immutable: Payment records cannot be altered once confirmed on-chain.
  • User-controlled: Customers always approve transactions in their own wallet.