{"id":37003308,"url":"https://github.com/kayon-ariel/pix-php","last_synced_at":"2026-01-14T00:32:51.394Z","repository":{"id":257816961,"uuid":"870266472","full_name":"kayon-ariel/pix-php","owner":"kayon-ariel","description":"A PHP library to generate static PIX codes, facilitating online payments with PIX copy and paste.","archived":false,"fork":false,"pushed_at":"2024-10-12T15:54:00.000Z","size":9,"stargazers_count":18,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-12T18:12:52.072Z","etag":null,"topics":["bacen","backend","instant-payments","payments","php","pix"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/kayon-ariel/pix-php","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/kayon-ariel.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-09T18:19:59.000Z","updated_at":"2025-09-21T16:52:34.000Z","dependencies_parsed_at":"2024-10-09T19:08:10.634Z","dependency_job_id":"012c31b3-b7a0-433e-aef8-157e573d930f","html_url":"https://github.com/kayon-ariel/pix-php","commit_stats":null,"previous_names":["kayon-ariel/pix-php"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kayon-ariel/pix-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayon-ariel%2Fpix-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayon-ariel%2Fpix-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayon-ariel%2Fpix-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayon-ariel%2Fpix-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kayon-ariel","download_url":"https://codeload.github.com/kayon-ariel/pix-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kayon-ariel%2Fpix-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406507,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["bacen","backend","instant-payments","payments","php","pix"],"created_at":"2026-01-14T00:32:50.749Z","updated_at":"2026-01-14T00:32:51.387Z","avatar_url":"https://github.com/kayon-ariel.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PixPhp\n\nA PHP library to generate static PIX codes, facilitating online payments with PIX copy and paste.\n\n![PHP Version](https://img.shields.io/badge/php-%3E%3D8.2-brightgreen) ![License](https://img.shields.io/badge/license-MIT-blue) [![Packagist Downloads](https://img.shields.io/packagist/dm/kayon-ariel/pix-php.svg?label=Packagist%20downloads)](https://packagist.org/packages/kayon-ariel/pix-php)\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Accepted Key Types](#accepted-key-types)\n- [Example Usage](#example-usage)\n\n## Installation\n\nYou can install the library via Composer. Run the following command:\n\n```bash\ncomposer require kayon-ariel/pix-php\n```\n\n## Usage\n\n### Step 1: Include the Autoloader\n\nOnce installed, include the Composer autoloader in your PHP script:\n\n```php\nrequire 'vendor/autoload.php';\n```\n\n### Step 2: Import the Namespace\n\nImport the PixPhp namespace at the beginning of your PHP file:\n\n```php\nuse PixPhp\\StaticPix;\n```\n\n### Step 3: Generate a PIX Code\n\nYou can generate a PIX code using the generatePix method. Here's a basic example:\n\n```php\n// Generate a PIX code\n$pixCode = StaticPix::generatePix('your-pix-key', 'Transaction-ID', 100.00, 'Payment description');\n\n// Display the generated PIX code\necho $pixCode;\n```\n\n## Accepted Key Types\n\nIn the `PixPhp` library, the following types of keys are accepted for generating PIX codes:\n\n1. **CPF (Cadastro de Pessoas Físicas)**\n   - **Format:** `123.456.789-09`\n   - **Description:** A Brazilian individual taxpayer identification number. The library accepts CPF numbers with or without formatting.\n\n2. **CNPJ (Cadastro Nacional da Pessoa Jurídica)**\n   - **Format:** `12.345.678/0001-95`\n   - **Description:** A Brazilian business taxpayer identification number. The library accepts CNPJ numbers with or without formatting.\n\n3. **Email**\n   - **Format:** `example@test.com`\n   - **Description:** A valid email address. The library accepts well-formed email addresses as PIX keys.\n\n4. **Phone**\n   - **Format:** `+55 11 91234-5678`\n   - **Description:** A Brazilian phone number including the country code. The library accepts phone numbers with various formatting styles, including spaces and dashes, while retaining the `+55` prefix.\n\n5. **Random Key**\n   - **Format:** `617ef6be-e18e-427f-919b-6e43bae33400`\n   - **Description:** The Pix random key is a 32-character alphanumeric code, randomly generated by the Central Bank to be linked to a single account.\n\n## Example Usage\n\nYou can pass any of the accepted key types to the `generatePix` method:\n\n```php\n// Using CPF\n$pixCodeCpf = StaticPix::generatePix(\"123.456.789-09\", \"ID123\", 100.00);\n\n// Using CNPJ\n$pixCodeCnpj = StaticPix::generatePix(\"12.345.678/0001-95\", \"ID456\", 250.50);\n\n// Using Email\n$pixCodeEmail = StaticPix::generatePix(\"example@test.com\", \"ID789\", 50.00);\n\n// Using Phone\n$pixCodePhone = StaticPix::generatePix(\"+55 11 91234-5678\", \"ID101\", 75.00);\n\n// Using Random Key\n$pixCodeRandom = StaticPix::generatePix(\"617ef6be-e18e-427f-919b-6e43bae33400\", \"ID102\", 30.00);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkayon-ariel%2Fpix-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkayon-ariel%2Fpix-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkayon-ariel%2Fpix-php/lists"}