top of page
abstract-background-with-flowing-waves.jpg

Marketplace Payment Solution

Automated crypto distribution

Project goals

01

Automate the distribution of cryptocurrency payments between buyers, sellers, and the marketplace owner.

02

Ensure transparent and secure transactions using smart contracts.

03

Implement a system to handle various payment scenarios, including underpayments, overpayments, and expired intents.

Delivery

Asset 2_4x.png

Custom smart contract development and deployment on PaychainX

Asset 3_4x.png

Backend service integration for real-time payment monitoring

Asset 4_4x.png

Automated fund distribution and transaction recording

Solution

Asset 5_4x.png

A Payment Factory smart contract was developed to create individual payment contracts for each transaction.

Asset 5_4x.png

Buyers are provided with unique Custom Payment Addresses for each purchase.

Asset 5_4x.png

A backend listener service monitors these addresses for incoming payments.

Asset 5_4x.png

Upon receiving the correct amount, a "Payment" smart contract distributes funds automatically.

Asset 5_4x.png

The system handles payment intent expiration, underpayments, and overpayments.

Key features & functionality

Asset 6_4x.png

Custom payment addresses

Unique addresses are generated for each transaction.

Asset 7_4x.png

Automated distribution

Smart contracts automatically distribute funds

Asset 8_4x.png

Real-time monitoring

Backend service tracks incoming payments.

Asset 9_4x.png

Intent management

Handles payment intent expiration and underpayments.

Asset 10_4x.png

Overpayment handling

Automatically returns excess funds.

User roles

Buyer

⬝ Initiates purchases by selecting items and quantities.

⬝ Sends cryptocurrency payments to the generated custom payment address.

⬝ Receives any overpayments automatically.

Seller

Receives the item price minus the marketplace fee after a successful transaction.

Marketplace owner

Receives the marketplace fees from each transaction.

User flow

Purchase initiation

▪ The buyer accesses the marketplace platform.

▪ The buyer selects an item and enters the desired quantity.

Price calculation and intent creation

▪ The system calculates the total price.

▪ The total price is displayed to the buyer.

▪ A purchase intent is created.

▪ A unique "Custom Payment Address" (wallet address on PaychainX is generated for the transaction.

▪ The purchase intent is set to expire after 2 hours.

Payment transfer

The buyer funds the purchase by sending cryptocurrency from any PaychainX wallet to the generated custom payment address.

Payment monitoring

A backend listener service continuously monitors the custom payment address for incoming token transfers.

Payment processing and distribution

▪ Once the correct amount of tokens is received, the back-end operator, with appropriate contract privileges, initiates the deployment of the "Payment" smart contract.

▪ The "Payment" smart contract withdraws the tokens from the custom payment address.

▪ The "Payment" smart contract automatically distributes the funds:

  • Item price × quantity - marketplace fee is sent to the seller.

  • Marketplace fees are sent to the marketplace owner.

▪ All transactions are recorded on the PaychainX ledger.

Transaction confirmation and item delivery

▪ The backend service monitors for transaction confirmation on the PaychainX blockchain.

▪ Upon successful confirmation, the system initiates the item collection and delivery process to the buyer

Intent expiration

If the correct amount of tokens is not received within 2 hours, the purchase intent is deprecated.

Underpayment handling

▪ If tokens are received, but the amount is less than the required total, the purchase intent lifetime is extended to 8 hours.

▪ The buyer can send the remaining amount during this extended period.

▪ If the full payment is not received within the 8-hour window, the partial amount is returned to the buyer, and the intent is deprecated.

Overpayment handling

Any extra tokens sent by the buyer are automatically returned to the buyer's wallet.

Asset 11_4x.png
Asset 12_4x.png

Smart сontracts

The smart contract development team employed well-established design patterns, such as the factory pattern and the minimal proxy standard within the payment gateway, optimizing for efficiency and scalability.

Project features

Asset 5_4x.png

Automated payment distribution

Asset 5_4x.png

Unique payment addresses

Asset 5_4x.png

Real-time payment monitoring

Asset 5_4x.png

Handling of different payment scenarios

bottom of page