Skip to main content

Tutorial on Batch Creating Sub-Contracts for Payments

· 7 min read
Pay Protocol Support
Pay Protocol Support
Pay Protocol BD & Support Team

This document describes how to rapidly batch-create TRON sub-contracts for payment business. The core approach is: first activate TRX currency in the admin console, then generate sub-contract addresses by creating payment orders, and finally deploy the contracts by transferring a small amount of TRX (approximately 1.277 TRX, valued at around 0.5 USDT) to complete batch initialization at minimal cost.

Use Cases

  • Payment business based on the TRON (TRC20) network
  • Merchants need to pre-provision large quantities of payment-collection sub-contract wallets to handle high-concurrency payment demands
  • Desire to reduce batch sub-contract creation costs by paying gas fees in TRX

Cross-Chain Swap in Admin Console

· 5 min read
Pay Protocol Support
Pay Protocol Support
Pay Protocol BD & Support Team

1. Introduction to Cross-Chain Bridges

A cross-chain bridge is a protocol mechanism used to transfer assets between different blockchain networks. Because various public blockchains (such as TRON, Ethereum, BSC, etc.) are independent and use incompatible protocols, assets cannot be transferred directly. Cross-chain bridges enable equivalent circulation of the same asset across different chains through mechanisms like "lock → mint" or "swap → release".

Cross-Chain Capabilities of This Platform

This admin console already has built-in cross-chain swap functionality, allowing you to complete asset transfers between major blockchains without integrating an external bridge. It works similarly to "currency exchange": select the asset to sell, choose the destination chain for the asset to buy, enter the receiving address on the counterparty chain, and confirm to complete the cross-chain transfer.

FeatureDescription
Supported AssetsUSDT and other mainstream stablecoins, native coins
Supported ChainsTRON (TRC20)、Ethereum (ERC20)、BSC (BEP20), etc.
Fund SourceHot wallet (Finance) account balance
Settlement TimeTypically within minutes (subject to on-chain congestion)
FeesCharged by the cross-chain bridge at real-time rates (included in the swap rate)
Prerequisites
  • Available only for Standard and Lite merchant versions
  • Operator account must have "Treasurer" permissions
  • Hot wallet (Finance) must have sufficient available balance
  • Target chain receiving address must be prepared (verify carefully; incorrect addresses will result in irretrievable funds)

Emergency Sweep of Contaminated Sub-Contracts

· 2 min read
Pay Protocol Support
Pay Protocol Support
Pay Protocol BD & Support Team

A user's sub-contract can sometimes be contaminated by malicious transfers (e.g., receiving blacklisted USDT). If a normal sweep is performed, the blacklisted funds would be transferred into the cold contract, putting the merchant's main funds at risk. To prevent this, merchants should first blacklist the contaminated sub-contract to exclude it from the normal sweep flow, then use the emergency sweep feature to sweep the funds to a safe external address instead of the cold contract, achieving risk isolation.

The steps to use the emergency sweep feature are as follows:

Tag Address Usage Guide

· 4 min read
Pay Protocol Support
Pay Protocol Support
Pay Protocol BD & Support Team
Pay Protocol Dev
Pay Protocol Dev
Pay Protocol Development Team

1. Overview

Tag Address is used to categorize and manage wallet addresses. When creating a payment order, merchants can specify tagId so the system automatically assigns a receiving address from the corresponding tagged address pool.

Address allocation rules:

  • If an available address exists under the tag, the system prioritizes reusing it.
  • If all addresses under the tag are occupied, the system automatically creates a new address.
  • The newly created address is automatically assigned to the same tag.

This mechanism helps merchants achieve:

  • Address categorization
  • Address reuse
  • Automatic address expansion

This mechanism is ideal for merchant scenarios that require managing a large number of receiving addresses.

How to enable a new blockchain or token in Pay Protocol?

· 4 min read
Pay Protocol Support
Pay Protocol Support
Pay Protocol BD & Support Team

Documentation Overview

This guide helps merchant administrators complete the following configurations:

  • Enable new blockchain networks (such as ETH, BSC)
  • Add new cryptocurrencies (Tokens) on the blockchain
Example Note

This document demonstrates how to add the ETH chain for merchants who have already enabled the Tron chain. The operation process for BSC chain is exactly the same as ETH.

Pay Protocol Merchant Sub-Contract Guide

· 6 min read
Pay Protocol Dev
Pay Protocol Dev
Pay Protocol Development Team

In traditional Web2 internet, when large merchants integrate with payment platforms, they often need to allocate independent payment sub-accounts for different business lines, stores, or even individual users (such as Alipay's PID or bank virtual accounts) to achieve fund allocation management and reconciliation.

In Pay Protocol's blockchain world, the core concept that realizes this functionality is Merchant Sub-Contract. It is not the merchant's sole payment address, but rather smart contract addresses that merchants can generate on-demand in batches, specifically serving particular scenarios (such as one user or one order). Due to its foundation on blockchain and smart contracts, the generation and management methods are more flexible, transparent, and secure.

Why Pay Protocol Doesn't Use ERC-4337 for Now?

· 5 min read
Pay Protocol Dev
Pay Protocol Dev
Pay Protocol Development Team

In the blockchain field, ERC-4337 (Account Abstraction) has been very popular in recent years. It proposes a new account system that allows wallets to move beyond traditional Externally Owned Accounts (EOA) and be completely defined by smart contracts.

It sounds ideal:

  • User operations are submitted through UserOperation (UserOps) instead of regular transactions.
  • Bundlers collect users' UserOps, bundle them into a single transaction, and submit to the blockchain.
  • Account logic (signature methods, multi-factor authentication, limits, recovery mechanisms) is completely controlled by contracts, providing more flexible wallet experiences.

However, after in-depth research, we found: The real-world effectiveness of ERC-4337 in payment business is not as perfect as imagined.

Analysis of Blockchain Wallet Types and Differences

· 4 min read
Pay Protocol Dev
Pay Protocol Dev
Pay Protocol Development Team

Blockchain wallets are the "keychains" of the blockchain world, determining how you access and manage assets while impacting security and functionality. Wallet differences can be categorized by usage patterns or underlying protocol models. This article provides a comprehensive understanding of both classification methods, including security recommendations and a comparison table of common wallets.

Signer Introduction

· 5 min read
Pay Protocol Dev
Pay Protocol Dev
Pay Protocol Development Team

This article introduces the working principle, security design, and operational flow of the Pay Protocol Signer, aiming to help merchants understand how to achieve high-security on-chain asset management through an "offline signing + on-chain broadcasting separation" model.

Contract Address Risk Notice

· 2 min read
Pay Protocol Support
Pay Protocol Support
Pay Protocol BD & Support Team

When you make on-chain payments, wallets like TP (TokenPocket) and imToken may display a warning: "The address you entered is a contract address. Please verify before transferring." This warning often causes concern. Below is a detailed explanation.