import requests
import json


def get_invoice(amt: int, memo: str) -> str:
    """
    Returns a Lightning Invoice from the Tallycoin API
    """

    tallydata = {'type': 'fundraiser', 'id': 'zfxqtu', 'satoshi_amount': str(amt), 'payment_method': 'ln',
                 'message': memo}

    response = requests.post('https://api.tallyco.in/v1/payment/request/', data=tallydata).text
    dict = json.loads(response)
    return dict["lightning_pay_request"]