Tapsilat Rust SDK
Enterprise-grade Rust SDK for Tapsilat Payment Processing Platform
About Tapsilat
Tapsilat is Turkey's leading fintech platform providing comprehensive payment processing solutions for businesses of all sizes. Our cutting-edge technology enables secure, fast, and reliable payment transactions with support for multiple payment methods, currencies, and advanced fraud protection.
Quick Start
Initialize the SDK
use ;
let client = from_api_key?;
// Or with advanced configuration
let config = new
.with_base_url
.with_timeout;
let client = new?;
Create an Order
use ;
let order_request = CreateOrderRequest ;
let order = client.create_order?;
println!;
Check Order Status
let status = client.get_order_status?;
println!;
Features
Core Payment Operations
- Secure authentication with bearer tokens
- Complete payment lifecycle management
- Multi-currency support (TRY, USD, EUR, GBP)
- Advanced filtering and pagination
Payment Term Management
- Create and manage installment plans
- Update payment terms (amount, dates, status)
- Delete payment terms
- Term-specific refunds and termination
- Complete order termination
Validation & Utilities
- Turkish GSM number validation and formatting
- Installment validation with flexible input formats
- Input validation for all request parameters
- Webhook signature verification
Technical Features
- Full Rust type safety
- Zero-copy deserialization with serde
- Async/await support
- Configuration management
- Request/response validation
- Comprehensive error handling
SDK Compatibility
This Rust SDK provides full feature parity with Tapsilat's JavaScript and Python SDKs:
| Feature Category | Rust | JavaScript | Python |
|---|---|---|---|
| Order Management | Yes | Yes | Yes |
| Payment Terms | Yes | Yes | Yes |
| GSM Validation | Yes | Yes | Yes |
| Installment Validation | Yes | Yes | Yes |
| Webhook Verification | Yes | Yes | No |
| Type Safety | Yes | Yes | No |
| Memory Safety | Yes | No | No |
API Methods & Examples
Order Management
Create Order
use CreateOrderItemRequest;
let order_request = CreateOrderRequest ;
let order = client.create_order?;
Get Order Details
let order = client.get_order?;
println!;
println!;
Check Order Status
let status = client.get_order_status?;
println!;
List Orders
let orders = client.get_order_list?;
println!;
Cancel Order
match client.cancel_order
Payment Operations
Get Payment Details
let payment_details = client.get_order_payment_details?;
println!;
Get Transaction History
let transactions = client.get_order_transactions?;
println!;
Get Checkout URL
let checkout_url = client.get_checkout_url?;
println!;
Refund Operations
Process Partial Refund
let refund_result = client.refund_order?;
println!;
Process Full Refund
let full_refund = client.refund_all_order?;
println!;
Webhook Handling
Verify Webhook Signature
use WebhookModule;
// In your webhook handler
Payment Term Management
Create Installment Plan
use CreateInstallmentPlanRequest;
let installment_request = CreateInstallmentPlanRequest ;
let plan = client.installments.create_plan?;
println!;
Validation Utilities
GSM Number Validation
use Validators;
// Validate and normalize Turkish GSM numbers
let gsm_result = validate_gsm?;
println!; // "905551234567"
// Supports multiple formats
let formats = vec!;
for gsm in formats
Installments Validation
// Validate installment counts
let valid_installments = vec!;
for count in valid_installments
Email and Amount Validation
// Email validation
validate_email?;
// Amount validation (currency precision)
validate_amount?;
// Turkish identity number validation
validate_identity_number?;
Advanced Configuration
The SDK can be customized with various configuration options:
use Config;
let config = new
.with_base_url
.with_timeout; // 30 seconds
let client = new?;
Authentication
Use Bearer Token authentication:
// Simple initialization
let client = from_api_key?;
// Or via environment variable
use env;
let api_key = var?;
let client = from_api_key?;
Get your API token from the Tapsilat Dashboard → Settings → API Keys
License
This project is licensed under the MIT License - see the LICENSE file for details.
Resources
- Website: https://tapsilat.dev
- Issues: GitHub Issues
- Examples: See examples/advanced_usage.rs for a complete implementation
Type System
All Rust types are organized in src/types/ with comprehensive documentation including:
- Strong compile-time type safety
- Zero-cost abstractions
- Memory safety guarantees
- Comprehensive error handling with
Resulttypes