Download a user or company's monthly statement
curl --request GET \
--url https://api-dev.rain.xyz/v1/issuing/statements/{year}/{month} \
--header 'Api-Key: <api-key>'import requests
url = "https://api-dev.rain.xyz/v1/issuing/statements/{year}/{month}"
headers = {"Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Key': '<api-key>'}};
fetch('https://api-dev.rain.xyz/v1/issuing/statements/{year}/{month}', 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-dev.rain.xyz/v1/issuing/statements/{year}/{month}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Api-Key: <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-dev.rain.xyz/v1/issuing/statements/{year}/{month}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Api-Key", "<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-dev.rain.xyz/v1/issuing/statements/{year}/{month}")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/issuing/statements/{year}/{month}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body"<string>"Reports
Download a user or company's monthly statement
Downloads a user or companyโs monthly statement as a PDF for the statement period identified by year and month. The year and month identify the month the statement covers. The user or company must belong to the authenticated tenant.
GET
/
issuing
/
statements
/
{year}
/
{month}
Download a user or company's monthly statement
curl --request GET \
--url https://api-dev.rain.xyz/v1/issuing/statements/{year}/{month} \
--header 'Api-Key: <api-key>'import requests
url = "https://api-dev.rain.xyz/v1/issuing/statements/{year}/{month}"
headers = {"Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Api-Key': '<api-key>'}};
fetch('https://api-dev.rain.xyz/v1/issuing/statements/{year}/{month}', 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-dev.rain.xyz/v1/issuing/statements/{year}/{month}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Api-Key: <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-dev.rain.xyz/v1/issuing/statements/{year}/{month}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Api-Key", "<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-dev.rain.xyz/v1/issuing/statements/{year}/{month}")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/issuing/statements/{year}/{month}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body"<string>"This endpoint is currently available for Rain-Managed programs only.
Statement period
Theyear and month path parameters identify the calendar month the statement covers, not the date it was issued. To download the statement for May 2026, set year=2026 and month=5.
Selecting a user or company
Pass either theuserId or the companyId query parameter to identify whose statement you want to download โ not both. The user or company must belong to the authenticated tenant.
Response
A successful request returns the statement as a PDF (Content-Type: application/pdf). The response includes a Content-Disposition: attachment header whose filename identifies the user or company and the statement period (YYYY-MM) you requested.
If no statement exists for the user or company and period you request, the endpoint returns 404 Not Found. Invalid parameters return 400 Bad Request โ for example, a month outside the range 1โ12.Authorizations
Path Parameters
Year the statement covers
Month the statement covers, as a number from 1 (January) to 12 (December)
Required range:
1 <= x <= 12Query Parameters
ID of the user whose statement you want to download. Provide exactly one of userId or companyId. Provide exactly one of userId or companyId.
ID of the company whose statement you want to download. Provide exactly one of userId or companyId. Provide exactly one of userId or companyId.
Response
Successful operation
The user or company's monthly statement PDF