Get all payment accounts
curl --request GET \
--url https://api-dev.rain.xyz/v1/payment-accounts \
--header 'Api-Key: <api-key>'import requests
url = "https://api-dev.rain.xyz/v1/payment-accounts"
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/payment-accounts', 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/payment-accounts",
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/payment-accounts"
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/payment-accounts")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/payment-accounts")
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[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "externalFiatAccount",
"nickname": "<string>",
"externalFiatAccount": {
"currency": "usd",
"rail": "ach",
"thirdParty": true,
"beneficiaryFirstName": "<string>",
"beneficiaryLastName": "<string>",
"beneficiaryBusinessName": "<string>",
"beneficiaryType": "individual",
"beneficiaryAddress": {
"addressLine1": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"countryCode": "<string>",
"addressLine2": "<string>"
},
"bankName": "<string>",
"bankAddress": {
"addressLine1": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"countryCode": "<string>",
"addressLine2": "<string>"
},
"accountNumber": "<string>",
"routingNumber": "<string>",
"bankAccountType": "checking"
},
"createdAt": "2023-11-07T05:31:56Z",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid or missing API key"
}{
"statusCode": 403,
"error": "ForbiddenError",
"message": "Forbidden"
}{
"statusCode": 404,
"error": "NotFoundError",
"message": "User or company not found"
}{
"statusCode": 500,
"error": "InternalServerError",
"message": "Internal server error"
}Payment Accounts
Get all payment accounts
Returns the tenantโs payment accounts, newest first, optionally filtered by user or company. Results are paginated: pass the id of the last account you received as cursor to fetch the next page.
GET
/
payment-accounts
Get all payment accounts
curl --request GET \
--url https://api-dev.rain.xyz/v1/payment-accounts \
--header 'Api-Key: <api-key>'import requests
url = "https://api-dev.rain.xyz/v1/payment-accounts"
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/payment-accounts', 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/payment-accounts",
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/payment-accounts"
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/payment-accounts")
.header("Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.rain.xyz/v1/payment-accounts")
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[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "externalFiatAccount",
"nickname": "<string>",
"externalFiatAccount": {
"currency": "usd",
"rail": "ach",
"thirdParty": true,
"beneficiaryFirstName": "<string>",
"beneficiaryLastName": "<string>",
"beneficiaryBusinessName": "<string>",
"beneficiaryType": "individual",
"beneficiaryAddress": {
"addressLine1": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"countryCode": "<string>",
"addressLine2": "<string>"
},
"bankName": "<string>",
"bankAddress": {
"addressLine1": "<string>",
"city": "<string>",
"region": "<string>",
"postalCode": "<string>",
"countryCode": "<string>",
"addressLine2": "<string>"
},
"accountNumber": "<string>",
"routingNumber": "<string>",
"bankAccountType": "checking"
},
"createdAt": "2023-11-07T05:31:56Z",
"userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid or missing API key"
}{
"statusCode": 403,
"error": "ForbiddenError",
"message": "Forbidden"
}{
"statusCode": 404,
"error": "NotFoundError",
"message": "User or company not found"
}{
"statusCode": 500,
"error": "InternalServerError",
"message": "Internal server error"
}Authorizations
Query Parameters
Filter payment accounts by user ID
Filter payment accounts by company ID
The id of the resource after which to start fetching
The number of payment accounts to fetch. Defaults to 100, the maximum.
Required range:
1 <= x <= 100Response
Successful operation
The unique identifier of the payment account
Available options:
externalFiatAccount A friendly name for this payment account
Maximum string length:
64Show child attributes
Show child attributes
When the payment account was created
User ID (present for individual teams; omit for company teams)
Company ID (present for company teams; omit for individual teams)