Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

setu-0.5.1-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page