Unofficial SDK for Tripay payment gateway
Project description
Tripay Python SDK (UnOfficial)
Enum Mode
class ModeEnum(str, Enum):
sandbox = "https://tripay.co.id/api-sandbox/"
prod = "https://tripay.co.id/api/"
Authentication
async def payment():
t = Tripay(api_key, private_key, mode)
Closed Transaction
Create Transaction
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.ClosedTransaction.create(merchant_code, payload, order_items)
Detail Transaction
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.ClosedTransaction.detail(payload)
example payload:
{ "reference": "T0001000000000000006" }
Open Transaction
Open Transaction isn't support Sanbox Mode
Create Transaction
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.OpenTransaction.create(payload, order_items)
Example order items:
[ { 'sku': 'PRODUK1', 'name': 'Nama Produk 1', 'price': 500000, 'quantity': 1, 'product_url': 'https://tokokamu.com/product/nama-produk-1', 'image_url': 'https://tokokamu.com/product/nama-produk-1.jpg' }, { 'sku': 'PRODUK2', 'name': 'Nama Produk 2', 'price': 500000, 'quantity': 1, 'product_url': 'https://tokokamu.com/product/nama-produk-2', 'image_url': 'https://tokokamu.com/product/nama-produk-2.jpg' } ]
Detail
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.OpenTransaction.detail(uuid)
Listing Payment
async def payment():
t = Tripay(api_key, private_key, mode)
return await t.OpenTransaction.listing_payment(uuid)
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
tripay_sdk-0.1.0.tar.gz
(6.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 tripay_sdk-0.1.0.tar.gz.
File metadata
- Download URL: tripay_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abc8b33f3ef9fad5e5282fa33e5ebf2364a6c3f6009ebdc4646112bf1d905dfc
|
|
| MD5 |
951d84859ed20346229d89627a5c7437
|
|
| BLAKE2b-256 |
a2920008d773caa18fadb6acd59c58591a82d7e37b2456d9fef9632617d8dcbf
|
File details
Details for the file tripay_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tripay_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46a6fbff0c7589862efe458f665d6bb322a725d4478a2fd6fdb207eaf57cdef8
|
|
| MD5 |
7c2edd64f0d578bad8a81572acc488e2
|
|
| BLAKE2b-256 |
1bd4bd9bd93212f6891675e64b2e1e1abd14fb53c7b4646aa8d246e45896b24c
|