Small Python client for E-Point payment checkout, callbacks, refunds, and bank response codes.
Project description
epoint-az
Small Python client for E-Point checkout flows.
It handles:
- E-Point
database64 encoding - SHA1 signature generation and verification
- normal checkout requests
- card registration with pay
- saved card execute-pay
- wallet and token widget payment requests
- reverse/refund requests
- callback verification and decoding
- bank response code lookup
Install
pip install epoint-az
For local development from this repository:
cd packages/epoint-az
python -m pip install -e .
Checkout
from epoint_az import EPointClient
client = EPointClient(
public_key="your-public-key",
private_key="your-private-key",
)
response = client.checkout(
order_id="order-1001",
amount="12.50",
currency="AZN",
description="Order #1001",
success_redirect_url="https://example.com/payment/success",
error_redirect_url="https://example.com/payment/error",
result_url="https://api.example.com/payment/result",
)
if response.ok and response.redirect_url:
print(response.redirect_url)
else:
print(response.body)
Callback Verification
from epoint_az import EPointClient, EPointSignatureError
client = EPointClient(public_key="public", private_key="private")
try:
callback = client.parse_callback(
data=request.POST["data"],
signature=request.POST["signature"],
)
except EPointSignatureError:
return "OK"
if callback.success:
print(callback.order_id, callback.transaction, callback.bank_code)
else:
print(callback.order_id, callback.status, callback.bank_message)
Bank Codes
from epoint_az import describe_bank_code, is_approved_bank_code
assert is_approved_bank_code("000")
assert describe_bank_code("116") == "Decline, insufficient funds"
Signed Payload Only
If your framework already owns HTTP calls, use the signer directly:
signed = client.encode_payload({"public_key": "public", "order_id": "1"})
requests.post(url, data=signed.as_form())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file epoint_az-0.1.0.tar.gz.
File metadata
- Download URL: epoint_az-0.1.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6298a46872f3b89744ad3adf1e13cf56378450d20218d97698861c007ecf9ca6
|
|
| MD5 |
acb471976e967e303dfdce8e7366f765
|
|
| BLAKE2b-256 |
b1a362baa6c5bd652ed7a1ebba7a75e71dc86d7c529007810e49eefd69af6610
|
Provenance
The following attestation bundles were made for epoint_az-0.1.0.tar.gz:
Publisher:
publish.yml on VusalAbdurahmanovX/epoint-az
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
epoint_az-0.1.0.tar.gz -
Subject digest:
6298a46872f3b89744ad3adf1e13cf56378450d20218d97698861c007ecf9ca6 - Sigstore transparency entry: 1964095390
- Sigstore integration time:
-
Permalink:
VusalAbdurahmanovX/epoint-az@622ab628742bb635868cacd10296eec374cc5dbe -
Branch / Tag:
- Owner: https://github.com/VusalAbdurahmanovX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@622ab628742bb635868cacd10296eec374cc5dbe -
Trigger Event:
release
-
Statement type:
File details
Details for the file epoint_az-0.1.0-py3-none-any.whl.
File metadata
- Download URL: epoint_az-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f457c82e2d0b1e49f6f9c05789e3c06652fb954e8b0f665dbd10e8599c1f81a7
|
|
| MD5 |
4c01f54338418877b68d07f952503ab8
|
|
| BLAKE2b-256 |
952caec984653526ee407704acd55d0794018e7da6cd56000e6d9346b34498fb
|
Provenance
The following attestation bundles were made for epoint_az-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on VusalAbdurahmanovX/epoint-az
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
epoint_az-0.1.0-py3-none-any.whl -
Subject digest:
f457c82e2d0b1e49f6f9c05789e3c06652fb954e8b0f665dbd10e8599c1f81a7 - Sigstore transparency entry: 1964095502
- Sigstore integration time:
-
Permalink:
VusalAbdurahmanovX/epoint-az@622ab628742bb635868cacd10296eec374cc5dbe -
Branch / Tag:
- Owner: https://github.com/VusalAbdurahmanovX
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@622ab628742bb635868cacd10296eec374cc5dbe -
Trigger Event:
release
-
Statement type: