Official TelePay client library for the Python language, so you can easily process cryptocurrency payments using the REST API.
Coming soon (Installation with Maven or Graddle): For now copy the .jar file and import it to your project
The SDK has 2 dependencies of the libraries:
- java.net.http
- org.json
Initialize the TelePay client using your secret API key, located in your merchant dashboard.
TelePayClient client = new TelePayClient(YOUR_SECRET_KEY);
Get your current merchant Read docs
JSONObject me = client.getMe();
System.out.println(me);
Get your balance Read docs
JSONObject balance = client.getBalance();
System.out.println(balance);
Get the assets Get assets supported by TelePay. Read docs
JSONObject assets = client.getAssets();
System.out.println(assets);
Get invoices Get the merchant's invoices. Read docs
JSONObject invoices = client.getInvoices();
System.out.println(invoices);
Get invoice You can also get a single invoice in particular by invoice number Read docs
String invoiceNumber = "75";
JSONObject invoice = client.getInvoice();
System.out.println(invoice);
Get webhooks Get the merchant's webhooks. Read docs
JSONObject webhooks = client.getWebhooks();
System.out.println(webhook);
Get webhook You can also get a single webhook in particular and its details passing the Webhook ID Read docs
String webhookId = "T45A7810";
JSONObject invoice = client.getWebhook(webhookId);
System.out.println(invoice);
Get balance Get the balance of an specific asset of the merchant Read docs
String asset = "TON";
String blockchain = "TON";
String network = "mainnet";
JSONObject balance = client.getBalance(asset, blockchain, network);
System.out.println(balance);
Create Invoice Create an new invoice with an specified amount Read docs
String asset = "TON";
String blockchain = "TON";
String network = "mainnet";
double amount = 10;
JSONObject invoice = client.createInvoice(asset, blockchain, network, amount);
System.out.println(invoice);
Delete Invoice Delete an invoice Read docs
String invoiceNumber
JSONObject delete = client.deleteInvoice(invoiceNumber);
System.out.println(delete);
Cancel Invoice Cancel an invoice Read docs
String invoiceNumber
JSONObject cancel = client.cancelInvoice(invoiceNumber);
System.out.println(delete);
Transfer Transfer funds between wallets Read docs
String asset = "TON";
String blockchain = "TON";
String network = "mainnet";
double amount = 10;
String username = "jrgf"
JSONObject transfer = client.transfer(asset, blockchain, network, amount, transfer);
System.out.println(transfer);
We use JUnit to test the API endpoints before publishing new versions of this library. To run the tests, you must define the TELEPAY_SECRET_API_KEY
environment variable in your IDE before running the LibraryTest
class.
José Rafael García 💻 |
Carlos Lugones 🧑🏫 |
This project follows the all-contributors specification. Contributions of any kind welcome!