Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.useaxra.com/llms.txt

Use this file to discover all available pages before exploring further.

Installation

pip install axra

Quick start

from axra import Axra

client = Axra(api_key="sk_test_...")

# Create a payment
payment = client.payments.create(
    amount=5000,
    currency="usd",
)
print(payment.id)

Configuration

OptionTypeDefaultDescription
api_keystrrequiredYour secret API key
base_urlstrhttps://api.useaxra.comAPI base URL
api_versionstr2026-04-15Sent as Axra-Version header
max_network_retriesint2Automatic retries on 5xx
timeout_secondsfloat60.0Request timeout

Webhook signature verification

from axra.webhooks import construct_event

@app.route("/webhooks", methods=["POST"])
def handle_webhook():
    signature = request.headers.get("Axra-Signature")
    event = construct_event(
        payload=request.data,
        signature_header=signature,
        secret="whsec_your_signing_secret",
    )

    if event["type"] == "payment.completed":
        # handle payment
        pass

    return "ok", 200

Full API access

The Python SDK includes a fully generated API client for all endpoints:
# Access the full generated client
response = client.http.get("/api/v1/treasury/whoami")