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

Accept crypto payments with the Python SDK

The official CryptoPayr Python SDK is a pure standard-library client — zero dependencies — for accepting Bitcoin, Ethereum, USDT and 110+ cryptocurrencies in Django, Flask, FastAPI or any Python service.

Download the Python SDK Create free account

How to accept crypto payments with the Python SDK

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

  1. Install the SDK

    Run pip install cryptopayr, or vendor the package directly — it has no third-party dependencies.

  2. Initialise the client

    Create the client with your secret API key from Dashboard → Developers: cp = cryptopayr.Client("sk_live_…")

  3. Create a payment

    Call cp.payments.create({"amount": …, "currency": "USD", "metadata": order_id}) and read the returned checkout_url and transaction id.

  4. Redirect to the hosted checkout

    Send the customer to the checkout_url. They choose a coin and pay; CryptoPayr manages addresses, fees and confirmations.

  5. Verify the webhook

    In your webhook view, call cryptopayr.webhook.verify(body, signature, api_key) and fulfil the order when the event status is COMPLETED.

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

Requirements & compatibility

Frequently asked questions

Which frameworks does it work with?

Any of them — the client is framework-agnostic. Use it from Django, Flask, FastAPI, a worker or a plain script.

How do I verify webhooks?

Use cryptopayr.webhook.verify(), which checks the HMAC-SHA256 signature in the X-CryptoPayr-Signature header against your API key before you trust the payload.

Is the SDK synchronous?

Yes, the core client is simple and synchronous; call it from a background task or thread if you need non-blocking behaviour.

Where are the full examples?

See the API documentation for payments, payouts, refunds, balances, rates and conversion.

More crypto payment plugins

Start accepting crypto with the Python SDK

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

Create free account