支付
加密支付 — 托管收银台与 API,支持 110+ 币种 白标方案 — 整个支付流程都是你的品牌 资金处理 — 自动兑换、提现与风控 批量付款 — 通过 API 或文件批量发放加密货币 平台方案 — 面向市场平台的收款与分佣 行业 — 面向游戏、主机托管、SaaS 等行业的加密货币支付 支付方式 — 加密货币、银行卡、Apple Pay、PayPal 和本地支付方式
兑换 插件 推广联盟 价格 博客 文档 联系我们
语言
登录
Developers

Accept crypto payments with the PHP SDK

The official CryptoPayr PHP SDK lets any PHP application accept Bitcoin, Ethereum, USDT and 110+ other cryptocurrencies. Create a payment, send the customer to the hosted checkout, and confirm the order from a signed webhook — no card data, no chargebacks, settlement to your USD wallet balance.

Download the PHP SDK Create free account

How to accept crypto payments with the PHP SDK

Follow these steps to start taking Bitcoin, Ethereum, USDT and 110+ other coins.

  1. Install the SDK

    Download the zip, unzip it next to your code and require its bundled autoload.php. Using Composer? Add the folder as a path repository and require cryptopayr/php-sdk.

  2. Initialise the client

    Create the client with your secret API key from Dashboard → Developers: $cp = new \CryptoPayr\Client(['api_key' => 'sk_live_…']);

  3. Create a payment

    Call $cp->payments->create([...]) with the amount, currency and your order_id as metadata. You get back a transaction id and a hosted checkout_url.

  4. Redirect to the hosted checkout

    Send the buyer to the returned checkout_url, where they pick a coin and pay. CryptoPayr handles the wallet address, network fees and confirmations.

  5. Verify the webhook

    On your webhook endpoint, validate the X-CryptoPayr-Signature header with CryptoPayr\Webhook::verify($body, $sig, $apiKey), then fulfil the order when status is COMPLETED.

Need the full reference? See the API & webhook documentation, or read about the crypto payment gateway.

Requirements & compatibility

Frequently asked questions

Do I need Composer?

No. The SDK ships with its own autoload.php you can require directly, and also works as a normal Composer package for PSR-4 projects.

How do I prevent fake webhook calls?

Every webhook is signed with HMAC-SHA256 using your API key. The SDK's Webhook::verify() helper checks the signature so only genuine CryptoPayr events are processed.

Which coins can customers pay with?

Bitcoin, Ethereum, USDT, USDC, BNB, Litecoin and 110+ more across multiple networks. The buyer chooses at the hosted checkout.

Where can I see full code examples?

The complete reference lives in the API documentation, including payments, payouts, refunds, balances and live rates.

More crypto payment plugins

Start accepting crypto with the PHP SDK

Create a free CryptoPayr account, grab your API key, and connect the PHP SDK in minutes.

Create free account