Варианты:
Проверь: ключ API, ID продавца и ID проекта.
правильный ли URL для конечной точки API?
Какой ответ от API получаешь? выведи в responce.text
api_id = 'your_api_id'
project_id = 'your_project_id'
pay_id = 101
amount = 10.00
currency = 'RUB'
desc = 'Test'
method = 'card'
email = 'r@mail.ru'
api_key = 'your_api_key'
sign = hashlib.sha256(f'create-payment{api_id}{project_id}{pay_id}{amount}{currency}{desc}{method}{api_key}'.encode()).hexdigest()
response = requests.get(f'https://anypay.io/api/create-payment/{api_id}',
params={'project_id': project_id,
'pay_id': pay_id,
'amount': amount,
'currency': currency,
'desc': desc,
'method': method,
'email': email,
'sign': sign})
response_json = json.loads(response.text)
if 'result' in response_json:
url = response_json['result']['payment_url']
print(url)
else:
print(response_json['error'])
Можешь попробовать это