How transbankdevelopers/transbank-sdk-nodejs works
Project type and purpose
• This is an SDK/library (not an end-user app) written in Node.js/TypeScript that wraps Transbank’s payment APIs (Webpay, Patpass) into a consumable module.
• Its purpose is to expose a set of clients and request builders that your own Node.js services can call to integrate with Transbank’s external REST endpoints.
File structure
• Top-level files:
• package.json, tsconfig.json, build & test scripts → build/test pipeline
• lib/ → the compiled TypeScript output placed under src-coded folders
• tests/ → Jest tests and mock data
• Under lib/transbank:
• common/ → shared abstractions (API constants, base transaction, request base, error handling, validation)
• webpay/ → three products (oneclick, transaccion_completa, webpay_plus), each with:
– common (environment, transaction/installments detail)
– transaction models
– requests (start, commit, refund, status, etc.)
• patpass/ → transaction models & request builders for Patpass Recurring
• Config files: .github/workflows/*.yml → CI pipelines, jest.config.js → test runner, sonar-project.properties → code analysis
README for additional insights
• Clarifies supported environments (integration, production)
• Lists installation, build & test commands
• Points to external documentation (Transbank developer portal)
Elements
• From Client App → SDK public methods
• SDK internal flow: Config → Common → Product Module → HTTP Transport → Transbank API → back