Every capability of the platform.
Dive into the architecture, benefits and real code of each feature.
Payments
Unified Payment API
createPayment, initThreeDSPayment, refund, cancel, and getPayment take identical types on every provider and return a uniform result shape. Switching gateways is as simple as flipping a configuration string.
Basket & Itemized Checkout
Multi-item carts, VAT breakdowns, marketplace sub-merchant commission payouts and shipping/billing addresses normalized into one type-safe schema.
Pre-Auth, Capture & Void
Place temporary authorization holds on customer cards, capture exact amounts upon service completion, or release funds instantly with zero processing fees.
Stored Cards & Tokenization
Tokenize customer credit cards securely on provider vaults without storing raw PAN numbers on your infrastructure. Deliver friction-free 1-click purchases.
Security
Secure HTTP Handler
Dedicated endpoint handling 3D Secure returns and provider notifications. Validates signatures in constant time and locks administrative actions behind authorization guards.
Events & Lifecycle Hooks
Hook into onPaymentSuccess, onPaymentFailure, onRefund, and onCancel to update your orders, dispatch Slack alerts, or trigger e-invoice generators.
Normalized Error Codes
While iyzico returns '12', Garanti emits '0051', and PayTR outputs '1004', Better Payment unifies them all into INSUFFICIENT_FUNDS with localized user guidance.
Extend
Extensible Plugin Architecture
Hook into any phase of payment execution. Mount fraud scoring, structured audit logging, dynamic tax calculators, and analytics with plug-and-play modules.
Custom Provider Engine
Need to integrate a proprietary regional bank or global processor? Extend BaseProvider and automatically inherit all TypeScript interfaces, HTTP handlers, and error normalizations.
Testing Tools & Sandbox
Built-in MockProvider, sandbox card fixtures, network delay simulators, and test utilities to run automated integration tests in your CI/CD pipeline.