{"id":33959551,"url":"https://github.com/klix-app/merchant-api-php","last_synced_at":"2025-12-12T21:16:28.070Z","repository":{"id":56841496,"uuid":"199466570","full_name":"klix-app/merchant-api-php","owner":"klix-app","description":"Klix merchant API PHP SDK","archived":false,"fork":false,"pushed_at":"2024-05-08T15:34:31.000Z","size":113,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-03T14:16:35.139Z","etag":null,"topics":["checkout","klix","klix-checkout","library","php","php-sdk","sdk"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klix-app.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-29T14:16:14.000Z","updated_at":"2025-05-22T14:17:49.000Z","dependencies_parsed_at":"2024-05-08T17:18:37.654Z","dependency_job_id":null,"html_url":"https://github.com/klix-app/merchant-api-php","commit_stats":{"total_commits":48,"total_committers":7,"mean_commits":6.857142857142857,"dds":0.4375,"last_synced_commit":"7bba56cfa02a18172d12661992c0193c482412e0"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/klix-app/merchant-api-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klix-app%2Fmerchant-api-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klix-app%2Fmerchant-api-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klix-app%2Fmerchant-api-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klix-app%2Fmerchant-api-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klix-app","download_url":"https://codeload.github.com/klix-app/merchant-api-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klix-app%2Fmerchant-api-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27669171,"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-12-11T02:00:11.302Z","response_time":56,"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":["checkout","klix","klix-checkout","library","php","php-sdk","sdk"],"created_at":"2025-12-12T21:16:25.266Z","updated_at":"2025-12-12T21:16:28.061Z","avatar_url":"https://github.com/klix-app.png","language":"PHP","readme":"# Klix PHP library #\n\n## Requirements ##\n\nPHP 7.2 and later.\n\nThe following PHP extensions are required:\n\n* curl\n* json\n* openssl\n\n## Installation ##\n\n## Composer ##\n\nTo install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`:\n\n```json\n{\n  \"require\": {\n    \"klix/klix-sdk-php\": \"*@dev\"\n  }\n}\n```\n\nThen run\n\n```bash\ncomposer install\n```\n\n## Manual Installation ##\n\nDownload the files and include `autoload.php`:\n\n```php\nrequire_once('/path/to/klix-sdk-php/vendor/autoload.php');\n```\n\n## Getting Started ##\n\nSimple usage looks like:\n\n```php\n\u003c?php\nrequire_once 'vendor/autoload.php';\n$klix = new \\Klix\\KlixApi($config['brand_id'], $config['api_key'], $config['endpoint']);\n$client = new \\Klix\\Model\\ClientDetails();\n$client-\u003eemail = 'test@example.com';\n$purchase = new \\Klix\\Model\\Purchase();\n$purchase-\u003eclient = $client;\n$details = new \\Klix\\Model\\PurchaseDetails();\n$product = new \\Klix\\Model\\Product();\n$product-\u003ename = 'Test';\n$product-\u003eprice = 100;\n$details-\u003eproducts = [$product];\n$purchase-\u003epurchase = $details;\n$purchase-\u003ebrand_id = $config['brand_id'];\n$purchase-\u003esuccess_redirect = 'https://portal.klix.app/api/v1/?success=1';\n$purchase-\u003efailure_redirect = 'https://portal.klix.app/api/v1/?success=0';\n\n$result = $klix-\u003ecreatePurchase($purchase);\n\nif ($result \u0026\u0026 $result-\u003echeckout_url) {\n\t// Redirect user to checkout\n\theader(\"Location: \" . $result-\u003echeckout_url);\n\texit;\n}\n```\n\nBulk payment initiation looks like:\n\n```php\n\u003c?php\nrequire_once 'vendor/autoload.php';\n$klix = new \\Klix\\KlixApi($config['brand_id'], $config['api_key'], $config['endpoint']);\n$client = new \\Klix\\Model\\ClientDetails();\n$client-\u003eemail = 'test@example.com';\n$purchase = new \\Klix\\Model\\Purchase();\n$purchase-\u003eclient = $client;\n$details = new \\Klix\\Model\\PurchaseDetails();\n$paymentToFirstIbanProduct = new \\Klix\\Model\\Product();\n$paymentToFirstIbanProduct-\u003ename = 'Payment to first IBAN';\n$paymentToFirstIbanProduct-\u003eprice = 100;\n$paymentToSecondIbanProduct = new \\Klix\\Model\\Product();\n$paymentToSecondIbanProduct-\u003ename = 'Payment to second IBAN';\n$paymentToSecondIbanProduct-\u003eprice = 200;\n$details-\u003eproducts = [$paymentToFirstIbanProduct, $paymentToSecondIbanProduct];\n$paymentMethodDetails = new \\Klix\\Model\\PaymentMethodDetails();\n$firstCreditor = new \\Klix\\Model\\PisBulkPurchase();\n$firstCreditor-\u003ecreditor_name = 'John Doe';\n$firstCreditor-\u003ecreditor_iban = 'LVXXPARX0000000000001';\n$secondCreditor = new \\Klix\\Model\\PisBulkPurchase();\n$secondCreditor-\u003ecreditor_name = 'Jane Doe';\n$secondCreditor-\u003ecreditor_iban = 'LVXXHABA0000000000001';\n$paymentMethodDetails-\u003epis_bulk_purchase = [$firstCreditor, $secondCreditor];\n$details-\u003epayment_method_details = $paymentMethodDetails;\n$purchase-\u003epurchase = $details;\n$purchase-\u003ebrand_id = $config['brand_id'];\n$purchase-\u003epayment_method_whitelist = ['swedbank_lv_pis'];\n$purchase-\u003esuccess_redirect = 'https://portal.klix.app/api/v1/?success=1';\n$purchase-\u003efailure_redirect = 'https://portal.klix.app/api/v1/?success=0';\n\n$result = $klix-\u003ecreatePurchase($purchase);\n\nif ($result \u0026\u0026 $result-\u003echeckout_url) {\n\t// Redirect user to checkout\n\theader(\"Location: \" . $result-\u003echeckout_url);\n\texit;\n}\n```\n\n## Testing ##\n\n```bash\n./vendor/bin/phpunit tests \n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklix-app%2Fmerchant-api-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklix-app%2Fmerchant-api-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklix-app%2Fmerchant-api-php/lists"}