{"id":43320433,"url":"https://github.com/xendit/checkout-demo","last_synced_at":"2026-02-01T22:33:15.936Z","repository":{"id":42628918,"uuid":"298204169","full_name":"xendit/checkout-demo","owner":"xendit","description":"Sample code for demonstrating Xendit Checkout including creating invoice, redirection type, and type of integration through desktop or mobile view.","archived":false,"fork":false,"pushed_at":"2024-01-09T04:08:17.000Z","size":1955,"stargazers_count":26,"open_issues_count":3,"forks_count":11,"subscribers_count":36,"default_branch":"master","last_synced_at":"2024-03-19T13:56:07.273Z","etag":null,"topics":["checkout","demo","example","payments","store","xendit"],"latest_commit_sha":null,"homepage":"https://demo.xendit.co","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xendit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-24T07:38:22.000Z","updated_at":"2023-11-19T05:00:31.000Z","dependencies_parsed_at":"2022-09-07T22:53:23.780Z","dependency_job_id":null,"html_url":"https://github.com/xendit/checkout-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xendit/checkout-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fcheckout-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fcheckout-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fcheckout-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fcheckout-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xendit","download_url":"https://codeload.github.com/xendit/checkout-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fcheckout-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","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":["checkout","demo","example","payments","store","xendit"],"created_at":"2026-02-01T22:33:15.866Z","updated_at":"2026-02-01T22:33:15.931Z","avatar_url":"https://github.com/xendit.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xendit Checkout Demo\n\nThis demo is a mock e-commerce store that illustrates creation (backend) and presentation (frontend) of a hosted Xendit Checkout page.\nThe backend uses a simple [ExpressJS](https://expressjs.com/) server to proxy the request from client-side to the [Xendit API Gateway](https://developers.xendit.co/api-reference/#invoices), while the frontend uses pure JavaScript \u0026 HTML. \n\n**You can see this demo app running in test mode at [demo.xendit.co](https://demo.xendit.co)**\n\n## Overview\n\n\u003cimg src=\"public/images/screenshots/demo-desktop.png\" alt=\"Demo on Google Chrome\" width=\"610\"\u003e\u003cimg src=\"public/images/screenshots/demo-mobile.png\" alt=\"Demo on Safari iPhone X\" width=\"272\"\u003e\n\nOur sample code demonstrates for Xendit Checkout:\n- Integration via dialog pop-up (a.k.a. modal iframe) and redirect\n- Creation of checkout pages for IDR and PHP\n- Simple integration to create an invoice using Xendit API Gateway\n\nXendit Checkout is the fastest way to start collecting online payments in Indonesia and Philippines.\n\n|     | Features\n:---: | :---\n💸 | **Over 30 different payment methods**. 19 payment methods accepting Indonesian Rupiah (IDR) and 14 payment methods accepting Philippine Pesos (PHP), with more on the way. For more information about our supported payment channels, visit [here](https://docs.xendit.co/xeninvoice/payment-channels).\n📱 | **Beautiful, responsive UIs optimized for each payment method**. For example, we do barcode generation for Alfamart/Indomaret, and maintain 19 sets of up-to-date instructions for Virtual Accounts. We also formatting and front-end validation for phone numbers and credit card data.\n🔐 | **PCI-DSS compliance and 3DS handling**. Making it easier to offer and handle credit cards.\n🗺 | **Supports multi-language integration**. Full UI localization that has been tested across millions of successful transactions.\n🚀 | **Ongoing maintenance and continuous improvement**. Whenever a payment partner makes a change, our team of developers quickly handles it, so you don't have to.\n\n\n\n## Codebase Structure\n\nThe frontend sample code for the demo is in the `public/` directory.\n\nThe core logic of the Xendit Checkout is mostly contained within two files:\n\n1.  [`server/routes.js`](server/routes.js) defines the routes on the backend that create Xendit invoice/checkout data.\n2.  [`server/controller.js`](server/controller.js) defines the request that will be forwarded to the Xendit API Gateway.\n\nThere is also one file called [`server/config.js`](server/config.js) that stores the configurable pre-filled invoice data (`payer_email` and `description`). You can override those values in the [`server/routes.js`](server/routes.js).\n\n## Getting Started\n\n### Requirements\n\nYou’ll need the following:\n\n- [Node.js](https://nodejs.org) \u003e= `10.0.0`\n- [NPM](https://npmjs.org) \u003e= `6.0.0`\n- Xendit account to accept payments ([sign up](https://dashboard.xendit.co/register/1) for free). After registering, please [generate](https://dashboard.xendit.co/settings/developers#api-keys) a secret key with **MONEY-IN WRITE** permissions. You'll need this to perform requests for creating invoices. \n\nAfter registering an account and generating a secret key, you can [enable the payment methods](https://dashboard.xendit.co/invoices) you’d like to test by clicking on **Customize** button in the invoice page (Home \u003e Accept Payments \u003e Invoices). By default, all enabled and available payment methods will be available for an invoice.\n\n### Running the Node Server\n\nYou need to modify your environment variables as stated in [`.env.example`](.env.example) to your needs. In this case, you need to set these values: \n\n- `process.env.PORT`\n- `process.env.API_GATEWAY_URL`\n- `process.env.API_KEY`\n\nThe value of `API_GATEWAY_URL` should be **https://api.xendit.co**. For the `API_KEY`, please use the key you previously generated. As for the `PORT`, you can define it by using the available port on your local machine or it will be provided by default value which is `8000`.\n\nInstall dependencies using npm:\n\n    npm install\n\nAfter installation is done, start the local server along with the environment variables:\n\n    PORT=\u003cport\u003e API_GATEWAY_URL=https://api.xendit.co API_KEY=\u003cyour-secret-key\u003e npm run start\n\nIf everything went well, you should see the following message in your terminal:\n\n    server is listening on port: \u003cport\u003e\n\nThen you can point your browser to the `http://localhost:\u003cport\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Fcheckout-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxendit%2Fcheckout-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Fcheckout-demo/lists"}