Skip to main content
Paycrest is a payment routing protocol built on three cooperating layers: a Gateway smart contract for on-chain escrow, an aggregator for order routing and coordination, and provision nodes for fiat execution. This page explains how those components interact.

Core Components

Gateway Contract

The Gateway contract is the on-chain entry point for all payment orders. It holds stablecoins in escrow during the settlement process. Neither Paycrest nor any provider ever custodies the funds directly.

Key Functions

  • Order Creation: Accepts payment orders from senders; locks stablecoins in escrow (off-ramp) or coordinates stablecoin release to recipients (on-ramp)
  • Event Emission: Emits events that the aggregator monitors to begin routing
  • Escrow Settlement: Releases escrowed funds to providers after fulfillment is verified, or returns them to senders if the order can’t be completed

Payment Flow

1

Order Creation

Sender creates an order via the Sender API or direct contract interaction. For off-ramp, stablecoins are locked in escrow. For on-ramp, the contract coordinates stablecoin release once fiat receipt is confirmed.
2

Routing

Aggregator picks up the on-chain event and routes the order to the most suitable liquidity provider based on rate, availability, and corridor.
3

Fulfillment

For off-ramp, the provider disburses fiat to the recipient via a local PSP. For on-ramp, the provider receives the user’s fiat deposit and reports confirmation.
4

Completion

After fulfillment is verified, the contract settles atomically: escrowed stablecoins are released to the provider (off-ramp), or stablecoins are transferred to the recipient’s wallet (on-ramp). If fulfillment fails, funds are automatically returned.

Aggregator Node

The aggregator node is the coordination layer: it monitors on-chain events, manages provider routing, and oversees the settlement pipeline.

Core Functions

  • Order Monitoring: Watches the Gateway contract for new orders
  • Provider Matching: Routes orders to the optimal provider based on rate and availability
  • Settlement Coordination: Manages the fulfillment → validation → settlement flow
  • Webhook Delivery: Notifies senders of order status changes
Paycrest operates the Paycrest Aggregator today. The protocol is designed to support multiple independent aggregators in the future. See the Decentralization Path.

API Layer

  • REST API (v1 and v2 sender/provider endpoints)
  • Webhook delivery to senders
  • Rate limiting and authentication

Provision Nodes

Provision nodes handle fiat execution: disbursing fiat to recipients for off-ramp orders, or receiving and confirming fiat deposits for on-ramp orders. They are run by independent liquidity providers who connect their own PSP integrations.

Components

  • PSP Integration: Connects to local payment service providers (banks, mobile wallets)
  • Rate Management: Sets and updates competitive rates per corridor
  • Order Processing: Executes assigned payment orders
  • Settlement Reporting: Reports fulfillment status back to the aggregator

Integration Types

Bank APIs

  • Direct bank integrations
  • Real-time payment rails
  • Batch processing

Mobile Money

  • M-Pesa, Airtel Money, MTN Mobile Money
  • Other mobile wallets

Deployment Options

Self-Hosted Deployment
  • Complete control over infrastructure and PSP connections
  • Requires technical expertise for setup and maintenance
  • Recommended for providers with existing PSP relationships
Managed Deployment via Blockops
  • One-click deployment through Blockops
  • Automated scaling and monitoring
  • Recommended for providers new to infrastructure management

Sender API & Webhooks

The interface businesses and apps use to:
  • Create payment orders in either direction, on-ramp or off-ramp
  • Configure refund addresses, fee addresses and fee percentages
  • Manage API keys and authentication
  • Receive webhooks for every order status change

Multi-Chain Support

The protocol is live on 6 EVM-compatible networks, where senders can use the Sender API or call the Gateway contract directly: Starknet (starknet), Tron (tron) and Solana (solana) are supported through the Sender API only; Tron and Solana orders use the v2 API. See Supported Stablecoins for tokens and address formats. See Gateway Contract Addresses for the EVM deployment table, and Supported Stablecoins for per-network token details.

Security Architecture

Smart Contract Security

The Gateway contract implements multiple security measures:
  • Non-custodial escrow: Funds are locked on-chain, not held by Paycrest or providers
  • Automatic refunds: Unfulfilled orders are refunded automatically
  • Access control: Role-based permissions and multi-signature governance for protocol changes
  • Open-source contracts: see the contracts repository

Data Protection

  • Encrypted recipient data: Recipient bank details are encrypted in transit and at rest
  • API key authentication: All API requests authenticated via API Key + API Secret
  • Webhook signature verification: HMAC-SHA256 signatures on all webhook payloads

Integration Paths

Senders have two integration options:

Sender API

REST API integration and the fastest way to go live. Paycrest handles the on-chain interaction for you.

Smart Contract

Direct Gateway contract integration with full on-chain composability. Automated flows like yield-to-fiat and liquidation-to-bank work natively.