付款
加密貨幣付款 — 託管結帳頁與 API,支援 110+ 幣種 白標方案 — 整個付款流程都掛你的品牌 資金處理 — 自動兌換、提領與控管 大量出金 — 透過 API 或檔案大量發送加密貨幣 平台方案 — 電商平台的收款與抽成
兌換 外掛 推薦計畫 費率 部落格 文件 聯絡我們
語言
登入
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

    Install with Composer using composer require cryptopayr/php-sdk, or drop the folder in and require its bundled autoload.php — the library works with or without Composer.

  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