{"id":48976376,"url":"https://github.com/digital-threads/liqpay","last_synced_at":"2026-04-18T09:08:21.299Z","repository":{"id":49447485,"uuid":"377379285","full_name":"Digital-Threads/Liqpay","owner":"Digital-Threads","description":"Laravel LiqPay Client","archived":false,"fork":false,"pushed_at":"2025-11-22T16:40:57.000Z","size":18,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-22T18:21:39.872Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/Digital-Threads.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":null,"security":null,"support":null}},"created_at":"2021-06-16T05:18:41.000Z","updated_at":"2025-11-22T16:41:01.000Z","dependencies_parsed_at":"2022-09-09T13:40:44.130Z","dependency_job_id":null,"html_url":"https://github.com/Digital-Threads/Liqpay","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Digital-Threads/Liqpay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digital-Threads%2FLiqpay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digital-Threads%2FLiqpay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digital-Threads%2FLiqpay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digital-Threads%2FLiqpay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Digital-Threads","download_url":"https://codeload.github.com/Digital-Threads/Liqpay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Digital-Threads%2FLiqpay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31962895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":[],"created_at":"2026-04-18T09:08:20.242Z","updated_at":"2026-04-18T09:08:21.290Z","avatar_url":"https://github.com/Digital-Threads.png","language":"PHP","readme":"# Laravel Liqpay Client\n\n[![Code Coverage](https://img.shields.io/github/v/release/Digital-Threads/Liqpay)](https://github.com/Digital-Threads/Liqpay/releases) [![License](https://img.shields.io/github/license/digital-threads/liqpay)](https://github.com/Digital-Threads/Liqpay/blob/master/LICENSE) [![Code Coverage](https://codecov.io/gh/Digital-Threads/Liqpay/branch/master/graph/badge.svg)](https://codecov.io/gh/Digital-Threads/Liqpay)\n\n## Installation\n\nRun `composer require digital-threads/liqpay`\n\n## Configurations\n\n[LiqPay](https://www.liqpay.ua) client requires following configurations to be set in your environment:\n\n| Key                       | Description                                                                         |\n| ------------------------- | ----------------------------------------------------------------------------------- |\n| `LIQPAY_PUBLIC_KEY`       | [LiqPay Public Key](https://www.liqpay.ua/ru/registration)                          |\n| `LIQPAY_PRIVATE_KEY`      | [LiqPay Private Key](https://www.liqpay.ua/ru/registration)                         |\n| `LIQPAY_DEFAULT_CURRENCY` | Default order currency that will be used if none will be specified for each request |\n\nAlternatively you can publish package configurations and specify your own boundaries:\n\n`php artisan vendor:publish --provider='DigitalThreads\\LiqPay\\LiqPayServiceProvider' --tag='config'`\n\n## Usage\n\nAfter package configurations were specified you can use `DigitalThreads\\LiqPay\\LiqPay` facade for your payment operations.\n\n### Checkout\n\nIn order to render LiqPay form you may want to securly recieve [Checkout encoded form parameters](https://www.liqpay.ua/documentation/api/aquiring/checkout/doc) from your backend API like following:\n\n#### PaymentController.php\n\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers\\Api;\n\nuse App\\Models\\Order;\nuse DigitalThreads\\LiqPay\\LiqPay;\nuse App\\Http\\Controllers\\Controller;\n\nclass PaymentController extends Controller\n{\n    public function checkout($orderId)\n    {\n        $order = Order::findOrFail($orderId);\n\n        $prerequisites = LiqPay::getCheckoutFormPrerequisites([\n            'amount' =\u003e $order-\u003eamount,\n            'description' =\u003e $order-\u003edescription,\n            'order_id' =\u003e $order-\u003eid,\n            'result_url' =\u003e route('web.checkout'),\n            'server_url' =\u003e route('api.liqpay_callback'), // The url that wil be used for order webhook notification\n            'currency' =\u003e $order-\u003ecurrency, // Optional. If not set - default currency will be used.\n        ]);\n\n        return new JsonResponse([\n            'action' =\u003e $prerequisites-\u003egetAction(),\n            'data' =\u003e $prerequisites-\u003egetData(),\n            'signature' =\u003e $prerequisites-\u003egetSignature(),\n        ]);\n    }\n}\n```\n\n#### api.php\n\n```php\n\u003c?php\n\nuse Illuminate\\Support\\Facades\\Route;\nuse  App\\Http\\Controllers\\Api\\PaymentController;\n\nRoute::get('{order}/checkout', [PaymentController::class, 'checkout']);\n```\n\nThen you can render the form with your favorite front-end framework like VueJS:\n\n```html\n\u003ctemplate\u003e\n  \u003cform method=\"POST\" action=\"{{ form.action }}\" accept-charset=\"utf-8\"\u003e\n    \u003cinput type=\"hidden\" name=\"data\" value=\"{{ form.data }}\" /\u003e\n    \u003cinput type=\"hidden\" name=\"signature\" value=\"{{ form.signature }}\" /\u003e\n    \u003cinput\n      type=\"image\"\n      src=\"//static.liqpay.ua/buttons/p1en.radius.png\"\n      name=\"btn_text\"\n    /\u003e\n  \u003c/form\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\n  export default {\n    data() {\n      return {\n        orderId: 1,\n        form: {\n          action: null,\n          data: null,\n          signature: null,\n        },\n      };\n    },\n    async mounted() {\n      const response = await fetch(`{your-api-url}/${this.orderId}/checkout`);\n      this.form = response.json();\n    },\n  };\n\u003c/script\u003e\n```\n\n### Callback Validation\n\nDuring payment processing your API will recieve a [Callback](https://www.liqpay.ua/documentation/api/callback) post request with url that was specified as `server_url` in the `PaymentController`. You will need to register callback handler route in order to update order status according to the data in the request.\n\n#### PaymentController.php\n\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers\\Api;\n\nuse App\\Models\\Order;\nuse Illuminate\\Http\\Request;\nuse DigitalThreads\\LiqPay\\LiqPay;\nuse App\\Http\\Controllers\\Controller;\nuse DigitalThreads\\LiqPay\\Exceptions\\InvalidCallbackRequestException;\n\nclass PaymentController extends Controller\n{\n    public function checkout($orderId)\n    {\n        $order = Order::findOrFail($orderId);\n\n        $prerequisites = LiqPay::getCheckoutFormPrerequisites([\n            'amount' =\u003e $order-\u003eamount,\n            'description' =\u003e $order-\u003edescription,\n            'order_id' =\u003e $order-\u003eid,\n            'result_url' =\u003e route('web.checkout'),\n            'server_url' =\u003e route('api.liqpay_callback'), // The url that wil be used for order webhook notification\n            'currency' =\u003e $order-\u003ecurrency, // Optional. If not set - default currency will be used.\n        ]);\n\n        return new JsonResponse([\n            'action' =\u003e $prerequisites-\u003egetAction(),\n            'data' =\u003e $prerequisites-\u003egetData(),\n            'signature' =\u003e $prerequisites-\u003egetSignature(),\n        ]);\n    }\n\n    public function callback(Request $request)\n    {\n        try {\n            $payload = LiqPay::validateCallback($request);\n            $order = Order::findOrFail($payload-\u003eget('order_id'));\n\n            $order-\u003eupdate(['status' =\u003e $payload-\u003eget('status')]);\n        } catch (InvalidCallbackRequestException $e) {\n            return new JsonResponse(['error' =\u003e $e-\u003egetMessage()], 400);\n        }\n    }\n}\n```\n\n#### api.php\n\n```php\n\u003c?php\n\nuse Illuminate\\Support\\Facades\\Route;\nuse App\\Http\\Controllers\\Api\\PaymentController;\n\nRoute::get('{order}/checkout', [PaymentController::class, 'checkout']);\nRoute::post('callback', [PaymentController::class, 'callback'])-\u003ename('liqpay_callback');\n```\n\n`LiqPay::validateCallback` method will take care of the request validation and signature checks and will return an instance of `LiqPayPaymentDetailsInterface`, use it to extract order details data for your needs.\n\n## Credits\n\n- [Stas Vartanyan](https://github.com/vaawebdev)\n- [Digital Threads](https://github.com/Digital-Threads)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-threads%2Fliqpay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigital-threads%2Fliqpay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-threads%2Fliqpay/lists"}