Skip to content

albdrfgr/cryptomus-async

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creating and accepting Cryptomus payments asynchronously

Example

import asyncio
from cryptomus import CryptoMusClient


# create invoice
async def create_invoice_example() -> None:
    client = CryptoMusClient()
    invoice = await client.create_invoice("123123-invoice_id-123123", 100)
    print(invoice['result']['url'])
import asyncio
from cryptomus import CryptoMusClientprint('invoice is not paid')


# get invoice
async def get_invoice_example() -> None:
    client = CryptoMusClient()
    invoice = await client.get_invoice("123123-invoice_id-123123")
    
    if invoice['result']['status'] == 'paid':
        print('invoice is paid')
    else:
        print('invoice is not paid')

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%