Create an integrator
curl --request POST \
--url https://preview.kotanipay.com/api/v3/integrator \
--header 'Content-Type: application/json' \
--data '
{
"organization": "A&B Company",
"product_name": "MY APP NAME",
"first_name": "John",
"last_name": "Doe",
"email": "ab@gmail.com",
"phone": "+xxx xxx xxx xxx",
"country_code": "US or USA",
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_secret": "whsec_xxx",
"webhook_events": [
"transaction.deposit.status.updated",
"payment.confirmed"
]
}
'import requests
url = "https://preview.kotanipay.com/api/v3/integrator"
payload = {
"organization": "A&B Company",
"product_name": "MY APP NAME",
"first_name": "John",
"last_name": "Doe",
"email": "ab@gmail.com",
"phone": "+xxx xxx xxx xxx",
"country_code": "US or USA",
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_secret": "whsec_xxx",
"webhook_events": ["transaction.deposit.status.updated", "payment.confirmed"]
}
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({
organization: 'A&B Company',
product_name: 'MY APP NAME',
first_name: 'John',
last_name: 'Doe',
email: 'ab@gmail.com',
phone: '+xxx xxx xxx xxx',
country_code: 'US or USA',
webhook_url: 'https://example.com/kotani/webhooks',
webhook_secret: 'whsec_xxx',
webhook_events: ['transaction.deposit.status.updated', 'payment.confirmed']
})
};
fetch('https://preview.kotanipay.com/api/v3/integrator', 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://preview.kotanipay.com/api/v3/integrator",
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([
'organization' => 'A&B Company',
'product_name' => 'MY APP NAME',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'ab@gmail.com',
'phone' => '+xxx xxx xxx xxx',
'country_code' => 'US or USA',
'webhook_url' => 'https://example.com/kotani/webhooks',
'webhook_secret' => 'whsec_xxx',
'webhook_events' => [
'transaction.deposit.status.updated',
'payment.confirmed'
]
]),
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://preview.kotanipay.com/api/v3/integrator"
payload := strings.NewReader("{\n \"organization\": \"A&B Company\",\n \"product_name\": \"MY APP NAME\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"ab@gmail.com\",\n \"phone\": \"+xxx xxx xxx xxx\",\n \"country_code\": \"US or USA\",\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_xxx\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\",\n \"payment.confirmed\"\n ]\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://preview.kotanipay.com/api/v3/integrator")
.header("Content-Type", "application/json")
.body("{\n \"organization\": \"A&B Company\",\n \"product_name\": \"MY APP NAME\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"ab@gmail.com\",\n \"phone\": \"+xxx xxx xxx xxx\",\n \"country_code\": \"US or USA\",\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_xxx\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\",\n \"payment.confirmed\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.kotanipay.com/api/v3/integrator")
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 \"organization\": \"A&B Company\",\n \"product_name\": \"MY APP NAME\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"ab@gmail.com\",\n \"phone\": \"+xxx xxx xxx xxx\",\n \"country_code\": \"US or USA\",\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_xxx\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\",\n \"payment.confirmed\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "The record has been successfully created.",
"data": {
"organization": "A&B Company",
"first_name": "John",
"last_name": "Doe",
"email": "ab@gmail.com",
"phone": "+xxx xxx xxx xxx",
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_events": [
"transaction.deposit.status.updated",
"payment.confirmed"
]
}
}{
"success": false,
"message": "Bad Request",
"data": {}
}{
"success": false,
"message": "Unauthorized",
"data": {}
}Authentication & Setup
Create Integrator Account
This endpoint will help you create an integrator
POST
/
api
/
v3
/
integrator
Create an integrator
curl --request POST \
--url https://preview.kotanipay.com/api/v3/integrator \
--header 'Content-Type: application/json' \
--data '
{
"organization": "A&B Company",
"product_name": "MY APP NAME",
"first_name": "John",
"last_name": "Doe",
"email": "ab@gmail.com",
"phone": "+xxx xxx xxx xxx",
"country_code": "US or USA",
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_secret": "whsec_xxx",
"webhook_events": [
"transaction.deposit.status.updated",
"payment.confirmed"
]
}
'import requests
url = "https://preview.kotanipay.com/api/v3/integrator"
payload = {
"organization": "A&B Company",
"product_name": "MY APP NAME",
"first_name": "John",
"last_name": "Doe",
"email": "ab@gmail.com",
"phone": "+xxx xxx xxx xxx",
"country_code": "US or USA",
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_secret": "whsec_xxx",
"webhook_events": ["transaction.deposit.status.updated", "payment.confirmed"]
}
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({
organization: 'A&B Company',
product_name: 'MY APP NAME',
first_name: 'John',
last_name: 'Doe',
email: 'ab@gmail.com',
phone: '+xxx xxx xxx xxx',
country_code: 'US or USA',
webhook_url: 'https://example.com/kotani/webhooks',
webhook_secret: 'whsec_xxx',
webhook_events: ['transaction.deposit.status.updated', 'payment.confirmed']
})
};
fetch('https://preview.kotanipay.com/api/v3/integrator', 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://preview.kotanipay.com/api/v3/integrator",
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([
'organization' => 'A&B Company',
'product_name' => 'MY APP NAME',
'first_name' => 'John',
'last_name' => 'Doe',
'email' => 'ab@gmail.com',
'phone' => '+xxx xxx xxx xxx',
'country_code' => 'US or USA',
'webhook_url' => 'https://example.com/kotani/webhooks',
'webhook_secret' => 'whsec_xxx',
'webhook_events' => [
'transaction.deposit.status.updated',
'payment.confirmed'
]
]),
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://preview.kotanipay.com/api/v3/integrator"
payload := strings.NewReader("{\n \"organization\": \"A&B Company\",\n \"product_name\": \"MY APP NAME\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"ab@gmail.com\",\n \"phone\": \"+xxx xxx xxx xxx\",\n \"country_code\": \"US or USA\",\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_xxx\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\",\n \"payment.confirmed\"\n ]\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://preview.kotanipay.com/api/v3/integrator")
.header("Content-Type", "application/json")
.body("{\n \"organization\": \"A&B Company\",\n \"product_name\": \"MY APP NAME\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"ab@gmail.com\",\n \"phone\": \"+xxx xxx xxx xxx\",\n \"country_code\": \"US or USA\",\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_xxx\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\",\n \"payment.confirmed\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://preview.kotanipay.com/api/v3/integrator")
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 \"organization\": \"A&B Company\",\n \"product_name\": \"MY APP NAME\",\n \"first_name\": \"John\",\n \"last_name\": \"Doe\",\n \"email\": \"ab@gmail.com\",\n \"phone\": \"+xxx xxx xxx xxx\",\n \"country_code\": \"US or USA\",\n \"webhook_url\": \"https://example.com/kotani/webhooks\",\n \"webhook_secret\": \"whsec_xxx\",\n \"webhook_events\": [\n \"transaction.deposit.status.updated\",\n \"payment.confirmed\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "The record has been successfully created.",
"data": {
"organization": "A&B Company",
"first_name": "John",
"last_name": "Doe",
"email": "ab@gmail.com",
"phone": "+xxx xxx xxx xxx",
"id": "xxxxxxxxxxxxxxxxxxxxxxxx",
"webhook_url": "https://example.com/kotani/webhooks",
"webhook_events": [
"transaction.deposit.status.updated",
"payment.confirmed"
]
}
}{
"success": false,
"message": "Bad Request",
"data": {}
}{
"success": false,
"message": "Unauthorized",
"data": {}
}Create a new integrator account to start using the Kotani Pay API platform.email
Body
application/json
organization
Example:
"A&B Company"
product name
Example:
"MY APP NAME"
first_name
Example:
"John"
last_name
Example:
"Doe"
Example:
"ab@gmail.com"
phone
Example:
"+xxx xxx xxx xxx"
Country code (accepts ISO-2 or ISO-3, auto-converts to ISO-2)
Example:
"US or USA"
Default webhook callback URL
Example:
"https://example.com/kotani/webhooks"
Shared secret used to sign webhook payloads
Example:
"whsec_xxx"
Webhook events this integrator is subscribed to
Available options:
transaction.status.updated, transaction.deposit.status.updated, transaction.withdrawal.status.updated, transaction.onramp.status.updated, transaction.offramp.status.updated, payment.confirmed, kyc.status.changed, refund.lightning.invoice_needed, system.event Example:
[
"transaction.deposit.status.updated",
"payment.confirmed"
]