Metadata-Version: 2.3
Name: stitch-money-api
Version: 1.0.0
Summary: A package for initiating payments via the Stitch API
Project-URL: Homepage, https://stitch.money/
Project-URL: Documentation, https://docs.stitch.money/
Author-email: Stitch Money <sdks@stitch.money>
License: MIT License
        
        Copyright (c) 2024 Stitch
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Requires-Dist: anyio==4.4.0
Requires-Dist: backoff==2.2.1
Requires-Dist: certifi==2024.7.4
Requires-Dist: cffi==1.17.0
Requires-Dist: charset-normalizer==3.3.2
Requires-Dist: cryptography==43.0.0
Requires-Dist: exceptiongroup==1.2.2
Requires-Dist: gql==3.5.0
Requires-Dist: graphql-core==3.2.3
Requires-Dist: idna==3.7
Requires-Dist: multidict==6.0.5
Requires-Dist: pycparser==2.22
Requires-Dist: requests-toolbelt==1.0.0
Requires-Dist: requests==2.32.3
Requires-Dist: sniffio==1.3.1
Requires-Dist: typing-extensions==4.12.2
Requires-Dist: urllib3==2.2.2
Requires-Dist: yarl==1.9.4
Description-Content-Type: text/markdown

# stitch-money-api
A Python package for processing digitial wallets payments via the Stitch API. 
For the complete integration guide, visit [docs.stitch.money](https://docs.stitch.money/payment-products/payins/wallets/integration-process).

# Installation

```bash
$ pip3 install stitch-money-api
```

## Usage

```python
import json
import os
from stitch.payins import Wallets
from stitch.utils.types import Wallet, Currency
import uuid
from dotenv import load_dotenv

load_dotenv()

client_id = os.getenv("STITCH_CLIENT_ID")
client_secret = os.getenv("STITCH_CLIENT_SECRET")

# Initialise SDK
stitch_sdk = Wallets(client_id, client_secret, 'merchant.energy.bigbag')

# Payment Verification (Web Only)
session = stitch_sdk.verify(
    Wallet.APPLE_PAY, 1, Currency.ZAR, 'https://apple-pay-gateway.apple.com/paymentservices/startSession', 'TAL', 'bigbag.money')
print(session)

# Payment Creation
transaction = stitch_sdk.create(
    Wallet.GOOGLE_PAY, json.dumps({"data": "sample"}), 1, Currency.ZAR, 'PythonSDK', str(uuid.uuid4()))
print(transaction)
```

# License

The stitch-money-api package is open source and available under the MIT license. See the LICENSE file for more information.