Python Wrapper for thePeer payment infrastructure.
Project description
ThePeer Python Sdk
python SDK for ThePeer payment infrastructure
Reference Official Documentation
Instantiate ThePeer api object
from ThePeer.client import Client
client = Client(api_key="YOUR PRIVATE KEY")
"""
returns all indexed users for your business
"""
client.get_users()
"""
Index/create users
data = {"name" : "", "identifier" : "", "email" : ""}
"""
client.create_user(data=data)
"""
Update indexed user
the method requires two arguments, the user's ReferenceId and the user's new identifier
referenceId = ""
data = {"identifier" : ""}
"""
client.update_user(referenceId, data=data)
"""
Delete indexed user
this methods allows you to delete an indexed user on your business profile
referenceId = ""
"""
client.delete_user(referenceId)
# Transactions
"""
returns all the details of a particuar transaction
transactionId = ""
"""
client.get_transaction(transactionId)
"""
This method refunds a specific transaction back to its origin (business & user of that business)
it requires two arguments by default transactionId and refund details, alternatively, you can
pass in only the transactionId and we'd use the default refund data i.e data = {"reason": "possible fraud"}
"""
client.refund_transaction(transactionId)
"""
This returns all linked accounts associated with a user, It returns the user's account details along with he business the account resides on.
pass in the linkId to identify and get user's links
"""
client.get_user_links(linkId)
"""
Similarly the method returns a linked account details by passing its ID.
"""
client.get_user_link(linkId)
"""
This method enables you to charge your user's linked account
where data = {
"amount": ,
"remark": ""
}
"""
client.charge(linkId, data)
"""
This method allows you simulate receiving money
data = {
"amount": ,
"currency": "",
"user_reference": ""
}
"""
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python-thepeer-1.1.0.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file python-thepeer-1.1.0.tar.gz
.
File metadata
- Download URL: python-thepeer-1.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.21.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d65eada67b84bf53c5d44d89874891380e3974c5fc8259e155da49761b739c7d |
|
MD5 | 8912532209135262119913561b7f0167 |
|
BLAKE2b-256 | 63f3040cbe2a596ae0b20401ec04207139be1e8d9d888c8c98b7687d366fdfec |
File details
Details for the file python_thepeer-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: python_thepeer-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.21.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54c0b7c52942f2fbc5bdc6519c79bf5f16baf33884357434c8d7cda03a0a9c01 |
|
MD5 | 40f4aeb717db8e63ba9a75dc3d75cc4c |
|
BLAKE2b-256 | 62771922d5ccfad22dc15a0bbf13fce0d2d65234d6f71665eaf0d5fc7d2b4805 |