{"id":25970643,"url":"https://github.com/dwisulfahnur/python-xendit-client","last_synced_at":"2025-10-06T22:59:05.985Z","repository":{"id":50166218,"uuid":"252924538","full_name":"dwisulfahnur/python-xendit-client","owner":"dwisulfahnur","description":"Xendit REST API Client for Python","archived":false,"fork":false,"pushed_at":"2022-12-08T03:58:59.000Z","size":64,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-20T09:21:26.861Z","etag":null,"topics":["dana","linkaja","ovo","payment-gateway","python","qr-code","qris","virtual-account","xendit","xendit-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dwisulfahnur.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":"2020-04-04T06:16:45.000Z","updated_at":"2023-12-28T03:02:49.000Z","dependencies_parsed_at":"2023-01-24T09:15:23.971Z","dependency_job_id":null,"html_url":"https://github.com/dwisulfahnur/python-xendit-client","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwisulfahnur%2Fpython-xendit-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwisulfahnur%2Fpython-xendit-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwisulfahnur%2Fpython-xendit-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwisulfahnur%2Fpython-xendit-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwisulfahnur","download_url":"https://codeload.github.com/dwisulfahnur/python-xendit-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241935361,"owners_count":20044841,"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":["dana","linkaja","ovo","payment-gateway","python","qr-code","qris","virtual-account","xendit","xendit-api"],"created_at":"2025-03-04T23:18:41.394Z","updated_at":"2025-10-06T22:59:00.942Z","avatar_url":"https://github.com/dwisulfahnur.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Xendit Client API\n\n[![Build Status](https://travis-ci.com/dwisulfahnur/python-xendit-client.svg?branch=master)](https://travis-ci.com/dwisulfahnur/python-xendit-client)\n[![PyPI version](https://badge.fury.io/py/xenditclient.svg)](https://badge.fury.io/py/xenditclient)\n[![Downloads](https://pepy.tech/badge/xenditclient/month)](https://pepy.tech/project/xenditclient)\n[![Downloads](https://pepy.tech/badge/xenditclient)](https://pepy.tech/project/xenditclient)\n\nXendit REST API Client for Python\n\n## Documentation\n\n\n## Install\nInstall xenditclient with pip by the following command:\n```sh\npip install xenditclient\n```\n\n## Usage\nConfigure the XenditClient with the secret key that you can obtained on your Xendit Dashboard Account.\n```python\nfrom xenditclient import XenditClient\n\nclient = XenditClient(api_key='\u003cyour-secret-key\u003e')\n```\n### Get Balance\n```python\nres_dict = client.balance.get_balance('CASH')\nprint(res_dict)\n# {\n#   'balance': 1000137690\n# }\n```\n\n### EWallets\n#### Create Payment\n\n```python\nparams = {\n  'ewallet_type':'OVO',\n  'external_id':'21345',\n  'amount':10000,\n  'phone':'081234567890'\n}\n\nres_dict = client.ewallet.create(params)\nprint(res_dict)\n# {\n#   \"business_id\": \"12345678\",\n#   \"external_id\": \"21345\",\n#   \"amount\": \"10000\",\n#   \"phone\": \"081234567890\",\n#   \"ewallet_type\": \"OVO\",\n#   \"status\": \"PENDING\",\n#   \"created\": \"2020-04-04T00:00:00.000Z\",\n# }\n```\n#### Get Payment Status\n\n```python\nres_dict = client.ewallet.get_payment_status(external_id='21345', payment_method='OVO')\nprint(res_dict)\n# {\n#   \"amount\": \"10000\",\n#   \"business_id\": \"12345678\",\n#   \"ewallet_type\": \"OVO\",\n#   \"external_id\": \"21345\",\n#   \"status\": \"COMPLETED\",\n#   \"transaction_date\": \"2020-04-04T11:48:47.903Z\"\n# }\n```\n\n### QR Codes (QRIS)\nGet QRCode client\n```python\nqrcode = client.qrcodes\n# or\nfrom xenditclient.qrcodes import QRCodesClient\n\nqrcode = QRCodesClient(client)\n```\n\nCreate QRCode for payment\n```python\ndata = qrcode.create(\"DYNAMIC\", \"DS-INV-01\", \"https://dwisulfahnur.com/api/xendit/callback\", 10200)\nprint(data)\n# {\n#   \"id\": \"qr_a706814a-d18b-4109-9b71-7a76f9855e123\",\n#   \"external_id\": \"DS-INV-01\",\n#   \"amount\": 10200,\n#   \"qr_string\": \"00022312321226660014ID.LINKAJA.WWW0118912312300241148000215200423041141230303UME51450015ID.OR.GPNQR.WWW0215000111111111110303UME520454995802ID5920Placeholder merchant6007Jakarta6106123456623801152QiFZi5qT12307152QiFZi5qThdA4M753033605405102006304D9CM\",\n#   \"callback_url\": \"https://dwisulfahnur.com/api/xendit/callback\",\n#   \"type\": \"DYNAMIC\",\n#   \"status\": \"ACTIVE\",\n#   \"created\": \"2020-07-27T07:44:31.420Z\",\n#   \"updated\": \"2020-07-27T07:44:31.420Z\"\n# }\n```\n\nGet QRCode detail payment\n```python\ndata = qrcode.get_payment_detail(\"DS-INV-01\")\nprint(data)\n# {\n#   \"id\": \"qr_a706814a-d18b-4109-9b71-7a76f9855e123\",\n#   \"external_id\": \"DS-INV-01\",\n#   \"amount\": 10200,\n#   \"qr_string\": \"00022312321226660014ID.LINKAJA.WWW0118912312300241148000215200423041141230303UME51450015ID.OR.GPNQR.WWW0215000111111111110303UME520454995802ID5920Placeholder merchant6007Jakarta6106123456623801152QiFZi5qT12307152QiFZi5qThdA4M753033605405102006304D9CM\",\n#   \"callback_url\": \"https://dwisulfahnur.com/api/xendit/callback\",\n#   \"type\": \"DYNAMIC\",\n#   \"status\": \"ACTIVE\",\n#   \"created\": \"2020-07-27T07:44:31.420Z\",\n#   \"updated\": \"2020-07-27T07:44:31.420Z\"\n# }\n```\n### Virtual Account\n\nGet Virtual Account Client\n\n```python\nva_client = client.virtual_account\n# or\nfrom xenditclient.virtual_accounts import VirtualAccountClient\n\nqrcode = VirtualAccountClient(client)\n```\n\nGet Virtual Account Banks\n```python\ndata = va_client.get_va_banks()\nprint(data)\n# [\n#     {'name': 'Bank Mandiri', 'code': 'MANDIRI'}, \n#     {'name': 'Bank Negara Indonesia', 'code': 'BNI'},\n#     {'name': 'Bank Rakyat Indonesia', 'code': 'BRI'}, \n#     {'name': 'Bank Permata', 'code': 'PERMATA'},\n#     {'name': 'Bank Central Asia', 'code': 'BCA'}\n# ]\n```\n\nCreate Virtual Account Payment\n\n```python\nfrom xenditclient import virtual_accounts\n\ndata = va_client.create(\n    external_id=\"DS-INV-01\", \n    bank_code=virtual_accounts.BNI, \n    name=\"Dwi Sulfahnur\", \n)\n\"\"\"\nYou can add the following additional options \nfor the Virtual Account as arguments:\n  - virtual_account_number: str // Optional\n  - suggested_amount: int // Optional\n  - is_closed: bool // Optional\n  - expected_amount: int // Optional\n  - expiration_date: UTC datetime // Optional\n  - is_single_use: bool // Optional\n  - description: str // Optional\n\"\"\"\n\nprint(data)\n# {\n#     \"is_closed\": true,\n#     \"status\": \"PENDING\",\n#     \"currency\": \"IDR\",\n#     \"owner_id\": \"5efab44e31890e1415bb70e9\",\n#     \"external_id\": \"ZICARE-01\",\n#     \"bank_code\": \"MANDIRI\",\n#     \"merchant_code\": \"88908\",\n#     \"name\": \"Dwi Sulfahnur\",\n#     \"account_number\": \"889089999000001\",\n#     \"suggested_amount\": 15500,\n#     \"expected_amount\": 15500,\n#     \"is_single_use\": true,\n#     \"expiration_date\": \"2051-07-27T17:00:00.000Z\",\n#     \"id\": \"5f1fd5470af2e8475877ba21\"\n# }\n```\n\nGet  Virtual Account Payment Detail\n```python\ndata = va_client.get_payment_detail(\"5f1fd5470af2e8475877ba21\")\nprint(data)\n# {\n#     \"is_closed\": true,\n#     \"status\": \"PENDING\",\n#     \"currency\": \"IDR\",\n#     \"owner_id\": \"5efab44e31890e1415bb70e9\",\n#     \"external_id\": \"ZICARE-01\",\n#     \"bank_code\": \"MANDIRI\",\n#     \"merchant_code\": \"88908\",\n#     \"name\": \"Dwi Sulfahnur\",\n#     \"account_number\": \"889089999000001\",\n#     \"suggested_amount\": 15500,\n#     \"expected_amount\": 15500,\n#     \"is_single_use\": true,\n#     \"expiration_date\": \"2051-07-27T17:00:00.000Z\",\n#     \"id\": \"5f1fd5470af2e8475877ba21\"\n# }\n```\n\nUpdate Virtual Account Payment Detail\n```python\nfrom datetime import datetime\n\ndata = va_client.update_payment_detail(\n    payment_id=\"5f1fd5470af2e8475877ba21\",\n    suggested_amount=20000,\n    expected_amount=20000,\n    expiration_date=datetime(2020, 12, 31, 00, 00, 00).isoformat(),\n    is_single_use=True,\n    description=\"Subscription Payment\",\n)\n\nprint(data)\n# {\n#     \"is_closed\": true,\n#     \"status\": \"PENDING\",\n#     \"currency\": \"IDR\",\n#     \"owner_id\": \"5efab44e31890e1415bb70e9\",\n#     \"external_id\": \"ZICARE-01\",\n#     \"bank_code\": \"MANDIRI\",\n#     \"merchant_code\": \"88908\",\n#     \"name\": \"Dwi Sulfahnur\",\n#     \"account_number\": \"889089999000001\",\n#     \"suggested_amount\": 20000,\n#     \"expected_amount\": 20000,\n#     \"is_single_use\": true,\n#     \"expiration_date\": \"2020-12-31T17:00:00.000Z\",\n#     \"id\": \"5f1fd5470af2e8475877ba21\",\n#     \"description\": \"Subscription Payment\",\n# }\n```\n## Legal \nDisclaimer: This library is not affliated with Xendit. This is an independent and unofficial Library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwisulfahnur%2Fpython-xendit-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwisulfahnur%2Fpython-xendit-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwisulfahnur%2Fpython-xendit-client/lists"}