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
await 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 = await client.create_payin(req)
print(created.data.payment_url)

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

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.1.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.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: three_x_pay_sdk-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 31b84b068b11824e88e058fec8678d6433ee5a9ee0c736653a21ab65bc3174a4
MD5 f57ebf21f2e4161969e35f3899e3c2b4
BLAKE2b-256 8ba647d132015c3631c750d98ac625df06fe4e457c143bc06e88728c2e23019e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: three_x_pay_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 88c2ad8a7d757d1fdab70d13e77eb679f5601a562c5faedb6a98b7171ca36abc
MD5 6b2de1dfab43834411136f662a17c9a7
BLAKE2b-256 29392b36269452779433df5546ebb5c099f4440569d9bdcd277f8680e5778a1c

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