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
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 30+ 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 30+ other coins.

  1. Install the SDK

    Run pip install cryptopayr, or vendor the single module 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 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