Skip to content

code-payments/code-sdk-python

Repository files navigation

Code SDK - Python

Code SDK - Python

pypi license

The Code Python SDK is a module that allows Python developers to integrate Code into their applications. Seamlessly start accepting payments with minimal setup and just a few lines of code.

See the documentation for more details.

What is Code?

Code is a mobile wallet app leveraging self-custodial blockchain technology to provide an instant, global, and private payments experience.

Installation

You can install the Code Python SDK from PyPI:

pip install code-wallet

Usage

Here's a simple example showcasing how to create a payment intent using the Python SDK:

from code_wallet.client.intents import payment_intents

test_data = {
    'destination': "E8otxw1CVX9bfyddKu3ZB3BVLa4VVF9J7CTPdnUwT9jR",
    'amount': 0.05,
    'currency': 'usd',
}

# Create a payment request intent
payment_intents.create(test_data)

# Verify the intent status
payment_intents.get_status(id)

Getting Help

If you have any questions or need help integrating Code into your website or application, please reach out to us on Discord or Twitter.

Contributing

For now the best way to contribute is to share feedback on Discord. This will evolve as we continue to build out the platform and open up more ways to contribute.