Answer the question
In order to leave comments, you need to log in
How to issue an invoice for payment with QIWI API?
I'm trying to issue an invoice for payment:
headers = {
'accept': 'application/json',
'content-Type': 'application/json',
'authorization': f'Bearer {token}'
}
form = {
'amount': {
'currency': 'RUB',
'value': '5.00',
},
'comment': 'На арбуз!',
'expirationDateTime': '2022-03-28T20:00:00+00:30'
}
bill_id = 'cc961e8dd4d64f02b7372297e51fb48e'
url = f'https://api.qiwi.com/partner/bill/v1/bills/{bill_id}'
resp = requests.put(url, json=form, headers=headers)
print(resp)
Response [401]
Answer the question
In order to leave comments, you need to log in
Send your request to https://httpbin.org/ instead of QIWI. This will allow you to see if your request is being formed correctly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question