{"id":27288549,"url":"https://github.com/ingameltd/pay-now","last_synced_at":"2025-09-04T19:28:30.779Z","repository":{"id":52960381,"uuid":"333294713","full_name":"ingameltd/pay-now","owner":"ingameltd","description":"Paynow typescript client","archived":false,"fork":false,"pushed_at":"2023-02-20T22:03:30.000Z","size":211,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-11T20:57:56.538Z","etag":null,"topics":["client","nodejs","pay-now","paynow","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/ingameltd.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-01-27T03:42:53.000Z","updated_at":"2023-08-29T18:49:55.000Z","dependencies_parsed_at":"2022-08-24T09:10:28.528Z","dependency_job_id":null,"html_url":"https://github.com/ingameltd/pay-now","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingameltd%2Fpay-now","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingameltd%2Fpay-now/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingameltd%2Fpay-now/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ingameltd%2Fpay-now/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ingameltd","download_url":"https://codeload.github.com/ingameltd/pay-now/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480470,"owners_count":21110936,"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","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":["client","nodejs","pay-now","paynow","typescript"],"created_at":"2025-04-11T20:58:00.508Z","updated_at":"2025-04-11T20:58:01.166Z","avatar_url":"https://github.com/ingameltd.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PayNow for NodeJS\n\n![Build](https://github.com/ingameltd/pay-now/workflows/Build/badge.svg) ![License](https://img.shields.io/github/license/ingameltd/pay-now) ![Package Version](https://img.shields.io/npm/v/@ingameltd/pay-now) ![Last Commit](https://img.shields.io/github/last-commit/ingameltd/pay-now)\n\nNodeJS library for [PayNow](https://paynow.pl) payment service. This library is written in Typescript to provide\nbest typesafety.\n\nOfficial REST API docs can be found [here](https://docs.paynow.pl/).\n\n## Documentation\n\nDocumentation can be in read [here](https://ingameltd.github.io/pay-now).\n\n## Installation\n\n```bash\nnpm install --save @ingameltd/pay-now\n```\n\n## Typescript\n\n### Importing\n\n```typescript\nimport {\n  PayNow,\n  Payment,\n  PaymentCreatedResponse\n} from \"@ingameltd/pay-now\";\n```\n\n### Initialization\n\n- **apiKey** - API Key from PayNow panel\n- **signatureKey** - Signature Key from PayNow panel\n\n```typescript\nconst payNow = new PayNow(\n  apiKey, \n  signatureKey, \n  { \n    sandbox: false // enable or disable sandbox\n  }\n);\n```\n\n### Create payment\n\n```typescript\nconst payment: Payment = {\n    amount: 1000, // 10,00 PLN\n    externalId: '9fea23c7-cd5c-4884-9842-6f8592be65df', // unique id from merchant system\n    description: \"Test transaction\",\n    buyer: {\n        email: \"jhondoe@example.com\"\n    }\n}\n\nconst result: PaymentCreatedResponse = await payNow.createPayment(payment)\n\nconsole.log(result)\n```\n\n### Get payment status\n\n```typescript\n// payment id from paynow\nconst result: PaymentStatusResponse = payNow.paymentStatus(paymentId)\nconsole.log(result)\n```\n\n### Check integrity of incoming message\n\nTo verify a notification you must check integrity of an incoming message and compare it with `Signature` header field(you can set Notification endpoint in panel)\n\n#### Example with Express\n\n```typescript\nconst calculatedSignature = paynow.calculateSignature(req.body)\nconsole.log(calculatedSignature === req.header('Signature'))\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingameltd%2Fpay-now","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fingameltd%2Fpay-now","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fingameltd%2Fpay-now/lists"}