GPay API Python Client Library
Project description
gpay-api-client
A Python client library for the GPay API.
Official GPay API Documentation
For full API details, see the GPay API Documentation.
Installation
pip install gpay-sdk
Usage
Import and Create the Client
from gpay.gpay_api_client import GPayApiClient, BaseUrl
# client: GPayApiClient
client = GPayApiClient(
api_key='your_api_key',
secret_key='your_secret_key',
password='your_password',
base_url=BaseUrl.STAGING # or BaseUrl.PRODUCTION
)
Get Wallet Balance
# type: Balance
balance = client.get_balance()
print(balance.balance, balance.response_time)
Create a Payment Request
# type: PaymentRequest
payment_request = client.create_payment_request(amount='100.00', reference_no='INV-123', description='Invoice Payment')
print(payment_request.request_id, payment_request.amount)
Check Payment Status
# type: PaymentStatus
status = client.check_payment_status(request_id=payment_request.request_id)
print(status.is_paid, status.transaction_id)
Send Money
# type: SendMoneyResult
send_result = client.send_money(amount='50.00', wallet_gateway_id='recipient_wallet_id',
description='Gift', reference_no='GIFT-001')
print(send_result.transaction_id, send_result.new_balance)
Get Day Statement
# type: Statement
statement = client.get_day_statement(date='2025-06-22')
print(statement.day_balance)
for tx in statement.day_statement:
# tx: StatementTransaction
print(tx.transaction_id, tx.amount)
Check Wallet
# type: WalletCheck
wallet_info = client.check_wallet(wallet_gateway_id='recipient_wallet_id')
print(wallet_info.exists, wallet_info.wallet_name)
Get Outstanding Transactions
# type: OutstandingTransactions
outstanding = client.get_outstanding_transactions()
print(outstanding.outstanding_credit, outstanding.outstanding_debit)
for tx in outstanding.outstanding_transactions:
# tx: OutstandingTransaction
print(tx.transaction_id, tx.amount)
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
gpay_sdk-1.0.1.tar.gz
(8.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpay_sdk-1.0.1.tar.gz.
File metadata
- Download URL: gpay_sdk-1.0.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d369a896165a688054f1ef6e8d74bd9fe412d68d5d954259632fb5758ed12164
|
|
| MD5 |
e04792c5e2b9a0962a3d9a68a715eb41
|
|
| BLAKE2b-256 |
2b8fac5887bafd01d8859fd9c89829bc7ee66e872d136ae77e782053695f9823
|
File details
Details for the file gpay_sdk-1.0.1-py3-none-any.whl.
File metadata
- Download URL: gpay_sdk-1.0.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e241bbb66895a8804c529d96967185fc7fa772853b62e38bbb3ab49701d241f
|
|
| MD5 |
39d666b012a47a2be81ab94ba2b1b090
|
|
| BLAKE2b-256 |
4527e014d3f0aa11a743cf9675004ed7042639d5bd33b2114d627209320a9aaf
|