Installation
# Python
pip install tranzentica
# Node.js
npm install tranzentica-node
# PHP
composer require tranzentica/tranzentica-php
Authentication
All API requests require authentication using your API key. Keep your keys secure and never share them publicly.
Authorization: Bearer tz_live_YOUR_KEY
# Example
curl https://api.tranzentica.co/v1/payments \
-H "Authorization: Bearer tz_live_YOUR_KEY"
Create Payment
import tranzentica
client = tranzentica.Client(
api_key='tz_live_3x8Hj2k...'
)
# Create payment
payment = client.payments.create(
amount=25000,
currency='INR',
customer_id='usr_8x2k9Lm',
payment_method='upi',
success_url='https://example.com/success',
callback_url='https://example.com/webhook',
metadata={
'order_ref': 'ORD-2025-4892',
'customer_email': 'user@example.com',
'customer_phone': '+91-9876543210'
}
)
print(payment.id) # pay_9kL2mN4x
print(payment.payment_url)