Get payments
curl --request GET \
--url https://api.dash.fi/v1/public/payments \
--header 'Authorization: <api-key>'import requests
url = "https://api.dash.fi/v1/public/payments"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.dash.fi/v1/public/payments', 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.dash.fi/v1/public/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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.dash.fi/v1/public/payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.dash.fi/v1/public/payments")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dash.fi/v1/public/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"amount": "123.45",
"dueDate": "2024-10-28",
"id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"status": "Scheduled",
"type": "net-30-repayment",
"descriptor": "Serious Media Group"
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"code": "unauthorized",
"message": "authorization header not provided"
}{
"code": "internal-server-error",
"message": "<string>"
}Get payments
Retrieves a list of payments within a specified date range (max 1 year). Requires ‘from’ and ‘to’ query parameters in YYYY-MM-DD format.
GET
/
payments
Get payments
curl --request GET \
--url https://api.dash.fi/v1/public/payments \
--header 'Authorization: <api-key>'import requests
url = "https://api.dash.fi/v1/public/payments"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.dash.fi/v1/public/payments', 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.dash.fi/v1/public/payments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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.dash.fi/v1/public/payments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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.dash.fi/v1/public/payments")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dash.fi/v1/public/payments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": [
{
"amount": "123.45",
"dueDate": "2024-10-28",
"id": "a1b2c3d4-e5f6-7890-1234-567890abcdef",
"status": "Scheduled",
"type": "net-30-repayment",
"descriptor": "Serious Media Group"
}
]
}{
"code": "<string>",
"message": "<string>"
}{
"code": "unauthorized",
"message": "authorization header not provided"
}{
"code": "internal-server-error",
"message": "<string>"
}Authorizations
Type "Bearer" followed by a space and your API token. Obtain your key from the Dash.fi dashboard. Example: "Bearer YOUR_API_KEY"
Query Parameters
Start date for the query range (inclusive), Format: YYYY-MM-DD
End date for the query range (exclusive), Format: YYYY-MM-DD
Response
A list of payments matching the criteria
Show child attributes
Show child attributes
⌘I