Last active
August 16, 2019 12:59
-
-
Save Geograph-us/5ce37748bea81b11b2956baff50729f1 to your computer and use it in GitHub Desktop.
Отправка через Qiwi API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
api_key="0000000000000000000000000000000" # API-ключ https://qiwi.com/api | |
pay_to="+77085205652" # кому платим | |
amount="15" # сумма | |
currency="840" # 840 - доллары, 978 - евро, 643 - рубли, 398 - тенге | |
comment="abcde" # код от телеграмм бота | |
curl -X POST 'https://edge.qiwi.com/sinap/api/v2/terms/99/payments' \ | |
-H "Content-Type: application/json" \ | |
-H "Accept: application/json" \ | |
-H "Authorization: Bearer ${api_key}" \ | |
-d '{ | |
"id":"'`date +%s%3N`'", | |
"sum": { | |
"amount":'$amount', | |
"currency":"'$currency'" | |
}, | |
"paymentMethod": { | |
"type":"Account", | |
"accountId":"'$currency'" | |
}, | |
"comment":"'$comment'", | |
"fields": { | |
"account":"'$pay_to'" | |
} | |
}' | json_pp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment