'Create a payment request.'

@command('w')
def addrequest(self, amount, memo='', expiration=None, force=False):

    addr = self.wallet.get_unused_address()
    if (addr is None):
        if force:
            addr = self.wallet.create_new_address(False)
        else:
            return False
    amount = satoshis(amount)
    expiration = (int(expiration) if expiration else None)
    req = self.wallet.make_payment_request(addr, amount, memo, expiration)
    self.wallet.add_payment_request(req, self.config)
    out = self.wallet.get_payment_request(addr, self.config)
    return self._format_request(out)
