{"id":27736842,"url":"https://github.com/quantomtech/billplz-rest","last_synced_at":"2026-04-25T21:33:46.930Z","repository":{"id":244616729,"uuid":"815763746","full_name":"QuantomTech/billplz-rest","owner":"QuantomTech","description":"billplz-rest provides a minimal higher-level wrapper around BillPlz's API.","archived":false,"fork":false,"pushed_at":"2024-06-21T01:54:42.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T23:48:33.098Z","etag":null,"topics":["billplz","billplz-api","nodejs","payment-integration","rest-api","typescript"],"latest_commit_sha":null,"homepage":"https://www.billplz.com/api","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/QuantomTech.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-06-16T04:38:24.000Z","updated_at":"2024-07-22T02:17:33.000Z","dependencies_parsed_at":"2024-06-16T05:44:06.912Z","dependency_job_id":"40ca89ee-c9d0-477a-a7ec-40f4aa660cc4","html_url":"https://github.com/QuantomTech/billplz-rest","commit_stats":null,"previous_names":["hakamraza/billplz-rest"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuantomTech%2Fbillplz-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuantomTech%2Fbillplz-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuantomTech%2Fbillplz-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuantomTech%2Fbillplz-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuantomTech","download_url":"https://codeload.github.com/QuantomTech/billplz-rest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251330729,"owners_count":21572343,"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":["billplz","billplz-api","nodejs","payment-integration","rest-api","typescript"],"created_at":"2025-04-28T14:33:27.940Z","updated_at":"2026-04-25T21:33:46.888Z","avatar_url":"https://github.com/QuantomTech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# billplz-rest\n`billplz-rest` provides a minimal higher-level wrapper around [BillPlz's API](https://www.billplz-sandbox.com/api).\u003c/br\u003e\nCurrently support only stable version API v3 with Typescript.\u003c/br\u003e\nOther version need to be stable before development is proceed.\n\n## Installation\n`billplz-rest` is available from [npm](https://www.npmjs.com/package/billplz-rest).\n\n```shell\nnpm i billplz-rest\n```\n\nor you can use yarn\n```shell\nyarn add billplz-rest\n```\n\n## Setup\n1. Register for a Billplz account at [Billplz Website](https://www.billplz.com/)\n2. Fetch your **BillPlz Secret (String)** and **Billplz XSignature (String)**\n3. Prepare your `callback url` and `redirect url` endpoint for webhook callback and website redirect. You can use [Webhook Site](https://webhook.site/) to test webhook.\n4. Import and initialize billplz module using these information.\n5. Do set `isProduction` to `false` if you are using sandbox account.\n\n## Usage\n\n```javascript\n// Get Collection By Collection ID\n\nimport Billpz from 'billplz-rest'\n\nconst GetCollectionById = async () =\u003e {\n\n    const billplz = new Billpz({\n        isProduction: false,\n        secretKey: 'secret-key-from-billplz-account',\n        signature: 'signature-from-billplz-account',\n        redirectUrl: 'https://mywebsite.com/payment-page',\n        callbackUrl: ' \thttps://webhook.site/8b4c6eb5-5977-4ba1-beea-abcd12345',\n    });\n\n    const res = await billplz\n        .collection()\n        .getById('abcd123')\n\n    // check status fetch\n    if (res.fetchSucess) {\n        console.info(res);\n    }\n}\n\nGetCollectionById();\n```\n\n```javascript\n// Verify webhook callback\n\nimport Billpz from 'billplz-rest'\nimport { BplzCallback } from './node_modules/billplz-rest/dist/lib/type'\n\nconst VerifyCallback = async (payload: BplzCallback) =\u003e {\n\n    const billplz = new Billpz({\n        isProduction: false,\n        secretKey: 'secret-key-from-billplz-account',\n        signature: 'signature-from-billplz-account',\n        redirectUrl: 'https://mywebsite.com/payment-page',\n        callbackUrl: ' \thttps://webhook.site/8b4c6eb5-5977-4ba1-beea-abcd12345',\n    });\n\n    const res = await billplz\n        .callback()\n        .verify(payload)\n\n    // if verification success, return payload\n    if (res) {\n        console.info(res);\n    }\n}\n\nVerifyCallback({\n    // billplz webhook payload\n});\n\n```\n\n\n## Available Methods\n\n| Module                                | Description                                                                                                       |\n| --------------------------------------| ------------------------------------------------------------------------------------------------------------------|\n| **V3 - Bill**                         | `bill()`                                                                                                          |\n| `create()`                            | Each bill must be created within a collection                                                                     |\n| `getById()`                           | To request a bill to check                                                                                        |\n| `delete()`                            | Only due bill can be deleted. Paid bill can't be deleted.                                                         |\n| `getTransactions()`                   | Retrieve your bill's transactions                                                                                 |\n| **V3 - Collection**                   | `collection()`                                                                                                    |\n| `getIndex()`                          | Retrieve your collections list                                                                                    |\n| `getById()`                           | Query your collection record                                                                                      |\n| `create()`                            | Create a Collection                                                                                               |\n| `deactivate()`                        | Deactivate a Collection                                                                                           |\n| `activate()`                          | Activate a Collection                                                                                             |\n| `getPaymentMethods()`                 | Retrieve all available payment methods that you can enable / disable to a collection.                             |\n| `updatePaymentMethod()`               | Update your collection's payment methods                                                                          |\n| **V3 - Open Collection**              | `openCollection()`                                                                                                |\n| `getIndex()`                          | Retrieve your open collections list                                                                               |\n| `getById()`                           | Query your open collection record                                                                                 |\n| `create()`                            | Create an open Collection                                                                                         |\n| **V3 - FPX Banks**                    | `fpxBanks()`                                                                                                      |\n| `getIndex()`                          | Get a list of bank codes                                                                                          |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantomtech%2Fbillplz-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantomtech%2Fbillplz-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantomtech%2Fbillplz-rest/lists"}