Skip to main content

Mercury SDK

Mercury SDK can be used in projects that interface with the mercury service that provides common internal functionality.

Initializing the client

from mercuryclient import MercuryApi
# Setup connection parameters
conn_params = {'username': 'mercury_username', 'password':'password', 'url':'https://mercury-url.com'}
m = MercuryApi(conn_params)
m.send_mail(['recipent@email.com'],'Test mail', 'Mail body','ses','ses_profile')

Available APIs:

  • send_mail

  • send_sms

  • request_experian_report

  • get_experian_response

  • fetch_experian_report

  • request_cibil_report

  • get_cibil_response

  • fetch_cibil_report

  • request_highmark_report

  • get_highmark_response

  • fetch_highmark_report

  • request_verify_id

  • get_verify_id_result

  • request_bank_statement

  • get_bank_statement_result

  • verify_webhook

  • insurance

  • secure_patyment_recharge
    • get_operators_list

    • make_recharge

    • get_recharge_status

    • get_recharge_wallet_balance

    • get_recharge_ip

    • get_recharge_plans

  • bbps
    • set_agent_on_board

    • get_state

    • get_district_by_state

    • get_bill_categories

    • get_biller_by_categories

    • get_customer_params_by_biller_id

    • get_amount

    • send_bill_payment_request_transid

    • send_bill_payment_request

    • get_duplicate_payment_receipt

    • register_trasaction_complaint

    • register_service_complaint

    • get_complaint_status

    • get_bbpsid

  • verify_bank_account

  • verify_gstin

  • get_verify_gst_result

  • generate_okyc_otp

  • verify_okyc_otp

  • fetch_rc_details

  • verify_udyog_aadhaar

  • fetch_equifax_report

  • generate_liveness_session_id

  • get_liveness_session_result

  • extract_itr_details

  • fetch_itr_report

  • generate_epfo_otp

  • verify_epfo_otp

  • get_epfo_details

  • name_match

  • check_e_sign

  • create_indv_entity

  • create_legal_entity

  • payments
    • generate_qr_code

    • close_qr_code

    • generate_payment_plan

    • create_payment_subscription

    • fetch_subscription

    • generate_payment_link

    • cancel_payment_link

    • charge_subscription

    • manage_subscription

    • emandate_registration

    • emandate_payment_token

    • emandate_order

    • emandate_recurring_payments

  • utilities_verification
    • verify_electricity_bill

Types:

For complex requests like CIBIL, Experian or Highmark, you can construct the request JSON using the provided pydantic models. The types are available at mercury.types.<request_type>.request.

Example using models for generating Highmark Request:

from mercuryclient.types.highmark.request import Applicant, HighmarkRequest
applicant = Applicant(name="Example Name" ...)
request_obj = HighmarkRequest(
    applicant=applicant,
    inquiry_reference_number="ABCDE",
    ...
)
# After generating your request, pass the object to the corresponding request
m.fetch_highmark_report(request_obj, profile="sample_profile)

Testing:

Tests are run under tox

You can install tox with

>>> pip install tox

If using pyenv - you can do the following steps before running tox (patch version will depend on your installations - tox only considers the major version)

>>> pyenv local 3.7.3 3.6.8 3.8.1

Without this step - tox will not be able to find the interpreters

Run tests using the following command

>>> tox

Metadata

Release files for mercuryclient 1.23.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mercuryclient 1.23.1
File Size Uploaded Provenance Actions
mercuryclient-1.23.1.tar.gz 47.4 kB Without provenance Details for mercuryclient-1.23.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mercuryclient 1.23.1
File Interpreter ABI Platform Actions
mercuryclient-1.23.1-py3-none-any.whl Python 3 none any Details for mercuryclient-1.23.1-py3-none-any.whl

Total release size: 142.0 kB

Release files / mercuryclient-1.23.1.tar.gz

Download URL mercuryclient-1.23.1.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ad6cba92b387bc88ead0bad2e413a796eff814aeefb24571270b12844ab90160
BLAKE2b-256 checksum
How to use checksums
f8cc71527ff6a026108bfd78309b15b866553a9db8d88f89f383c39ba5ee8795
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9

Release files / mercuryclient-1.23.1-py3-none-any.whl

Download URL mercuryclient-1.23.1-py3-none-any.whl
Size 94.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90033012826035a78ed0b1a30311fe374cf251919059e28dd2f97c1ade4baaf6
BLAKE2b-256 checksum
How to use checksums
3cf57c64f6391e74b6ede9cb8d22ea1839d665709a640c5ba059afdf01ccf960
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.9

Security for mercuryclient 1.23.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.23.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page