Pagamenti
Pagamenti Cripto — Checkout ospitato e API per 110+ coin White Label — Il tuo marchio su tutto il flusso di pagamento Processing — Conversione automatica, prelievi e controlli Prelievi — Pagamenti cripto in blocco via API o file Platform — Pagamenti e commissioni del marketplace
Swap Plugin Affiliate Prezzi Blog Documentazione Contatti
Lingua
Accedi
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