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.4.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.4-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yookassa_api-0.3.4.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.11.0-21-generic

File hashes

Hashes for yookassa_api-0.3.4.tar.gz
Algorithm Hash digest
SHA256 60d5d027d4bfbf2f045d41ed645326aba44264bfd4aa7c62358596fb2b6fa2e3
MD5 1d1f0c641c351afcd4298e39507e4450
BLAKE2b-256 5358819bb7a9b74e1c29ad8df07835d31746b666845b4d6a94dd42904ce4fd44

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yookassa_api-0.3.4-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.11.0-21-generic

File hashes

Hashes for yookassa_api-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 439f5d428135b8f8b2999ed9b481f862111edfb366b47e45225b557646b6388e
MD5 816ab60ed450fc69430f8ab5eeabcad5
BLAKE2b-256 1e9b8081404dcd6a201491e92269ff87020595484676249214f4c76705792ea3

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