Xendit REST API Client for Python
Project description
Python Xendit Clinet API
Xendit REST API Client for Python
Documentation
Install
Install xenditclient with pip by the following command:
pip install xenditclient
Usage
Configure the XenditClient with the secret key that you can obtained on your Xendit Dashboard Account.
from xenditclient import XenditClient
client = XenditClient(api_key='<your-secret-key>')
EWallets
Create Payment
params = {
'ewallet_type':'OVO',
'external_id':'21345',
'amount':10000,
'phone':'081234567890'
}
res_dict, _ = client.ewallet.create(params)
print(res_dict)
# {
# "business_id": "12345678",
# "external_id": "21345",
# "amount": "10000",
# "phone": "081234567890",
# "ewallet_type": "OVO",
# "status": "PENDING",
# "created": "2020-04-04T00:00:00.000Z",
# }
Get Payment Status
res_dict, _ = client.ewallet.get_payment_status(external_id='21345', payment_method='OVO')
print(res_dict)
# {
# "amount": "10000",
# "business_id": "12345678",
# "ewallet_type": "OVO",
# "external_id": "21345",
# "status": "COMPLETED",
# "transaction_date": "2020-04-04T11:48:47.903Z"
# }
Legal
Disclaimer: This library is not affliated with Xendit. This is an independent and unofficial Library.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xenditclient-0.0.2.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for xenditclient-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3df3177ce246b4b869d1181a21311a511d6bf5960f6071fd22587651b23eef5a |
|
MD5 | 36217ce35dd90708020cda12e5ad888a |
|
BLAKE2b-256 | 0587346e4f322d8ba5cd15819305bddea20823161cc6685879ae344a96797746 |