Get a campaign deposit
curl --request GET \
--url https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}import requests
url = "https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}', 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.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"chainId": 8453,
"transactionHash": "0x8d2f6a1c4e7b9053d1a8c6e4f2b0d9a7c5e3f1b8d6a4c2e0f9b7d5a3c1e8f6b4",
"status": "forwarding"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"issues": [
{
"path": "<string>",
"code": "required",
"message": "<string>"
}
]
}{
"code": "UNAUTHENTICATED",
"message": "This API key is not valid."
}{
"code": "NOT_FOUND",
"message": "<string>"
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Wait for the time in the Retry-After header."
}Deposit addresses
Get a campaign deposit
Whether a deposit sent in the given transaction has been seen for this campaign, and how far it has progressed. not-detected does not prove the transfer failed: keep the transaction and ask again. This keeps answering after a campaign ends or is hidden, so a donor can always follow funds already sent. Public: no API key is needed. Send one to use your organization’s rate limit.
GET
/
v2
/
campaigns
/
{campaignId}
/
deposits
/
{chainId}
/
{transactionHash}
Get a campaign deposit
curl --request GET \
--url https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}import requests
url = "https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}', 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.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.donate.gg/api/v2/campaigns/{campaignId}/deposits/{chainId}/{transactionHash}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"chainId": 8453,
"transactionHash": "0x8d2f6a1c4e7b9053d1a8c6e4f2b0d9a7c5e3f1b8d6a4c2e0f9b7d5a3c1e8f6b4",
"status": "forwarding"
}{
"code": "VALIDATION_ERROR",
"message": "<string>",
"issues": [
{
"path": "<string>",
"code": "required",
"message": "<string>"
}
]
}{
"code": "UNAUTHENTICATED",
"message": "This API key is not valid."
}{
"code": "NOT_FOUND",
"message": "<string>"
}{
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests. Wait for the time in the Retry-After header."
}Headers
Path Parameters
Was this page helpful?