Accept crypto payments in Django | Shieldz

Accept crypto payments in Django

Add non-custodial crypto checkout to your Django app: create an invoice, send the buyer to the hosted checkout, and fulfill on a signed webhook. Funds settle straight to your own wallet, $0 platform fees.

Install

pip install shieldz

Create an invoice and redirect to checkout

from shieldz import Shieldz
shieldz = Shieldz(os.environ["SHIELDZ_API_KEY"])
invoice = shieldz.invoices.create(amount_usd_cents=5000, memo="Order")
return redirect(invoice["pay_url"])

Verify the webhook

from shieldz import construct_event, SignatureVerificationError
def shieldz_webhook(request):
    try:
        event = construct_event(request.body, request.headers.get("X-Shieldz-Signature", ""), os.environ["SHIELDZ_WEBHOOK_SECRET"])
    except SignatureVerificationError:
        return HttpResponse(status=400)
    if event["type"] == "invoice.paid":
        pass  # fulfill
    return HttpResponse(status=200)

Full reference: API docs, SDKs, API reference.

Explore Shieldz

Accept a coin: Bitcoin, USDC, USDT, Zcash.

Compare: vs Coinbase Commerce, vs BTCPay Server, vs CryptAPI, vs NOWPayments.

Use cases: For freelancers, For creators, For open-source projects, For online stores.

Build: SDKs, API reference, quickstart. Learn: overview, blog, how it works, supported coins, pricing, is it safe, verify it yourself.