```python
from fastapi import FastAPI, Depends, status, Request
from fastapi.responses import JSONResponse

import helpers

app = FastAPI()

billing = helpers.BillingClient()  # the shared client instance


def get_billing() -> helpers.BillingClient:
    """FastAPI dependency providing the billing client."""
    return billing


@app.post("/charges", status_code=201)
async def create_charge(request: Request, billing: helpers.BillingClient = Depends(get_billing)):
    data = await request.json()
    amount = data.get("amount", None)
    if not isinstance(amount, (int, float)):
        return JSONResponse(status_code=422, content={"detail": "amount must be a number"})
    receipt = billing.charge(amount)
    return {"receipt": receipt}
```