def create_invoice(price=Config.TIP_AMOUNT, currency=Config.TIP_CURRENCY, order_id=None, desc=None, notification_url=None, redirect_url=None):
    "\n    Creates a new invoice and returns invoice id\n    :param price: a given price (default is bitcoin)\n    :param currency: currency ticker from bitpay API: 'USD', 'EUR', 'BTC' etc\n    :return: invoice_id -> str\n    "
    client = get_client()
    try:
        new_invoice = client.create_invoice({'price': price, 'currency': currency, 'orderId': order_id, 'itemDesc': desc, 'notificationUrl': notification_url, 'redirectUrl': redirect_url})
        return new_invoice['id']
    except Exception as e:
        print(e)
        return 'XXX'
Creates a new invoice and returns invoice id
:param price: a given price (default is bitcoin)
:param currency: currency ticker from bitpay API: 'USD', 'EUR', 'BTC' etc
:return: invoice_id -> str
def create_invoice(price=Config.TIP_AMOUNT, currency=Config.TIP_CURRENCY, order_id=None, desc=None, notification_url=None, redirect_url=None):
    "\n    Creates a new invoice and returns invoice id\n    :param price: a given price (default is bitcoin)\n    :param currency: currency ticker from bitpay API: 'USD', 'EUR', 'BTC' etc\n    :return: invoice_id -> str\n    "
    client = get_client()
    try:
        new_invoice = client.create_invoice({'price': price, 'currency': currency, 'orderId': order_id, 'itemDesc': desc, 'notificationUrl': notification_url, 'redirectUrl': redirect_url})
        return new_invoice['id']
    except Exception as e:
        print(e)
        return 'XXX'