Skip to main content

Python Library for YooKassa API

Project description

YooKassa API Library

YooKassaAPI YooKassaAPI YooKassaAPI

Table of Contents

📌 Description

A Python library for interacting with the YooKassa API. This library allows you to create, get, and cancel payments, as well as handle refunds.

Also there is both a synchronous and asynchronous variation

🔨 Features

  • Easy-to-use interface for YooKassa API.
  • Supports payment creation, capture, and cancellation.
  • Supports refund creation, receiving

🗃️ Installation

To install the library, use pip:

pip install yookassa_api

Or you can install it by Poetry:

poetry add yookassa_api

💻 Getting Started

Here is a simple example to demonstrate how to use the library:

from yookassa_api import (
    YooKassa, PaymentAmount,
    Confirmation
)
from yookassa_api.types import CurrencyType 


# Initialize the YooKassa client
client = YooKassa(
    'SECRET_KEY',
    shop_id=999999
)

# Create a payment
payment = client.create_payment(
    PaymentAmount(value=100, currency=CurrencyType.RUB),
    description='Test payment',
    confirmation=Confirmation(                                      
        type=ConfirmationType.REDIRECT,
        return_url="https://t.me/BotFather",                  
    )
)
print(payment)

📄 Licence

This project is licensed under the MIT License - see the LICENSE file for details.

👤 Author of YooKassa API Library

© Lemson

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

yookassa_api-0.3.3.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yookassa_api-0.3.3-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file yookassa_api-0.3.3.tar.gz.

File metadata

  • Download URL: yookassa_api-0.3.3.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-52-generic

File hashes

Hashes for yookassa_api-0.3.3.tar.gz
Algorithm Hash digest
SHA256 7b895af3945519468a457a8b143ce7f417ff70349d9664134649c353071379df
MD5 3bca5e4ae9bf07738d14d9437a15c79b
BLAKE2b-256 cd25eeaf1686de84f3e69553b5ac6c356a9ed46bbb25b67fea080a9593ab51a0

See more details on using hashes here.

File details

Details for the file yookassa_api-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: yookassa_api-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-52-generic

File hashes

Hashes for yookassa_api-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 48cea27b89375871a23dc1ea4ada40c5c0cac26d243c8f0dc51eeeb4712081df
MD5 3152a268dee0bbfaa396c3484af686c4
BLAKE2b-256 ddaa3442ed856306017db0471704ce36c77ae194195e58674d97f554a1b9c63a

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