Skip to main content

Unofficial SDK for Tripay payment gateway

Project description

Tripay Python SDK (UnOfficial)

Docs

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


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 hashes)

Uploaded Source

Built Distribution

tripay_sdk-0.1.0-py3-none-any.whl (9.7 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