receipts pay
# send request to payme api
from pprint import pprint
from payme.receipts.subscribe_receipts import PaymeSubscribeReceipts
rclient = PaymeSubscribeReceipts(
base_url="https://checkout.test.paycom.uz/api/",
paycom_id="5e730e8e0b852a417aa49ceb",
paycom_key="#MWnwHNYATJo%W@XvO5nISiY&mG7PEuzDX18"
)
resp = rclient._receipts_pay(
invoice_id="631186b6c4420cbf2712a243",
token="63118a5dd15d8d8d093b37b7_X2j34OIJPnROfsgzYZCZ0w7OcC50zzwiowTsotEVO1uUbxkzaDrvdOno6jicQTrcRmxvibxrye4vUS3AynTNPaPCTGpfk3RCKmT9NaOAyyTmctAjWsjwvqGR5XUzAP1Xcx12GkhuQi6VJ4BeaIXOokSRu06rRjaivmJQ8HTiJiR9b3OmZtrhkIRNcNXnnp9zYm1mFP4BuqGpS8BMnY0ASIE6ffxWykjgBcDTAfWBFt4mg7O9Dsvx0aj3IB8z3RIbZYtDZJnUVhCZrwW7ONVI9uEAdxNthorjO6PbV7TQ8XCjrztgGf6uCtOwwxasiIUVZN6tCVDk8A8NvVSUzUHXQHVkaPn5heJNa3K4WsffIckq7SwMbiw3UbawipeZKyD3iwk1Km",
phone="998901304527"
)
pprint(resp)
# response from payme api
{
"jsonrpc": "2.0",
"id": 123,
"result": {
"receipt": {
"_id": "63119becc4420cbf2712a24c",
"create_time": 1662098438706,
"pay_time": 1662098438804,
"cancel_time": 0,
"state": 4,
"type": 2,
"external": false,
"operation": -1,
"category": null,
"error": null,
"description": "",
"detail": null,
"amount": 400000,
"currency": 860,
"commission": 0,
"account": [
{
"name": "transaction",
"title": "Номер чека",
"value": "2326",
"main": true
}
],
"card": {
"number": "860006******6311",
"expire": "9903"
},
"merchant": {
"_id": "5e730e8e0b852a417aa49ceb",
"name": "test",
"organization": "ЧП «test test»",
"address": "",
"business_id": "5e730e740b852a417aa49cea",
"epos": {
"merchantId": "106600000050000",
"terminalId": "20660000"
},
"date": 1584598670296,
"logo": null,
"type": "Internet",
"terms": null
},
"meta": {
"source": "subscribe",
"owner": "5e730e8e0b852a417aa49ceb"
},
"processing_id": 0
}
}
}
Last updated