async def METHOD_NAME(self, bolt11: str, fee_limit_msat: int) -> PaymentResponse:
    ws = create_connection(self.endpoint)
    ws.send(f"pay-invoice --invoice {bolt11}")
    checking_id, fee_msat, preimage, error_message, payment_ok = (
        None,
        None,
        None,
        None,
        None,
    )
    for _ in range(2):
        r = ws.recv()
        data = json.loads(r)
        checking_id, fee_msat, preimage, error_message, payment_ok = (
            None,
            None,
            None,
            None,
            None,
        )
        if data.get("error") is not None:
            error_message = data["error"].get("message")
            return PaymentResponse(False, None, None, None, error_message)
        if data.get("method") == "payment_succeeded":
            payment_ok = True
            checking_id = data["params"]["payment_hash"]
            fee_msat = data["params"]["fee_msatoshi"]
            preimage = data["params"]["preimage"]
            continue
        if data.get("result") is None:
            return PaymentResponse(None)
    return PaymentResponse(
        payment_ok, checking_id, fee_msat, preimage, error_message
    )