Python bindings for Bangladesh payment gateway SDK
Project description
bd-payment-gateway-py
Python package + PyO3 extension for bd-payment-gateway.
Python Support
- Python 3.9+ supported (built with
abi3, minimum ABI 3.9; tested on 3.14 in CI)
Install (PyPI)
pip install bd-payment-gateway
uv add bd-payment-gateway
Local Tooling
Use uv locally for Python dependency and command execution.
source $HOME/.local/bin/env
cd bd-payment-gateway-py
uv sync --group dev
Build
source $HOME/.local/bin/env
cd bd-payment-gateway-py
uv run maturin build --release --features all-providers
Build only one provider:
source $HOME/.local/bin/env
uv run maturin build --release --features portwallet
Typed API
Primary public API for SSLCOMMERZ:
bd_payment_gateway.sslcommerz.SslcommerzClientbd_payment_gateway.sslcommerz.modelsSettingsUrlsCustomerProductInitiatePaymentRequestVerifyPaymentRequest
The compiled extension is internal (bd_payment_gateway._bd_payment_gateway_py).
Application code should use the facade and models, not raw dict payloads.
Extension-level provider classes still support JSON/mapping configs and can accept optional
http_settings keys:
timeout_msmax_retriesinitial_backoff_msmax_backoff_msuser_agent
Smoke Test Example
Run SSLCOMMERZ sandbox full-flow test (real initiate + verify polling):
cd bd-payment-gateway-py
uv run python examples/smoke_test.py
Recommended environment variables (override temporary hardcoded sandbox credentials):
export SSLCOMMERZ_STORE_ID="your_store_id"
export SSLCOMMERZ_STORE_PASSWD="your_store_passwd"
export SSLCOMMERZ_RETURN_BASE_URL="https://your-registered-domain.com"
Or create a local examples/.env file from examples/.env.example.
Typing
- The package is typed (
py.typedincluded). - Extension stubs are provided at
python/bd_payment_gateway/_bd_payment_gateway_py.pyi. - Pydantic v2 + pydantic-settings are required runtime dependencies.
Error Contract
Use bd_payment_gateway.errors.PaymentGatewayError.
Structured fields:
codemessagehintprovider_payload
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 Distributions
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 bd_payment_gateway-0.1.3.tar.gz.
File metadata
- Download URL: bd_payment_gateway-0.1.3.tar.gz
- Upload date:
- Size: 93.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd1292567efc3bdcec0ddac13e4c23b7fcfb9af9812022b83624a71bbce131bb
|
|
| MD5 |
84eb15a7468d0227b1ffc24b32c472b9
|
|
| BLAKE2b-256 |
e6e11aa3a8fbf2e8c7d9a9721283858f2488fdc08f90abb93183e764a6297103
|
Provenance
The following attestation bundles were made for bd_payment_gateway-0.1.3.tar.gz:
Publisher:
publish-python.yml on Barrzen/bd-payment-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bd_payment_gateway-0.1.3.tar.gz -
Subject digest:
bd1292567efc3bdcec0ddac13e4c23b7fcfb9af9812022b83624a71bbce131bb - Sigstore transparency entry: 984581679
- Sigstore integration time:
-
Permalink:
Barrzen/bd-payment-gateway@be5477847773559b3ba9f63b0339bb9e386e0840 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Barrzen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@be5477847773559b3ba9f63b0339bb9e386e0840 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bd_payment_gateway-0.1.3-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: bd_payment_gateway-0.1.3-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 2.5 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cec99d2e2c70422d9930fa1611817c64ab956ea8ffe00da86cb391ebbf9a946d
|
|
| MD5 |
6fc2b896051c9a495f545ed2e81eda9e
|
|
| BLAKE2b-256 |
158ddf64b75e74c5951bc480595e6196c5646f317b5d201227fdeb2f4f7ab343
|
Provenance
The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-win_amd64.whl:
Publisher:
publish-python.yml on Barrzen/bd-payment-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bd_payment_gateway-0.1.3-cp39-abi3-win_amd64.whl -
Subject digest:
cec99d2e2c70422d9930fa1611817c64ab956ea8ffe00da86cb391ebbf9a946d - Sigstore transparency entry: 984581686
- Sigstore integration time:
-
Permalink:
Barrzen/bd-payment-gateway@be5477847773559b3ba9f63b0339bb9e386e0840 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Barrzen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@be5477847773559b3ba9f63b0339bb9e386e0840 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
476167eb297da4382bbeae2087a96cf9a2541833433c5fd23440ba5ad6de908a
|
|
| MD5 |
096230766737b4f4b361af9bead98618
|
|
| BLAKE2b-256 |
d48385f3e5c459943cb264aacb39c265361f4e7527d404f63423431fb642f569
|
Provenance
The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl:
Publisher:
publish-python.yml on Barrzen/bd-payment-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
476167eb297da4382bbeae2087a96cf9a2541833433c5fd23440ba5ad6de908a - Sigstore transparency entry: 984581698
- Sigstore integration time:
-
Permalink:
Barrzen/bd-payment-gateway@be5477847773559b3ba9f63b0339bb9e386e0840 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Barrzen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@be5477847773559b3ba9f63b0339bb9e386e0840 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.2 MB
- Tags: CPython 3.9+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19808a4376f3c58acbfe9da1f099ad55c095fb3e6790efea7738ffdc99d262e7
|
|
| MD5 |
684465ce8bb32d75daf10f5389a92aae
|
|
| BLAKE2b-256 |
99992e3976d6f87dd897e6fe2c8831c66d4c04541f58877f800fc78e9b83c18c
|
Provenance
The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
publish-python.yml on Barrzen/bd-payment-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bd_payment_gateway-0.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
19808a4376f3c58acbfe9da1f099ad55c095fb3e6790efea7738ffdc99d262e7 - Sigstore transparency entry: 984581695
- Sigstore integration time:
-
Permalink:
Barrzen/bd-payment-gateway@be5477847773559b3ba9f63b0339bb9e386e0840 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Barrzen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@be5477847773559b3ba9f63b0339bb9e386e0840 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bd_payment_gateway-0.1.3-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: bd_payment_gateway-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62f3211fcd6780ffc628a7007280aeadeae1b1e4ed0111d2ef9da6b063465965
|
|
| MD5 |
ed0e7f94f4eab326bc2dc03e0e57968f
|
|
| BLAKE2b-256 |
1aaa1edb128b298209445d7d8e32efd62e3f7f3d9465a7985eb64a3a732454dd
|
Provenance
The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
publish-python.yml on Barrzen/bd-payment-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bd_payment_gateway-0.1.3-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
62f3211fcd6780ffc628a7007280aeadeae1b1e4ed0111d2ef9da6b063465965 - Sigstore transparency entry: 984581691
- Sigstore integration time:
-
Permalink:
Barrzen/bd-payment-gateway@be5477847773559b3ba9f63b0339bb9e386e0840 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Barrzen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@be5477847773559b3ba9f63b0339bb9e386e0840 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file bd_payment_gateway-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: bd_payment_gateway-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1905c30b4f61fa47927b0f14500c8a5a975b69c1ef4888bb2dfb6fcd202185ef
|
|
| MD5 |
c6a9c868d2c4fa92c77f2cc07933fbd9
|
|
| BLAKE2b-256 |
3ddbba48377bd2d2f2f70c427b8560fc2747d6e487798f476b5e81816e8b78ff
|
Provenance
The following attestation bundles were made for bd_payment_gateway-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
publish-python.yml on Barrzen/bd-payment-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bd_payment_gateway-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
1905c30b4f61fa47927b0f14500c8a5a975b69c1ef4888bb2dfb6fcd202185ef - Sigstore transparency entry: 984581701
- Sigstore integration time:
-
Permalink:
Barrzen/bd-payment-gateway@be5477847773559b3ba9f63b0339bb9e386e0840 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Barrzen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@be5477847773559b3ba9f63b0339bb9e386e0840 -
Trigger Event:
workflow_dispatch
-
Statement type: