PHPackages                             dappcrypto/cpay - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. dappcrypto/cpay

ActiveLibrary[Payment Processing](/categories/payments)

dappcrypto/cpay
===============

DApp Crypto payment gateway SDK without KYC/KYB. Supports MetaMask and Trust Wallet. Payments in USDT, USDC, ETH, BNB, BTC.

v1.0.2(6mo ago)03MITPHPPHP &gt;=8.0

Since Dec 25Pushed 6mo agoCompare

[ Source](https://github.com/DAppCrypto/cpay)[ Packagist](https://packagist.org/packages/dappcrypto/cpay)[ RSS](/packages/dappcrypto-cpay/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

DApp Crypto Payment Gateway SDK
===============================

[](#dapp-crypto-payment-gateway-sdk)

PHP SDK for accepting cryptocurrency payments **without KYC/KYB**.
Supports MetaMask, Trust Wallet and popular cryptocurrencies.

---

🚀 Features
----------

[](#-features)

- No KYC / No KYB
- Crypto payments
- Wallets: MetaMask, Trust Wallet
- Currencies: USDT, USDC, ETH, BTC
- Networks: Ethereum, BNB Smart Chain and others
- Invoice generation
- Self-custody
- Composer installation
- MIT License

---

🔧 Installation
--------------

[](#-installation)

```
composer require dappcrypto/cpay
```

### Create Invoice

[](#create-invoice)

[examples/CreateInvoice.php](/cpay/examples/CreateInvoice.php) - Example Create Invoice

```
use cpay\CPay;

$PrivateKey = '...'; // Your private key for aRecipient
$PDataObj = [
    'aRecipient'=>'0x...', // Your wallet account address (aRecipient)
    'aRecipientExt'=>'0x...', // Your wallet address for receiving USDT, USDC cryptocurrency
    'deadline'=>(time()+(60*60*24*365)), // Deadline time seconds UTC
    'nOrder'=>'1', // Order ID
    'nRToken'=>"1.50", // Amount USDT, USDC
    'nRType'=>'1', // 1 - USDT, 2 - USDC
    'sTextData'=>CPay::instance()->getTextData(['success'=>'','error'=>'','return'=>'','Description'=>''])['base64String'],
    'start'=>time(),
];
$DefaultChainId = 1;

$InvoiceData = CPay::instance()->createInvoice($PDataObj, $PrivateKey, $DefaultChainId);
if($InvoiceData['error']!=0){
    // Error creating invoice
} else {
    // The invoice has been successfully created.
    echo 'Pay';
}
```

### Get Invoice Status

[](#get-invoice-status)

```
use cpay\CPay;

$aRecipient = '0x...';
$nOrder = '1';

$OrderData = CPay::instance()->getOrderData($aRecipient, $nOrder);
if($OrderData['error']!=0){
    // Payment failed or is pending confirmation. Please try again later.
} else {
    // TODO The order has been successfully paid.
}
```

### Webhook

[](#webhook)

[examples/PageWebhook.php](/cpay/examples/PageWebhook.php) - Example Create Invoice

```
use cpay\CPay;

$aRecipient='0x...';
$WebhookData = CPay::instance()->getWebhook($aRecipient);
if($WebhookData['error']!=0){
    // Order error
    print_r($WebhookData);
} else {
    // TODO Order success
    echo 'Order: '.$WebhookData['orderData']['nOrder'].' was successfully paid in chain id: '.$WebhookData['orderData']['chain'].' aRecipient:'. $WebhookData['orderData']['aRecipient'];
}
```

---

Shop Registration (No KYC / No KYB)
-----------------------------------

[](#shop-registration-no-kyc--no-kyb)

### Registration steps:

[](#registration-steps)

1. **Create a new account in MetaMask wallet**
2. Go to **** and create a shop in Ethereum, BNB Smart Chain and others
3. Set the URL
    - [examples/PageWebhook.php](/cpay/examples/PageWebhook.php) - Example Webhook page
    - [examples/PageSuccess.php](/cpay/examples/PageSuccess.php) - Example Success page
4. Use the **private key and wallet address** of this account in the SDK

---

⚠ IMPORTANT SECURITY WARNINGS
-----------------------------

[](#-important-security-warnings)

**Attention!**
A **separate account with a private key** must be used **ONLY** for:

- shop registration
- shop management on **dappcrypto.github.io**
- invoice creation

**Attention!**
To **receive cryptocurrency payments**, specify a **different wallet** in the SDK
and **keep its private key strictly secret**.

Failure to follow these rules may result in **loss of funds**.

---

Versions
--------

[](#versions)

- [v1.0.2](https://github.com/DAppCrypto/cpay/releases/tag/v1.0.2) - Signature update.
- [v1.0.1](https://github.com/DAppCrypto/cpay/releases/tag/v1.0.1) - The success page example has been updated.
- [v1.0.0](https://github.com/DAppCrypto/cpay/releases/tag/v1.0.0) - PHP SDK for accepting cryptocurrency payments

---

Requirements
------------

[](#requirements)

- PHP **&gt;= 8.0**

---

Contacts
--------

[](#contacts)

- Website:
- GitHub Website:
- Telegram:

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance68

Regular maintenance activity

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

188d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/157296424?v=4)[DAppCrypto](/maintainers/DAppCrypto)[@DAppCrypto](https://github.com/DAppCrypto)

### Embed Badge

![Health badge](/badges/dappcrypto-cpay/health.svg)

```
[![Health](https://phpackages.com/badges/dappcrypto-cpay/health.svg)](https://phpackages.com/packages/dappcrypto-cpay)
```

###  Alternatives

[msilabs/bkash

bKash Payment Gateway API for Laravel Framework.

181.2k](/packages/msilabs-bkash)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
