Getting Started

Complete API integration guide with live examples

Quick Setup

Get started in under 10 minutes with our SDKs

📚

Full Examples

Code samples for every use case

🔔

Webhooks

Real-time event notifications

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

create_payment.py
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)

Webhook Events

Receive real-time notifications for payment events. Configure your webhook URL in the dashboard.

webhook_handler.py
@app.route('/webhook', methods=['POST'])
def handle_webhook():
    payload = request.get_json()
    event_type = payload['event']
    
    if event_type == 'payment.success':
        payment_id = payload['data']['id']
        amount = payload['data']['amount']
        # Update your database
        process_successful_payment(payment_id, amount)
        
    elif event_type == 'payment.failed':
        # Handle failed payment
        handle_payment_failure(payload['data'])
        
    return {'status': 'received'}, 200

API Endpoints

POST
/v2/payments/create
Initialize payment transaction
GET
/v2/payments/:id
Fetch payment details
POST
/v2/payouts/send
Process payout request
GET
/v2/transactions
List all transactions

Need Help?

Our support team is available 24/7.