Python SDK Library for accepting payments with Spotflow
Project description
Spotflow Python Library
Introduction
The Spotflow Python SDK helps you or rather enables users to make payments seamlessly. It integrates smoothly into your application, providing a streamlined checkout experience.
Available Features:
- Payments - Initializing payments
Table of Contents
Requirements
- *A valid Spotflow API keys
- python version >= 3.12
Installation
using pipenv
pipenv install spotflow-python-sdk
# or
pip install spotflow-python-sdk
Usage
🚀 Quick Start
from spotflow_sdk import SpotflowApiClient
api_key = "sk_test_xxxxxxx"
api_client = SpotflowApiClient(api_key=api_key)
payment_data = {
"amount": 2000,
"currency": "USD",
"local_currency": "NGN",
"email": "customer@example.com"
}
response = api_client.checkout.initialize_payment(**payment_data)
print(response.json())
Usage Example Initializing a Payment
from spotflow_sdk import SpotflowApiClient
api_client = SpotflowApiClient(api_key="sk_test_xxxxx", timeout=10, max_retries=3)
payment_data = {
"amount": 5000,
"currency": "USD",
"local_currency": "NGN",
"email": "demo@spotflow.com"
}
try:
response = api_client.checkout.initialize_payment(**payment_data)
print("Payment initialized successfully:", response.json())
except Exception as e:
print("Payment initialization failed:", e)
Parameters
Read more about our parameters and how they can be used here.
| Parameter | Required | Description |
|---|---|---|
| apiKey | True | Your API Secret |
| reference | False | Your transaction reference. This MUST be unique for every transaction |
| amount | True | Amount to charge the customer. NB: For subscription payments, amount comes from the plan details. This is not required for subscription payments. |
| currency | True | Currency to charge in. |
| localCurrency | True | This is required when a payment is being made in USD |
| planId | False | This is the plan ID being paid for a particular subscription plan, this is not required for one time payments. note that you have to have created a subscription plan on the platform before this works or you will get an error here is the doc on subscriptions |
| True | This is the Customer's Email Address | |
| metadata | False | This contains other information about the product such as the product name and other additional properties. Product Name should not be passed if planId is being passed |
| callBackUrl | False | This is the URL the browser redirects to on success of a payment |
🎉 Spotflow Hacktoberfest 2025
Welcome to Spotflow’s open-source repositories — part of this year’s Hacktoberfest Challenge by DigitalOcean!
Spotflow is a global Merchant of Record (MoR) that simplifies payment processing for businesses worldwide.
We handle everything from global payment acceptance to compliance and settlement — empowering merchants to go global effortlessly.
🚀 How to Participate
- Register for Hacktoberfest at hacktoberfest.com
- Fork this repository.
- Choose an issue labeled
hacktoberfestorgood first issue. - Make your contribution (see Contributing Guidelines).
- Open a pull request (PR) and add a
hacktoberfest-acceptedlabel to your PR. - Once approved and merged — it counts toward your Hacktoberfest goal!
💡 What You Can Contribute
- Improve or add SDK functionality
- Write or improve API documentation
- Spot bugs/improvements and write new issues (use Issues Template as a guide).
- Add new language SDKs (Python, JS, Java, etc.)
- Fix typos, formatting, or examples
- Write tutorials or integration guides
📅 Important Dates
- Event: October 1 – October 31, 2025
- Application Deadline: October 31, 2025
🧠 Resources
- Docs: https://docs.spotflow.one
- API Playground: https://www.spotflow.one/demo
- Sign up: Spotflow Hacktoberfest Form
License
By contributing to this library, you agree that your contributions will be licensed under its MIT license.
Copyright (c) Spotflow Inc.
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 spotflow_python_sdk-0.1.0.tar.gz.
File metadata
- Download URL: spotflow_python_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
343681d505930b85a054ca6a89ca3f7875fdb4fbe0aa540cab7b4f7d6a4c34d8
|
|
| MD5 |
9c44e4e5f9c78720d4813e5459bd9a67
|
|
| BLAKE2b-256 |
69455c0985190c7c508d070d457cae161ed1128fed3394430024d0b6584447ef
|
File details
Details for the file spotflow_python_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spotflow_python_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47780068e8f4f891fdaf76f6f12fcf1f8cea37a486b84121eb204c26659d5e45
|
|
| MD5 |
72a25aae75aa3e2d01e660e4bc97ac3a
|
|
| BLAKE2b-256 |
b5583f48f3be56942c4fbc38e162cc6996746a5d221238f63aaaa5183a04369a
|