Skip to content

SDK overview

Two official SDKs wrap the gateway today. Both ship a drop-in checkout widget, both target the same payment endpoints, and both expose lower-level service classes for custom flows.

FlutterAngular
Packagepdirect_pay@mms/pdirect-pay
Latest3.0.01.2.2
Auth modelAuth-v3 (per-checkout session tokens)Auth-v2 (app-key header)
PlatformsAndroid (API 21+), iOS (12.0+)Browsers via Angular 17–21
Web/DesktopNot supportedWeb only (Angular’s domain)
Auto-attach Idempotency-Key❌ (manual)
Auto-attach X-Device-Fingerprint
TLS pinningRoadmap (config field exists)N/A (browser TLS)
Theme tokensPdirectPayThemeConfigPdirectPayThemeConfig
Languagesen, fr, es, ru, zh, lnen, fr, es, ru, zh, ln
  • Building a mobile app → Flutter SDK. It’s the only SDK on Auth-v3, and it ships device-fingerprint binding plus idempotency out of the box.
  • Building a web app in Angular 17+ → Angular SDK, with the caveat that you’re on the legacy auth model until v2.0.0.
  • Building anything else (React web, Vue web, native iOS/Android outside Flutter, server-rendered pages without an Angular framework) → use the HTTP API directly. The SDKs don’t add anything you can’t replicate in 200 lines of HTTP client code.

Both SDKs expose roughly the same shape. Names match where possible.

ConceptFlutterAngular
One-time initPdirectPay.init(config)PdirectPayModule.forRoot(config) or standalone provider
Per-checkout configPdirectPayConfigsPdirectPayConfig
Payment bodyPdirectPaymentBodyPdirectPaymentBody
Drop-in widgetPdirectPayCheckout<pdirect-pay-checkout>
ThemePdirectPayThemeConfigPdirectPayThemeConfig
HTTP clientPdirectHttpClientPdirectHttpClientService
Direct payment servicePdirectPaymentServicePdirectPaymentService
Status enumPdirectPaymentStatusPdirectPaymentStatus
Error code enumPdirectPayApiResponseCodePdirectPayApiResponseCode
Success callbackonResponse: (PdirectPayOnResponse) =>(response)="..." (EventEmitter<PdirectPayOnResponse>)
Error callbackonError: (PdirectPayOnError) =>(error)="..." (EventEmitter<PdirectPayOnError>)

Every public method on either SDK corresponds to a documented endpoint in the API reference. The mapping table is in each endpoint’s x-sdk-methods extension and surfaces in the Scalar UI as “SDK”.

The high-traffic mappings:

HTTP endpointFlutterAngular
POST /payments/collectPdirectPaymentService.createPaymentPdirectPaymentService.createPayment
POST /payments/submitPdirectPaymentService.submitPaymentDetailsPdirectPaymentService.submitPaymentDetails
POST /payments/verify-otpPdirectPaymentService.verifyOtpPdirectPaymentService.verifyOtp
POST /payments/resend-otpPdirectPaymentService.resendOtpPdirectPaymentService.resendOtp
GET /payments/transaction/{id}PdirectPaymentService.getTransactionDetailsPdirectPaymentService.getTransactionDetails
GET /payments/get-config-bankPdirectCommonService.fetchAvailableBanks(call directly via HttpClient)

Server-side endpoints (/internal/sessions/create, /payments/send, /payments/collect-redirect, etc.) are not called from either SDK — integrate them on your backend using HTTP.