Skip to main content

Connect to Moadian API V2

Project description

moadian2

پکیج پایتون برای اتصال به نسخه دوم (با گواهی امضا) سامانه مودیان

نصب

pip install moadian2

نحوه استفاده

from moadian2 import Moadian

with open("path/to/private.key", "rb") as key_file:
    private_key = key_file.read()

with open("path/to/certificate.file", "rb") as cert_file:
    certificate = cert_file.read()

moadi = Moadian("YOUR-FISCAL-ID", private_key, certificate)

ارسال صورتحساب

invoice = '{"header": {"taxid": "A278W604C8000000004744", "indatim": 1692085800000, "indati2m": 1692085803000, "inty": 1, "inno": "0000001140", "irtaxid": null, "inp": 1, "ins": 1, "tins": "10101704295", "tinb": null, "tob": 2, "bid": null, "sbc": null, "bpc": null, "bbc": null, "ft": null, "bpn": null, "scln": null, "scc": null, "crn": null, "billid": null, "tprdis": 61000000, "tdis": 0, "tadis": 61000000, "tvam": 5490000, "todam": 0, "tbill": 66490000, "setm": 2, "cap": null, "insp": 61000000, "tvop": 5490000, "tax17": null}, "body": [{"sstid": "2330000604708", "sstt": "FooBar", "am": 5, "mu": null, "fee": 12200000, "cfee": null, "cut": null, "exr": null, "prdis": 61000000, "dis": 0, "adis": 61000000, "vra": 9, "vam": 5490000, "odt": null, "odr": null, "odam": null, "olt": null, "olr": null, "olam": null, "consfee": null, "spro": null, "bros": null, "tcpbs": null, "cop": null, "vop": 5490000, "bsrn": null, "tsstam": 66490000}], "payments": []}'
moadi.send_invoice(invoice)
{"timestamp": 1722344752296, "result": [{"uid": "902bcc4e-d089-4de4-a27d-015a6cf23cba", "packetType": null, "referenceNumber": "4e9cd6e9-e0dd-4e12-bd8f-a872d84b1e54", "data": null}]}

استعلام با uid

moadi.inquiry_by_uid(["a9a63dea-5a91-4d5e-ba67-91f2358a3f0d", "7497b49d-16b4-41a3-a3fe-9e57d613a388"])

استعلام با شماره پیگیری

moadi.inquiry_by_reference_id(["a9a63dea-5a91-4d5e-ba67-91f2358a3f0d", "7497b49d-16b4-41a3-a3fe-9e57d613a388"])

دریافت اطلاعات حافظه مالیاتی

moadi.get_fiscal_information()

دریافت اطلاعات مودی

moadi.get_tax_payer("14003778990")
{"nameTrade": "پیشخوان الکترونیک ایرانیان منطقه آزاد انزلی", "taxpayerStatus": "ACTIVE", "nationalId": "14003778990"}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moadian2-0.0.2.tar.gz (42.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

moadian2-0.0.2-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file moadian2-0.0.2.tar.gz.

File metadata

  • Download URL: moadian2-0.0.2.tar.gz
  • Upload date:
  • Size: 42.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for moadian2-0.0.2.tar.gz
Algorithm Hash digest
SHA256 4b03b7f80c6c311a387f135f0357f00f7b1e66f99c9cb8b9a7654909bf1272bb
MD5 03d0deb2a78b583a4938a58888c81818
BLAKE2b-256 d54edf2cd7dc7ca9421892f0a8c16fd16a5d65e20159c506478ea3cff452646b

See more details on using hashes here.

File details

Details for the file moadian2-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: moadian2-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for moadian2-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d65cfa1038e15aa3012fdeb73b4a77f8739d7f0ad03218262183682b5764d510
MD5 ea67e79efc68db261854b7f096a3b5cb
BLAKE2b-256 b6afa611d301c70fbc5850af553ab812a2d200dc140743a18983e2e63921e2ca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page