Skip to Content
FrameworksOverview

Framework Packages

Framework-specific integration packages built on top of QPay core SDKs. Each package follows the conventions of its target framework, providing dependency injection, configuration, webhook handling, UI components, and event-driven payment notifications out of the box.

Available Frameworks

FrameworkPackageRegistryLanguageBase SDK
Laravelqpay-sdk/laravelPackagist PHPqpay-php
Djangodjango-qpayPyPI Pythonqpay-py
Spring Bootqpay-spring-boot-starterMaven Central Javaqpay-java
Express@qpay-sdk/expressnpm TypeScriptqpay-js
NestJS@qpay-sdk/nestjsnpm TypeScriptqpay-js
Railsqpay-railsRubyGems Rubyqpay
ASP.NET CoreQPay.AspNetCoreNuGet C#QPay
Flutterqpay_flutterpub.dev Dartqpay
FastAPIfastapi-qpayPyPI Pythonqpay-py

What Each Package Provides

All framework packages share a common set of features:

  • Auto-configuration — Zero-boilerplate setup using the framework’s native configuration system
  • Dependency injection — QPay client registered as a service/singleton in the framework’s DI container
  • Webhook controller — Pre-built endpoint that receives QPay callbacks, verifies payments, and dispatches events
  • Events/Signals — Framework-native events fired when payments are received or fail
  • UI helpers — QR code rendering and bank payment link components (Blade, Thymeleaf, Django templates, ERB, Flutter widgets)
  • Testing support — Mock-friendly architecture with testable service interfaces

Architecture

Each framework package is a thin wrapper around its corresponding core SDK:

Your Application | Framework Package (Laravel, Django, Spring Boot, etc.) | Core SDK (qpay-php, qpay-py, qpay-java, qpay-js, etc.) | QPay V2 REST API

The framework package handles configuration, DI, routing, and events. The core SDK handles HTTP requests, authentication, token management, and serialization.

Environment Variables

All framework packages use the same set of environment variables:

VariableDescriptionDefault
QPAY_BASE_URLQPay API base URLhttps://merchant.qpay.mn
QPAY_USERNAMEMerchant username(required)
QPAY_PASSWORDMerchant password(required)
QPAY_INVOICE_CODEDefault invoice code(required)
QPAY_CALLBACK_URLWebhook callback URL(required)

Choosing a Framework Package

If your framework is not listed, use the core SDK directly for your language.

Last updated on