Skip to main content

Python SDK for 3X PAY API

Project description

three-x-pay-sdk

Python SDK for the 3X PAY API.

Installation

pip install three-x-pay-sdk

Quick start (sync)

from three_x_pay_sdk import ThreeXPayClient, CreatePayInRequest


client = ThreeXPayClient(api_key="YOUR_API_KEY")

# Health check
client.ping()

# Create payin
req = CreatePayInRequest(
    amount=10.5,
    currency="USDT",
    merchant_order_id="order-123",
    merchant_callback_url="https://example.com/webhook",
    merchant_return_url="https://example.com/return",
    is_test=True,
)
created = client.create_payin(req)
print(created.data.payment_url)

# Get payin
info = client.get_payin(created.data.id)
print(info.data.status)

# Alternatively, use context manager
with ThreeXPayClient(api_key="YOUR_API_KEY") as client:
    client.ping()

Webhook signature

from three_x_pay_sdk import verify_signature

is_valid = verify_signature(body_bytes, secret_key, signature_from_header)

License

MIT

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

three_x_pay_sdk-0.1.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

three_x_pay_sdk-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file three_x_pay_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: three_x_pay_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.0 Darwin/24.3.0

File hashes

Hashes for three_x_pay_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d27c7f5f7c249d4c648167907ebafcfe1c69c29377a2d14b71248fe65a5439e9
MD5 3a35e440370d957e80960a6de84e6ce4
BLAKE2b-256 0288b917ab081405099f61f7838ba460e47b7294d04b1f384ad0119fe1a80dc6

See more details on using hashes here.

File details

Details for the file three_x_pay_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: three_x_pay_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.0 Darwin/24.3.0

File hashes

Hashes for three_x_pay_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f33f7a5190021ae1a4b6bcbfd6255602351eacb4f2a9029a97b3df73233cca42
MD5 a903fb5e1f01d3926e551b71bed92afa
BLAKE2b-256 a74b18cedaac4d2f9b78273d73c2f1e135d274830cb83826d59740a4813ae714

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