Create new outgoing transaction
curl --request POST \
--url https://api.custody.api-zodia.io/v2/api/core/transactions \
--header 'Content-Type: application/json' \
--data '
{
"walletId": "ZTEST-NOBENF-849P8XKKAO",
"transactionId": "TRI-ZTEST-63Q4DZ0KJP",
"amount": "100",
"subtractFee": true,
"recipientId": "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
"submitterId": "api-maker@zodia.io",
"currency": "eth",
"description": "First transaction"
}
'import requests
url = "https://api.custody.api-zodia.io/v2/api/core/transactions"
payload = {
"walletId": "ZTEST-NOBENF-849P8XKKAO",
"transactionId": "TRI-ZTEST-63Q4DZ0KJP",
"amount": "100",
"subtractFee": True,
"recipientId": "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
"submitterId": "api-maker@zodia.io",
"currency": "eth",
"description": "First transaction"
}
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({
walletId: 'ZTEST-NOBENF-849P8XKKAO',
transactionId: 'TRI-ZTEST-63Q4DZ0KJP',
amount: '100',
subtractFee: true,
recipientId: 'tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt',
submitterId: 'api-maker@zodia.io',
currency: 'eth',
description: 'First transaction'
})
};
fetch('https://api.custody.api-zodia.io/v2/api/core/transactions', 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.custody.api-zodia.io/v2/api/core/transactions",
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([
'walletId' => 'ZTEST-NOBENF-849P8XKKAO',
'transactionId' => 'TRI-ZTEST-63Q4DZ0KJP',
'amount' => '100',
'subtractFee' => true,
'recipientId' => 'tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt',
'submitterId' => 'api-maker@zodia.io',
'currency' => 'eth',
'description' => 'First transaction'
]),
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.custody.api-zodia.io/v2/api/core/transactions"
payload := strings.NewReader("{\n \"walletId\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"transactionId\": \"TRI-ZTEST-63Q4DZ0KJP\",\n \"amount\": \"100\",\n \"subtractFee\": true,\n \"recipientId\": \"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt\",\n \"submitterId\": \"api-maker@zodia.io\",\n \"currency\": \"eth\",\n \"description\": \"First transaction\"\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.custody.api-zodia.io/v2/api/core/transactions")
.header("Content-Type", "application/json")
.body("{\n \"walletId\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"transactionId\": \"TRI-ZTEST-63Q4DZ0KJP\",\n \"amount\": \"100\",\n \"subtractFee\": true,\n \"recipientId\": \"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt\",\n \"submitterId\": \"api-maker@zodia.io\",\n \"currency\": \"eth\",\n \"description\": \"First transaction\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.custody.api-zodia.io/v2/api/core/transactions")
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 \"walletId\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"transactionId\": \"TRI-ZTEST-63Q4DZ0KJP\",\n \"amount\": \"100\",\n \"subtractFee\": true,\n \"recipientId\": \"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt\",\n \"submitterId\": \"api-maker@zodia.io\",\n \"currency\": \"eth\",\n \"description\": \"First transaction\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}API - TRANSACTIONS - V2
Create new outgoing transaction
POST
/
v2
/
api
/
core
/
transactions
Create new outgoing transaction
curl --request POST \
--url https://api.custody.api-zodia.io/v2/api/core/transactions \
--header 'Content-Type: application/json' \
--data '
{
"walletId": "ZTEST-NOBENF-849P8XKKAO",
"transactionId": "TRI-ZTEST-63Q4DZ0KJP",
"amount": "100",
"subtractFee": true,
"recipientId": "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
"submitterId": "api-maker@zodia.io",
"currency": "eth",
"description": "First transaction"
}
'import requests
url = "https://api.custody.api-zodia.io/v2/api/core/transactions"
payload = {
"walletId": "ZTEST-NOBENF-849P8XKKAO",
"transactionId": "TRI-ZTEST-63Q4DZ0KJP",
"amount": "100",
"subtractFee": True,
"recipientId": "tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt",
"submitterId": "api-maker@zodia.io",
"currency": "eth",
"description": "First transaction"
}
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({
walletId: 'ZTEST-NOBENF-849P8XKKAO',
transactionId: 'TRI-ZTEST-63Q4DZ0KJP',
amount: '100',
subtractFee: true,
recipientId: 'tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt',
submitterId: 'api-maker@zodia.io',
currency: 'eth',
description: 'First transaction'
})
};
fetch('https://api.custody.api-zodia.io/v2/api/core/transactions', 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.custody.api-zodia.io/v2/api/core/transactions",
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([
'walletId' => 'ZTEST-NOBENF-849P8XKKAO',
'transactionId' => 'TRI-ZTEST-63Q4DZ0KJP',
'amount' => '100',
'subtractFee' => true,
'recipientId' => 'tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt',
'submitterId' => 'api-maker@zodia.io',
'currency' => 'eth',
'description' => 'First transaction'
]),
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.custody.api-zodia.io/v2/api/core/transactions"
payload := strings.NewReader("{\n \"walletId\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"transactionId\": \"TRI-ZTEST-63Q4DZ0KJP\",\n \"amount\": \"100\",\n \"subtractFee\": true,\n \"recipientId\": \"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt\",\n \"submitterId\": \"api-maker@zodia.io\",\n \"currency\": \"eth\",\n \"description\": \"First transaction\"\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.custody.api-zodia.io/v2/api/core/transactions")
.header("Content-Type", "application/json")
.body("{\n \"walletId\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"transactionId\": \"TRI-ZTEST-63Q4DZ0KJP\",\n \"amount\": \"100\",\n \"subtractFee\": true,\n \"recipientId\": \"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt\",\n \"submitterId\": \"api-maker@zodia.io\",\n \"currency\": \"eth\",\n \"description\": \"First transaction\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.custody.api-zodia.io/v2/api/core/transactions")
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 \"walletId\": \"ZTEST-NOBENF-849P8XKKAO\",\n \"transactionId\": \"TRI-ZTEST-63Q4DZ0KJP\",\n \"amount\": \"100\",\n \"subtractFee\": true,\n \"recipientId\": \"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt\",\n \"submitterId\": \"api-maker@zodia.io\",\n \"currency\": \"eth\",\n \"description\": \"First transaction\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}{
"timestamp": "2021-10-27T14:30:13.912Z",
"title": "Method Not Allowed",
"status": 415,
"details": [
{
"message": "Available methods : GET,POST",
"code": "ER-204"
}
]
}Body
application/json
id of the wallet you want to use
Required string length:
1 - 40Example:
"ZTEST-NOBENF-849P8XKKAO"
id of transaction which will be created
Required string length:
1 - 40Example:
"TRI-ZTEST-63Q4DZ0KJP"
amount to send in Unit
Example:
"100"
subtract fee
Example:
true
to address
Example:
"tb1ql7w62elx9ucw4pj5lgw4l028hmuw80sndtntxt"
email of submitter
Example:
"api-maker@zodia.io"
currency of the transfer
Example:
"eth"
a quick description of the transaction
Example:
"First transaction"
Response
OK
Id of the entity
Get outgoing transactions by wallet ID
Previous
Get the payload to create new outgoing transaction
Next
⌘I