SDK to help Pythonistas integrate with Setu's APIs
Project description
Setu
SDK to help Pythonistas integrate with Setu's APIs
Currently the following APIs are supported.
- UPI DeepLinks
We're constantly adding new API support. Feel free to reach out to us if you can't see an API.
Installation
pip install setu
Usage
UPI DeepLinks
The following actions are currently supported
- Generate payment link
- Check status of payment link
Configuration
from setu import deeplink
dl = deeplink.Deeplink(
"YOUR SCHEME ID",
"YOUR JWT SECRET",
"YOUR PRODUCT INSTANCE ID",
mode="PRODUCTION | SANDBOX" # default SANDBOX
)
Generate UPI payment link
link = dl.create_payment_link(
amountValue=Number,
billerBillID=String,
amountExactness=String,
dueDate=String, # Optional
payeeName=String, # Optional
expiryDate=String, # Optional
settlement=Object, # Optional
validationRules=Object # Optional
)
print(link)
Check status of UPI payment link
status = dl.check_payment_status(
platformBillID=String
)
print(status)
Trigger mock payment for UPI payment link - ONLY IN SANDBOX ⚠️
status = dl.trigger_mock_payment(
amountValue=Number, # Decimal Value
upiID=String # UPI ID generated by create_payment_link method
)
print(status)
License
MIT
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
setu-0.5.5.tar.gz
(3.9 kB
view details)
Built Distribution
setu-0.5.5-py3-none-any.whl
(4.5 kB
view details)
File details
Details for the file setu-0.5.5.tar.gz
.
File metadata
- Download URL: setu-0.5.5.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 312ee9815ca1b036be0cc3949ffb254ff2fe1928ae5a60b4abf5961e6000e266 |
|
MD5 | eb81860ac4eb39b4562ddab4b20a585e |
|
BLAKE2b-256 | cd8de95f4452fab1e86bcf374560b1d8986fc2c05dcb09313fc4841213f32bfb |
Provenance
File details
Details for the file setu-0.5.5-py3-none-any.whl
.
File metadata
- Download URL: setu-0.5.5-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6dcc21ec6396b82f55b6835dab02862c0135f0a93d2a271f1d0735a28a0f784 |
|
MD5 | 36f3797031da8ced78f4c0183a3a30c5 |
|
BLAKE2b-256 | 2edeabd967d43bc7303173bfaf5d767758d167a68b1c724ad9d320ec436a014a |