Magpie API Documentation
Project description
domdanao-magpiepay-sdk-python
The official Python library for the MagpiePay API.
Installation
Install the package via pip:
pip install domdanao-magpiepay-sdk-python
Usage
Configuration
Initialize the Configuration object with your API key.
import os
import magpiepay
from magpiepay.api import payments_api, payouts_api
from magpiepay.model.payout_create_request import PayoutCreateRequest
# Configure API key authorization
configuration = magpiepay.Configuration(
host = "https://api.magpiepay.com",
username = os.environ["MAGPIE_API_KEY"],
password = ""
)
# Create an instance of the API class
api_client = magpiepay.ApiClient(configuration)
payments = payments_api.PaymentsApi(api_client)
payouts = payouts_api.PayoutsApi(api_client)
Examples
List Payments
try:
api_response = payments.list_payments()
print(api_response)
except magpiepay.ApiException as e:
print("Exception when calling PaymentsApi->list_payments: %s\n" % e)
Create a Payout
payout_request = PayoutCreateRequest(
amount=1000,
currency="PHP",
description="Test Payout",
# ... other fields
)
try:
api_response = payouts.create_payout(payout_create_request=payout_request)
print(api_response)
except magpiepay.ApiException as e:
print("Exception when calling PayoutsApi->create_payout: %s\n" % e)
API Resources
License
Unlicense
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
magpiepay-1.0.0.tar.gz
(35.8 kB
view details)
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
magpiepay-1.0.0-py3-none-any.whl
(61.2 kB
view details)
File details
Details for the file magpiepay-1.0.0.tar.gz.
File metadata
- Download URL: magpiepay-1.0.0.tar.gz
- Upload date:
- Size: 35.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62d2dfb62988115525a10b19665114603db10ee970188eebf454194f12312034
|
|
| MD5 |
a1bef835cb9f797c0d6c7376e352736d
|
|
| BLAKE2b-256 |
3d603735c6800bb85aa6926a64629883b50f8f2881ffba09d7a1c26573bcd6a5
|
File details
Details for the file magpiepay-1.0.0-py3-none-any.whl.
File metadata
- Download URL: magpiepay-1.0.0-py3-none-any.whl
- Upload date:
- Size: 61.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53b155205187c3bc00d50cb0398b25482f394deb0a7fba698a4daecad8532c45
|
|
| MD5 |
721013072827bd1dd75cb946f92191b7
|
|
| BLAKE2b-256 |
ffb78e16e13ed9d8d4a7f67ecc748f1e995b6c0798e4e45194f08dd5a84ba594
|