List accounts
curl --request GET \
--url https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts \
--header 'Accept: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'X-PARTNER-ID: <api-key>'import requests
url = "https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts"
headers = {
"Authorization": "Bearer <token>",
"X-PARTNER-ID": "<api-key>",
"Accept": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
'X-PARTNER-ID': '<api-key>',
Accept: '<api-key>'
}
};
fetch('https://sandbox-payment-b2b.singapay.id/api/v1.0/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://sandbox-payment-b2b.singapay.id/api/v1.0/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 => [
"Accept: <api-key>",
"Authorization: Bearer <token>",
"X-PARTNER-ID: <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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-PARTNER-ID", "<api-key>")
req.Header.Add("Accept", "<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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts")
.header("Authorization", "Bearer <token>")
.header("X-PARTNER-ID", "<api-key>")
.header("Accept", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-PARTNER-ID"] = '<api-key>'
request["Accept"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": [
{
"id": "01K946KF851RK7FX075GJHBVKF",
"name": "John Doe",
"status": "active",
"account_number": "000000000123",
"account_type": "owned",
"kyb_status": "kyb_in_review",
"legal_name": "PT Asia Kreatif Studio",
"business_type": "company",
"brand_name": "Asia Kreatif",
"kyb_onboarding_url": "https://sandbox-payment-b2b.singapay.id/kyb/0b0e5ad5957a7c2de066c2cde97e91089b605aae9afeba3398ff871cd1e99d54",
"invite_members": [
"john@example.com"
]
}
],
"pagination": {}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"status": 405,
"success": false,
"error": {
"code": 4059901,
"message": "The PATCH method is not supported for this route. Supported methods: GET, HEAD, POST."
}
}Accounts
List accounts
This feature is designed to provide detailed information regarding the list of virtual accounts. It allows users to retrieve and view comprehensive data on all virtual accounts associated with their main account. Each managed sub account row carries its own kyb_onboarding_url so its current active KYB self-onboarding link can be read directly from the list without a separate call per account.
GET
/
api
/
v1.0
/
accounts
List accounts
curl --request GET \
--url https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts \
--header 'Accept: <api-key>' \
--header 'Authorization: Bearer <token>' \
--header 'X-PARTNER-ID: <api-key>'import requests
url = "https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts"
headers = {
"Authorization": "Bearer <token>",
"X-PARTNER-ID": "<api-key>",
"Accept": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
'X-PARTNER-ID': '<api-key>',
Accept: '<api-key>'
}
};
fetch('https://sandbox-payment-b2b.singapay.id/api/v1.0/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://sandbox-payment-b2b.singapay.id/api/v1.0/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 => [
"Accept: <api-key>",
"Authorization: Bearer <token>",
"X-PARTNER-ID: <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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-PARTNER-ID", "<api-key>")
req.Header.Add("Accept", "<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://sandbox-payment-b2b.singapay.id/api/v1.0/accounts")
.header("Authorization", "Bearer <token>")
.header("X-PARTNER-ID", "<api-key>")
.header("Accept", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-payment-b2b.singapay.id/api/v1.0/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-PARTNER-ID"] = '<api-key>'
request["Accept"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"data": [
{
"id": "01K946KF851RK7FX075GJHBVKF",
"name": "John Doe",
"status": "active",
"account_number": "000000000123",
"account_type": "owned",
"kyb_status": "kyb_in_review",
"legal_name": "PT Asia Kreatif Studio",
"business_type": "company",
"brand_name": "Asia Kreatif",
"kyb_onboarding_url": "https://sandbox-payment-b2b.singapay.id/kyb/0b0e5ad5957a7c2de066c2cde97e91089b605aae9afeba3398ff871cd1e99d54",
"invite_members": [
"john@example.com"
]
}
],
"pagination": {}
}{
"status": 401,
"success": false,
"error": {
"code": 401,
"message": "Unauthorized merchant, please sign in"
}
}{
"status": 405,
"success": false,
"error": {
"code": 4059901,
"message": "The PATCH method is not supported for this route. Supported methods: GET, HEAD, POST."
}
}Authorizations
JWT issued by POST /api/v1.1/access-token/b2b. Send Authorization: Bearer <token>.
Merchant API key (Credential.api_key). Required on every request.
Response format. Send application/json on every merchant API request.
⌘I
