{"id":21149779,"url":"https://github.com/xvilo/ovpay-api","last_synced_at":"2025-08-18T19:09:04.652Z","repository":{"id":65148954,"uuid":"584147074","full_name":"xvilo/ovpay-api","owner":"xvilo","description":"Unofficial API Wrapper for OVPay","archived":false,"fork":false,"pushed_at":"2024-04-28T10:45:44.000Z","size":238,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-14T17:58:14.444Z","etag":null,"topics":["api","client","ovpay","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xvilo.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":"2023-01-01T15:21:56.000Z","updated_at":"2024-04-28T10:45:40.000Z","dependencies_parsed_at":"2024-01-10T16:42:36.327Z","dependency_job_id":"9756f77b-7607-4e7d-ae27-9611d505d243","html_url":"https://github.com/xvilo/ovpay-api","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/xvilo/ovpay-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvilo%2Fovpay-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvilo%2Fovpay-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvilo%2Fovpay-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvilo%2Fovpay-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xvilo","download_url":"https://codeload.github.com/xvilo/ovpay-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvilo%2Fovpay-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271043871,"owners_count":24689844,"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-08-18T02:00:08.743Z","response_time":89,"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":["api","client","ovpay","php"],"created_at":"2024-11-20T09:42:56.603Z","updated_at":"2025-08-18T19:09:04.611Z","avatar_url":"https://github.com/xvilo.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## OV Pay PHP API Wrapper\n[![codecov](https://codecov.io/gh/xvilo/ovpay-api/branch/main/graph/badge.svg?token=TTNSB24MKE)](https://codecov.io/gh/xvilo/ovpay-api)\n\nUnofficial API Wrapper for OVPay. This is a work in progress and based off an undocumented api. **stability is not \nguaranteed**.\n\nFor now only the unauthenticated API routes are available, but more will follow. \n\n### TODO:\n- [x] Add models\n- [x] Add support for authentication, then:\n  - [x] Add support for `Trips`\n  - [x] Add support for `PaymentCards`\n  - [x] Add support for `Payments`\n- [ ] Add working token refreshing logic\n- [ ] Add better error response handling\n### Example:\n\nRequest trips, then request trip details:\n\n```php\n\u003c?php\ndeclare(strict_types=1);\n\nuse Lcobucci\\JWT\\Encoding\\JoseEncoder;\nuse Lcobucci\\JWT\\Token\\Parser;\nuse Xvilo\\OVpayApi\\Authentication\\TokenMethod;\nuse Xvilo\\OVpayApi\\Client;\nuse Xvilo\\OVpayApi\\Models\\Trip;\n\n// Include dependencies\ninclude 'vendor/autoload.php';\n\n// Create JWT parser\n$parser = new Parser(new JoseEncoder());\n\n// Create API client and configure authenticated requests\n$client = new Client();\n$client-\u003eAuthenticate(new TokenMethod($parser-\u003eparse('eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIs...')));\n\n// Get payment cards\n$card = $client-\u003etokens()-\u003egetPaymentCards()[0];\n// Get trips for specified Card xtat UUID \n$trips = $client-\u003etrips()-\u003egetTrips($card-\u003egetExternalTransitAccountToken());\n// Get last trip\n$items = $trips-\u003egetItems();\n/** @var Trip $trip */\n$trip = end($items)-\u003egetTrip();\n// Get trip details by ID\nvar_dump($client-\u003etrips()-\u003egetTrip($trip-\u003egetExternalBackOfficeToken(), $trip-\u003egetId()));\n//  class Xvilo\\OVpayApi\\Models\\Receipt\\ReceiptTrip#94 (4) {\n//    private readonly ?array $correctionOptions =\u003e\n//    NULL\n//    private readonly Xvilo\\OVpayApi\\Models\\Trip $trip =\u003e\n//    class Xvilo\\OVpayApi\\Models\\Trip#131 (13) {\n//      private readonly string $xbot =\u003e\n//      string(36) \"8126d60f-bded-46d3-9a70-30915a61008b\"\n//      private readonly int $id =\u003e\n//      int(12345678)\n//      private readonly int $version =\u003e\n//      int(1)\n//      private readonly string $transport =\u003e\n//      string(4) \"RAIL\"\n//      private readonly string $status =\u003e\n//      string(8) \"COMPLETE\"\n//      private readonly string $checkInLocation =\u003e\n//      string(16) \"Utrecht Centraal\"\n//      private readonly DateTimeImmutable $checkInTimestamp =\u003e\n//      class DateTimeImmutable#79 (3) {\n//        public $date =\u003e\n//        string(26) \"2022-12-30 08:55:30.000000\"\n//        public $timezone_type =\u003e\n//        int(1)\n//        public $timezone =\u003e\n//        string(6) \"+01:00\"\n//      }\n//      private readonly ?string $checkOutLocation =\u003e\n//      string(5) \"Baarn\"\n//      private readonly ?DateTimeImmutable $checkOutTimestamp =\u003e\n//      class DateTimeImmutable#101 (3) {\n//        public $date =\u003e\n//        string(26) \"2022-12-30 09:45:30.000000\"\n//        public $timezone_type =\u003e\n//        int(1)\n//        public $timezone =\u003e\n//        string(6) \"+01:00\"\n//      }\n//      private readonly string $currency =\u003e\n//      string(3) \"EUR\"\n//      private readonly int $fare =\u003e\n//      int(540)\n//      private readonly string $organisationName =\u003e\n//      string(2) \"NS\"\n//      private readonly bool $loyaltyOrDiscount =\u003e\n//      bool(false)\n//    }\n//    private readonly mixed $correctedFrom =\u003e\n//    NULL\n//    private readonly mixed $correctedFromType =\u003e\n//    NULL\n//  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxvilo%2Fovpay-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxvilo%2Fovpay-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxvilo%2Fovpay-api/lists"}