Asynchronous Python Client for the Payfast API
Uses requests-futures
Available on PyPi
pip install payfast-client
from payfast_client import PayfastClient
client = PayfastClient(merchant_id=123, merchant_passphrase="passphrase")
subscription = client.fetch_subscription(token="abc")
print(subscription)
<Future at 0x107d88520 state=finished returned Response>
print(subscription.result())
<Response [200]>
- Signature Generation
- Error Handling (Sometimes errors returned with response_code=200)
- Endpoints
- GET /ping
- Recurring Billing
- GET /subscriptions/:token/fetch
- PUT /subscriptions/:token/pause
- PUT /subscriptions/:token/unpause
- PUT /subscriptions/:token/cancel
- PATCH /subscriptions/:token/update
- POST /subscriptions/:token/adhoc
- Transaction History
- GET /transactions/history
- GET /transactions/history/daily
- GET /transactions/history/weekly
- GET /transactions/history/monthly
- Credit card transaction query
- GET /process/query/:id