How to use Tutla Bank


The Tutla Bank is a new currency for Discord where in users can send payment requests and see balances. It’s simplicity provides security as it would be harder to exploit. This article covers all features and API usage. You can view more on this project on the projects page.

How to use it?

First of all you would need the bot on your Discord server, to add it to your server click on the “Add to Server” button below and authorize it on Discord.

Starting up

Once you have setup the bot, you can now start your own bank account. You do not need to do this step if you already have a Tutla Bank Account

Get into a channel the bot has access to, then run "bank.start". This will create your new bank account and you can run the commands further explained in this article.

Checking my balance

Once you have set your bank account, you have access to all the features. Let’s say you receive some money, how will you know how much money you have?

To check you current balance, you can execute bank.balance.

Pay someone

Let’s say you want to receive a payment or pay someone for a service.

In order to pay someone, you can either:

  1. Use bank.pay
  2. Use the API

Here we will be using bank.pay, if you want to use the API read the section below.

To use bank.pay, you need to get the user and run the following command:

bank.pay @user_name 100

@username should be the username of the user you are paying and the parameter following is the amount you are paying.

Then they payer will get a confirmation message in which the payer must enter “yes” in chat in order to complete the payment.

If no “yes” is seen within 30 seconds, it will be cancelled.

Using the API

To send a payment request to the API you will need the following:

  • account_id: User ID of the payer
  • to: User ID of the reciever
  • amount: Amount to pay
  • reason: Reason of payment
  • channel: Channel in where confirmation will be sent
  • guild: Guild in which channel is present

Then you will send a POST request to https://bank.tutla.net/transaction.php containing the data as a json:

data = {

ย  ย  ‘account_id’: ‘1168534099007377449’,

ย  ย  ‘to’: ‘1168534099007377449’,

    ‘amount’: 69,

    ‘reason’: ‘Payment for services’,

ย  ย  ‘guild’:1189449885615927296,

ย  ย  ‘channel’:1189449886752591943

}

Then you will receive a message if you sent the data in the right format

Common Issues

Here’s a list of all the common issues found in sending requests, you can check if your problem is in this list.

No Confirmation message

This could be caused due to several reasons, which is most likely an issue on your side.

  • Incorrect Guild ID
  • Incorrect Channel ID
  • Channel is not in guild
  • Bot cannot send messages in the channel
  • Payer or Receiver not found or has no Bank Account
  • Invalid data types

If yours isn’t on this list, please report the bug @ the Projects Discord.

Error 1: All fields (account_id, to, ย amount, reason, guild, channel) are required.

This error is caused due to sending invalid data to the api, you must send all the data mentioned above on the API Usage.

No money received after payment

This can be caused due to the following reasons:

  • Invalid User ID
  • Invalid Data
  • No Bank Account
  • Paying yourself
  • Paying more than what you have

Again, fix the data you sent to the API

Leave a Reply

Your email address will not be published. Required fields are marked *