# Python SDK for Finergy MIA POS eComm API
* Finergy MIA POS eComm integration: https://github.com/finergy-tech/mia-pay-ecomm-integration
* GitHub project https://github.com/alexminza/finergy-mia-pos-sdk-python
* PyPI package https://pypi.org/project/finergy-mia-pos-sdk/
## Installation
To easily install or upgrade to the latest release, use `pip`:
```shell
pip install --upgrade finergy-mia-pos-sdk
```
## Getting started
Import SDK:
```python
from finergy_mia_pos_sdk import FinergyMiaPosSdk
```
Add project configuration:
```python
import os
FINERGY_MIA_POS_BASE_URL = os.getenv('FINERGY_MIA_POS_BASE_URL', FinergyMiaPosSdk.TEST_BASE_URL)
FINERGY_MIA_POS_MERCHANT_ID = os.getenv('FINERGY_MIA_POS_MERCHANT_ID')
FINERGY_MIA_POS_SECRET_KEY = os.getenv('FINERGY_MIA_POS_SECRET_KEY')
FINERGY_MIA_POS_TERMINAL_ID = os.getenv('FINERGY_MIA_POS_TERMINAL_ID')
```
## SDK usage examples
### Initialize SDK instance
```python
sdk_instance = FinergyMiaPosSdk.get_instance(
base_url=FINERGY_MIA_POS_BASE_URL,
merchant_id=FINERGY_MIA_POS_MERCHANT_ID,
secret_key=FINERGY_MIA_POS_SECRET_KEY)
```
### Create order payment
```python
payment_data = {
'terminalId': FINERGY_MIA_POS_TERMINAL_ID,
'orderId': 'order12345',
'amount': 150.75,
'currency': 'MDL',
'language': 'ro',
'payDescription': 'Payment for order #12345',
'paymentType': 'qr',
'clientName': 'Test Client',
'clientPhone': '00000000',
'clientEmail': 'test@test.com',
'callbackUrl': 'http://your_callback_url',
'successUrl': 'http://your_success_url?orderId=order12345',
'failUrl': 'http://your_failUrl_url?orderId=order12345'
}
create_payment_response = sdk_instance.create_payment(payment_data=payment_data)
payment_id = create_payment_response['paymentId']
checkout_page = create_payment_response['checkoutPage']
```
### Validate callback signature
```python
callback_data = {
'result': {
'terminalId': 'TRMW0001',
'orderId': '108',
'paymentId': '2a663962-c954-4984-90e5-1d24c3305f7b',
'status': 'EXPIRED',
'amount': 1775.00,
'currency': 'MDL',
'paymentType': 'qr',
'paymentDate': '2024-12-17T11:54:23'
},
'signature': 'gtWkQdF2X2oCwO/+a+DJxpDc5DhjC1PMVWrnCXsCX54qOo24siRTy4PAjHoYet1r0KERVEL65p7UZuHcaK+TOiJptlalMUVZWbGLPf05WpyKPOPSPI1P4ZoADzJpceYsKjjZImB/+ft6OAF+ahxazhHkiT1Ze05vwD2L1D6zRohcxZl9XRJMChZcVD9bdNy23ozwuq6FwlnneJJeCPNvqveg7f5e0CD1NXWdLJ3WryP0ypcGtQGZAY+PrhkdVG5SWhYr0FFniAZIrp9yOFn3vrsUP4rpZmeqIahSV6x12pyyRsm+bs/tjw/kPR34ygG7ksXsrpwhQbltAHWeWwnOmg=='
}
validate_result = sdk_instance.validate_callback_signature(callback_data=callback_data)
```
### Get payment status
```python
payment_status_response = sdk_instance.get_payment_status(payment_id=payment_id)
```
For more examples see [Finergy MIA POS PHP SDK](https://github.com/finergy-tech/mia-pay-ecomm-php-sdk)
Raw data
{
"_id": null,
"home_page": null,
"name": "finergy-mia-pos-sdk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "finergy, moldova, mia, pos, qr, payments, api, sdk, python",
"author": "Alexander Minza",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/ac/96/bcebc52597936c56b16139f30d91d8df6270cd642f08857984b70c7cfb22/finergy_mia_pos_sdk-1.0.2.tar.gz",
"platform": null,
"description": "# Python SDK for Finergy MIA POS eComm API\n* Finergy MIA POS eComm integration: https://github.com/finergy-tech/mia-pay-ecomm-integration\n* GitHub project https://github.com/alexminza/finergy-mia-pos-sdk-python\n* PyPI package https://pypi.org/project/finergy-mia-pos-sdk/\n\n## Installation\nTo easily install or upgrade to the latest release, use `pip`:\n```shell\npip install --upgrade finergy-mia-pos-sdk\n```\n\n## Getting started\nImport SDK:\n\n```python\nfrom finergy_mia_pos_sdk import FinergyMiaPosSdk\n```\n\nAdd project configuration:\n\n```python\nimport os\n\nFINERGY_MIA_POS_BASE_URL = os.getenv('FINERGY_MIA_POS_BASE_URL', FinergyMiaPosSdk.TEST_BASE_URL)\nFINERGY_MIA_POS_MERCHANT_ID = os.getenv('FINERGY_MIA_POS_MERCHANT_ID')\nFINERGY_MIA_POS_SECRET_KEY = os.getenv('FINERGY_MIA_POS_SECRET_KEY')\nFINERGY_MIA_POS_TERMINAL_ID = os.getenv('FINERGY_MIA_POS_TERMINAL_ID')\n```\n\n## SDK usage examples\n### Initialize SDK instance\n\n```python\nsdk_instance = FinergyMiaPosSdk.get_instance(\n base_url=FINERGY_MIA_POS_BASE_URL,\n merchant_id=FINERGY_MIA_POS_MERCHANT_ID,\n secret_key=FINERGY_MIA_POS_SECRET_KEY)\n```\n\n### Create order payment\n\n```python\npayment_data = {\n 'terminalId': FINERGY_MIA_POS_TERMINAL_ID,\n 'orderId': 'order12345',\n 'amount': 150.75,\n 'currency': 'MDL',\n 'language': 'ro',\n 'payDescription': 'Payment for order #12345',\n 'paymentType': 'qr',\n 'clientName': 'Test Client',\n 'clientPhone': '00000000',\n 'clientEmail': 'test@test.com',\n 'callbackUrl': 'http://your_callback_url',\n 'successUrl': 'http://your_success_url?orderId=order12345',\n 'failUrl': 'http://your_failUrl_url?orderId=order12345'\n}\n\ncreate_payment_response = sdk_instance.create_payment(payment_data=payment_data)\n\npayment_id = create_payment_response['paymentId']\ncheckout_page = create_payment_response['checkoutPage']\n```\n\n### Validate callback signature\n\n```python\ncallback_data = {\n 'result': {\n 'terminalId': 'TRMW0001',\n 'orderId': '108',\n 'paymentId': '2a663962-c954-4984-90e5-1d24c3305f7b',\n 'status': 'EXPIRED',\n 'amount': 1775.00,\n 'currency': 'MDL',\n 'paymentType': 'qr',\n 'paymentDate': '2024-12-17T11:54:23'\n },\n 'signature': 'gtWkQdF2X2oCwO/+a+DJxpDc5DhjC1PMVWrnCXsCX54qOo24siRTy4PAjHoYet1r0KERVEL65p7UZuHcaK+TOiJptlalMUVZWbGLPf05WpyKPOPSPI1P4ZoADzJpceYsKjjZImB/+ft6OAF+ahxazhHkiT1Ze05vwD2L1D6zRohcxZl9XRJMChZcVD9bdNy23ozwuq6FwlnneJJeCPNvqveg7f5e0CD1NXWdLJ3WryP0ypcGtQGZAY+PrhkdVG5SWhYr0FFniAZIrp9yOFn3vrsUP4rpZmeqIahSV6x12pyyRsm+bs/tjw/kPR34ygG7ksXsrpwhQbltAHWeWwnOmg=='\n}\n\nvalidate_result = sdk_instance.validate_callback_signature(callback_data=callback_data)\n```\n\n### Get payment status\n\n```python\npayment_status_response = sdk_instance.get_payment_status(payment_id=payment_id)\n```\n\nFor more examples see [Finergy MIA POS PHP SDK](https://github.com/finergy-tech/mia-pay-ecomm-php-sdk)\n",
"bugtrack_url": null,
"license": null,
"summary": "Python SDK for Finergy MIA POS eComm API",
"version": "1.0.2",
"project_urls": {
"Documentation": "https://github.com/finergy-tech/mia-pay-ecomm-integration",
"Homepage": "https://github.com/alexminza/finergy-mia-pos-sdk-python",
"Issues": "https://github.com/alexminza/finergy-mia-pos-sdk-python/issues",
"Repository": "https://github.com/alexminza/finergy-mia-pos-sdk-python"
},
"split_keywords": [
"finergy",
" moldova",
" mia",
" pos",
" qr",
" payments",
" api",
" sdk",
" python"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "2cd7f215402f0582da1634c03eb99bfa28dca824737081c3932ec1d432ed5144",
"md5": "24b1a6a87086712ee7859f0600ecdd16",
"sha256": "b222d8f163dfeb8436f6b807cd82feb45383e0d3a73ce2afd9401842264321a0"
},
"downloads": -1,
"filename": "finergy_mia_pos_sdk-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "24b1a6a87086712ee7859f0600ecdd16",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 21679,
"upload_time": "2025-08-29T13:30:57",
"upload_time_iso_8601": "2025-08-29T13:30:57.254126Z",
"url": "https://files.pythonhosted.org/packages/2c/d7/f215402f0582da1634c03eb99bfa28dca824737081c3932ec1d432ed5144/finergy_mia_pos_sdk-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ac96bcebc52597936c56b16139f30d91d8df6270cd642f08857984b70c7cfb22",
"md5": "02e64d5f6a6193f15447734a67366332",
"sha256": "8ef2a046453d210c09e36f3ee98876ed337e746f86112f2a801a4f4ddcabd789"
},
"downloads": -1,
"filename": "finergy_mia_pos_sdk-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "02e64d5f6a6193f15447734a67366332",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 21031,
"upload_time": "2025-08-29T13:30:58",
"upload_time_iso_8601": "2025-08-29T13:30:58.623249Z",
"url": "https://files.pythonhosted.org/packages/ac/96/bcebc52597936c56b16139f30d91d8df6270cd642f08857984b70c7cfb22/finergy_mia_pos_sdk-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-29 13:30:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "finergy-tech",
"github_project": "mia-pay-ecomm-integration",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "finergy-mia-pos-sdk"
}