Hi when paying an invoice with the SendPaymentV2 I get the error 'failure_reason': 'FAILURE_REASON_NO_ROUTE' but when attempting to pay up exactly the same invoice with the v1/channels/transactions REST API endpoint (the deprecated version) instead it works completly fine..
import base64, codecs, json, requests
REST_HOST = 'mybitnet.com:8443'
MACAROON_PATH = './pythonfunctions/keys/lnd_admin.macaroon'
TLS_PATH = './pythonfunctions/fullchain.pem'
#url = f'https://{REST_HOST}/v1/channels/transactions' # DEPRECATED SOON!
url = f'https://{REST_HOST}/v2/router/send'
macaroon = codecs.encode(open(MACAROON_PATH, 'rb').read(), 'hex')
headers = {'Grpc-Metadata-macaroon': macaroon}
invoice_string = '...'
#https://www.bolt11.org/
#Data either filles with dest, amt and payment_hash or with payment_request
data = {
'timeout_seconds': 60,
'payment_request': invoice_string,
}
r = requests.post(url, headers=headers, stream=True, data=json.dumps(data), verify=False)
for raw_response in r.iter_lines():
json_response = json.loads(raw_response)
print(json_response)
Hi when paying an invoice with the SendPaymentV2 I get the error 'failure_reason': 'FAILURE_REASON_NO_ROUTE' but when attempting to pay up exactly the same invoice with the v1/channels/transactions REST API endpoint (the deprecated version) instead it works completly fine..