Atomic Tip Bot
Atomic Tip Bot is a bot which allows you to tip other users on telegram. It is a great example of Bitcart usage.
But also, users are able to withdraw their funds. It is also possible with the SDK, while this feature isn't available in many other payment processors, as Bitcart is not just a payment processor.
You can use
add_requestSDK method to create a new invoice.
invoice = instances[currency].add_request(amount, description, expire=20160)
To process payments, we should register an event handler on our
APIManagerto handle the
new_paymentevent, which is fired when a request was completed.
async def payment_handler(instance, event, address, status, status_str):
# bitcart: get invoice info, not necessary here
if status_str == "Paid":
We can use
manager.start_websocket()to start listening for new events.