Create invoice from Telegram Mini App
curl --request POST \
--url https://api.paylora.org/api/v1/invoice/from_app \
--header 'Content-Type: application/json' \
--data '
{
"customerInitData": "some_init_data_string_from_telegram",
"amount": 100,
"tokenAddress": "0x203fC64C12a51C48755Cf77CB63c2F0618657cFD",
"userUuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"network": "ARB_SEPOLIA",
"hash": "computed_hash_string",
"channelUuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"messageId": "12345"
}
'import requests
url = "https://api.paylora.org/api/v1/invoice/from_app"
payload = {
"customerInitData": "some_init_data_string_from_telegram",
"amount": 100,
"tokenAddress": "0x203fC64C12a51C48755Cf77CB63c2F0618657cFD",
"userUuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"network": "ARB_SEPOLIA",
"hash": "computed_hash_string",
"channelUuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"messageId": "12345"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
customerInitData: 'some_init_data_string_from_telegram',
amount: 100,
tokenAddress: '0x203fC64C12a51C48755Cf77CB63c2F0618657cFD',
userUuid: 'a1b2c3d4-e5f6-7890-1234-567890abcdef',
network: 'ARB_SEPOLIA',
hash: 'computed_hash_string',
channelUuid: 'a1b2c3d4-e5f6-7890-1234-567890abcdef',
messageId: '12345'
})
};
fetch('https://api.paylora.org/api/v1/invoice/from_app', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paylora.org/api/v1/invoice/from_app",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerInitData' => 'some_init_data_string_from_telegram',
'amount' => 100,
'tokenAddress' => '0x203fC64C12a51C48755Cf77CB63c2F0618657cFD',
'userUuid' => 'a1b2c3d4-e5f6-7890-1234-567890abcdef',
'network' => 'ARB_SEPOLIA',
'hash' => 'computed_hash_string',
'channelUuid' => 'a1b2c3d4-e5f6-7890-1234-567890abcdef',
'messageId' => '12345'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paylora.org/api/v1/invoice/from_app"
payload := strings.NewReader("{\n \"customerInitData\": \"some_init_data_string_from_telegram\",\n \"amount\": 100,\n \"tokenAddress\": \"0x203fC64C12a51C48755Cf77CB63c2F0618657cFD\",\n \"userUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"network\": \"ARB_SEPOLIA\",\n \"hash\": \"computed_hash_string\",\n \"channelUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"messageId\": \"12345\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paylora.org/api/v1/invoice/from_app")
.header("Content-Type", "application/json")
.body("{\n \"customerInitData\": \"some_init_data_string_from_telegram\",\n \"amount\": 100,\n \"tokenAddress\": \"0x203fC64C12a51C48755Cf77CB63c2F0618657cFD\",\n \"userUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"network\": \"ARB_SEPOLIA\",\n \"hash\": \"computed_hash_string\",\n \"channelUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"messageId\": \"12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paylora.org/api/v1/invoice/from_app")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerInitData\": \"some_init_data_string_from_telegram\",\n \"amount\": 100,\n \"tokenAddress\": \"0x203fC64C12a51C48755Cf77CB63c2F0618657cFD\",\n \"userUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"network\": \"ARB_SEPOLIA\",\n \"hash\": \"computed_hash_string\",\n \"channelUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"messageId\": \"12345\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"user_uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"status": "created",
"amount": 100,
"fee_amount": 5,
"token_address": "0xAbC123...",
"contract_address": "0xDeF456...",
"network": "ethereum",
"client": "0xDeF456...",
"hash": "0xHash123...",
"signature": "0xHash123...",
"message_id": "12345",
"channel_uuid": "12345",
"customer_id": "123456789",
"chain_id": 11155111,
"url": "app.paylora.org/checkout=token",
"fee_bps": "0xDeF456..."
}
}{
"statusCode": 400,
"message": [
"[value] is not valid"
]
}{
"statusCode": 401,
"message": "Invalid signature | jwt must be provided"
}{
"statusCode": 403,
"message": "Only [admin, customer] has access"
}{
"statusCode": 404,
"message": "Resource Not Found"
}{
"statusCode": 409,
"message": "Resource with unique value (email, name etc) already exist"
}{
"statusCode": 429,
"message": "Too Many Requests"
}{
"statusCode": 500,
"message": "Sever error message"
}Invoice
Create invoice from Telegram Mini App
Create invoice from Telegram Mini App
POST
/
api
/
v1
/
invoice
/
from_app
Create invoice from Telegram Mini App
curl --request POST \
--url https://api.paylora.org/api/v1/invoice/from_app \
--header 'Content-Type: application/json' \
--data '
{
"customerInitData": "some_init_data_string_from_telegram",
"amount": 100,
"tokenAddress": "0x203fC64C12a51C48755Cf77CB63c2F0618657cFD",
"userUuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"network": "ARB_SEPOLIA",
"hash": "computed_hash_string",
"channelUuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"messageId": "12345"
}
'import requests
url = "https://api.paylora.org/api/v1/invoice/from_app"
payload = {
"customerInitData": "some_init_data_string_from_telegram",
"amount": 100,
"tokenAddress": "0x203fC64C12a51C48755Cf77CB63c2F0618657cFD",
"userUuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"network": "ARB_SEPOLIA",
"hash": "computed_hash_string",
"channelUuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"messageId": "12345"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
customerInitData: 'some_init_data_string_from_telegram',
amount: 100,
tokenAddress: '0x203fC64C12a51C48755Cf77CB63c2F0618657cFD',
userUuid: 'a1b2c3d4-e5f6-7890-1234-567890abcdef',
network: 'ARB_SEPOLIA',
hash: 'computed_hash_string',
channelUuid: 'a1b2c3d4-e5f6-7890-1234-567890abcdef',
messageId: '12345'
})
};
fetch('https://api.paylora.org/api/v1/invoice/from_app', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paylora.org/api/v1/invoice/from_app",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customerInitData' => 'some_init_data_string_from_telegram',
'amount' => 100,
'tokenAddress' => '0x203fC64C12a51C48755Cf77CB63c2F0618657cFD',
'userUuid' => 'a1b2c3d4-e5f6-7890-1234-567890abcdef',
'network' => 'ARB_SEPOLIA',
'hash' => 'computed_hash_string',
'channelUuid' => 'a1b2c3d4-e5f6-7890-1234-567890abcdef',
'messageId' => '12345'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paylora.org/api/v1/invoice/from_app"
payload := strings.NewReader("{\n \"customerInitData\": \"some_init_data_string_from_telegram\",\n \"amount\": 100,\n \"tokenAddress\": \"0x203fC64C12a51C48755Cf77CB63c2F0618657cFD\",\n \"userUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"network\": \"ARB_SEPOLIA\",\n \"hash\": \"computed_hash_string\",\n \"channelUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"messageId\": \"12345\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paylora.org/api/v1/invoice/from_app")
.header("Content-Type", "application/json")
.body("{\n \"customerInitData\": \"some_init_data_string_from_telegram\",\n \"amount\": 100,\n \"tokenAddress\": \"0x203fC64C12a51C48755Cf77CB63c2F0618657cFD\",\n \"userUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"network\": \"ARB_SEPOLIA\",\n \"hash\": \"computed_hash_string\",\n \"channelUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"messageId\": \"12345\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paylora.org/api/v1/invoice/from_app")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerInitData\": \"some_init_data_string_from_telegram\",\n \"amount\": 100,\n \"tokenAddress\": \"0x203fC64C12a51C48755Cf77CB63c2F0618657cFD\",\n \"userUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"network\": \"ARB_SEPOLIA\",\n \"hash\": \"computed_hash_string\",\n \"channelUuid\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\",\n \"messageId\": \"12345\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"user_uuid": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"status": "created",
"amount": 100,
"fee_amount": 5,
"token_address": "0xAbC123...",
"contract_address": "0xDeF456...",
"network": "ethereum",
"client": "0xDeF456...",
"hash": "0xHash123...",
"signature": "0xHash123...",
"message_id": "12345",
"channel_uuid": "12345",
"customer_id": "123456789",
"chain_id": 11155111,
"url": "app.paylora.org/checkout=token",
"fee_bps": "0xDeF456..."
}
}{
"statusCode": 400,
"message": [
"[value] is not valid"
]
}{
"statusCode": 401,
"message": "Invalid signature | jwt must be provided"
}{
"statusCode": 403,
"message": "Only [admin, customer] has access"
}{
"statusCode": 404,
"message": "Resource Not Found"
}{
"statusCode": 409,
"message": "Resource with unique value (email, name etc) already exist"
}{
"statusCode": 429,
"message": "Too Many Requests"
}{
"statusCode": 500,
"message": "Sever error message"
}Body
application/json
Telegram Mini App initData for customer verification
Example:
"some_init_data_string_from_telegram"
The amount of the invoice
Example:
100
The token address for the invoice
Example:
"0x203fC64C12a51C48755Cf77CB63c2F0618657cFD"
The UUID of the user
Example:
"a1b2c3d4-e5f6-7890-1234-567890abcdef"
The network of the transaction
Example:
"ARB_SEPOLIA"
Hash of the payment data for integrity verification
Example:
"computed_hash_string"
The UUID of the channel
Example:
"a1b2c3d4-e5f6-7890-1234-567890abcdef"
The message ID associated with the invoice
Example:
"12345"
⌘I

