Payments
Crypto Payments — Hosted checkout & API for 30+ coins White Label — Your brand on the entire payment flow Processing — Auto-convert, withdrawals & controls Payouts — Mass crypto payouts by API or file Platform — Marketplace payments & commissions
Plugins Affiliate Pricing Blog Docs Contact
Sign in
Developers

Accept crypto payments with the PHP SDK

The official CryptoPayr PHP SDK lets any PHP application accept Bitcoin, Ethereum, USDT and 30+ 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 30+ other coins.

  1. Install the SDK

    Install with Composer using composer require cryptopayr/cryptopayr-php, or drop the standalone file in and require it — 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('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 as a single standalone file you can require directly, and is also published on Packagist for Composer 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 30+ 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