{"id":33326813,"url":"https://github.com/tillhub/payment-engine","last_synced_at":"2026-03-11T12:26:53.367Z","repository":{"id":299975220,"uuid":"578173252","full_name":"tillhub/payment-engine","owner":"tillhub","description":"Android library which combines different payments SDKs into single interface solution","archived":false,"fork":false,"pushed_at":"2025-11-14T14:05:18.000Z","size":2175,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-11-14T15:13:26.999Z","etag":null,"topics":["android","library"],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tillhub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-14T12:34:51.000Z","updated_at":"2025-10-13T06:41:30.000Z","dependencies_parsed_at":"2025-07-14T09:15:23.824Z","dependency_job_id":"5c099557-7f15-46ca-bc50-daa79d4fd098","html_url":"https://github.com/tillhub/payment-engine","commit_stats":null,"previous_names":["tillhub/payment-engine"],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/tillhub/payment-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tillhub%2Fpayment-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tillhub%2Fpayment-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tillhub%2Fpayment-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tillhub%2Fpayment-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tillhub","download_url":"https://codeload.github.com/tillhub/payment-engine/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tillhub%2Fpayment-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285431195,"owners_count":27170451,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-20T02:00:05.334Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","library"],"created_at":"2025-11-20T12:00:31.706Z","updated_at":"2025-11-20T12:00:51.377Z","avatar_url":"https://github.com/tillhub.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![](https://jitpack.io/v/tillhub/payment-engine.svg)](https://jitpack.io/#tillhub/payment-engine)\n[![API](https://img.shields.io/badge/API-24%2B-green.svg?style=flat)](https://android-arsenal.com/api?level-11) \n# Payment Engine\n\nAndroid library which combines different payments protocols into single interface solution. So far supported payments are:\n* **ZVT** - Zero Reactive Voltage Transmission is an german abbreviation and stands for Payment Terminal\n* **OPI** - The Open Payment Initiative, or O.P.I. for short\n# How to setup\n\n**Step 1.** Add the JitPack repository to your `settings.gradle` file:\n\n```groovy\ndependencyResolutionManagement {\n    repositories {\n        ...\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n}\n```\n\n**Step 2.** Add the dependency to your app `build.gradle`:\n```groovy\ndependencies {\n    implementation 'com.github.tillhub:payment-engine:x.x.x'\n}\n```\n# Usage\n\nThere are two ways you can use payment SDK: \n* First one would be manually registering activity result contract (callback) \n* Second one is via helper class `PaymentEngine.kt`\n\n### 1. Register a callback for an activity result\n\nIn UI component like Activity or Fragment first register one of Payment contracts:\n* `PaymentContract` - use for new card payment\n* `PaymentRefundContract` - use for refunds\n* `PaymentReversalContract` - use for payment reversal\n* `TerminalReconciliationContract` - use for terminal reconciliation\n\n```kotlin\nval getPayment = registerForActivityResult(PaymentContract()) {\n    // Handle the returned payment response\n}\n\noverride fun onCreate(savedInstanceState: Bundle?) {\n    // ...\n\n    val paymentButton = findViewById\u003cButton\u003e(R.id.payment_button)\n\n    paymentButton.setOnClickListener {\n        // Pass in PaymentRequest as the input\n        getPayment.launch(PaymentRequest(...))\n    }\n}\n```\n\n### 2. Usage of PaymentEngine\n\n`PaymentEngine.kt` is singlton helper class which tries to simplify the process of implementation and it gives you access to all library available actions (managers).\n\n* `PaymentManager` is used to start of a card payment transaction\n* `RefundManager` is used to start of a partial card payment refund\n* `ReversalManager` is used to start of a card payment reversal\n* `ReconciliationManager` is used to start of a terminal reconciliation\n\nIt also gives you more flexibility setting up terminal configuration, observing result through singleton Flow and triggering actions with multiple methods. \n\n```kotlin\nprivate val paymentEngine: PaymentEngine by lazy {\n    PaymentEngine.getInstance()\n}\n\noverride fun onCreate(savedInstanceState: Bundle?) {\n    // ...\n\n    val paymentManager = paymentEngine.newPaymentManager(this)\n\n    ...\n\n    paymentButton.setOnClickListener {\n        // Pass in PaymentRequest as the input\n        paymentManager.startPaymentTransaction(...)\n    }\n\n    lifecycleScope.launch {\n        lifecycle.repeatOnLifecycle(Lifecycle.State.CREATED) {\n            paymentManager.observePaymentState()\n                .collect {\n                    // Handle payment response\n                }\n        }\n    }\n}\n```\n\nHere's example of `PaymentManager` interface and what provides:\n\n```kotlin\ninterface PaymentManager {\n    fun putTerminalConfig(config: Terminal)\n    fun observePaymentState(): SharedFlow\u003cTerminalOperationStatus\u003e\n    fun startPaymentTransaction(amount: BigDecimal, currency: ISOAlphaCurrency)\n    fun startPaymentTransaction(amount: BigDecimal, currency: ISOAlphaCurrency, configId: String)\n    fun startPaymentTransaction(amount: BigDecimal, currency: ISOAlphaCurrency, config: Terminal)\n}\n```\nIn case you do not provide terminal configuration default one will be used (ZVT, ip:*127.0.0.1*, port:*40007*)\n\n## Credits\n\n- [Đorđe Hrnjez](https://github.com/djordjeh)\n- [Martin Širok](https://github.com/SloInfinity)\n- [Chandrashekar Allam](https://github.com/shekar-allam)\n\n## License\n\n```licence\nMIT License\n\nCopyright (c) 2024 Tillhub GmbH\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftillhub%2Fpayment-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftillhub%2Fpayment-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftillhub%2Fpayment-engine/lists"}