List Payment Accounts for a Payment User
curl --request GET \
--url https://api.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.prod.finverse.net/payment_users/{paymentUserId}/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.prod.finverse.net/payment_users/{paymentUserId}/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 => [
"Authorization: Bearer <token>"
],
]);
$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.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"payment_accounts": [
{
"account_id": "01GM2X15D3N87RDSW5RV57MDVR",
"account_number": {
"number": "01GM2X15F9SFBYSJ8Y9CZPYB4T",
"type": "LOCAL"
},
"account_type": "EXTERNAL_ACCOUNT",
"accountholder_name": "01GM2X15E9W1E9XQQ1ZSS34N2V",
"bank_code": "004",
"branch_code": "123",
"created_at": "2022-12-12T10:10:34.095Z",
"currencies": [
"HKD",
"CNY"
],
"institution_id": "testbank",
"metadata": {
"key": "value",
"employer_name": "Apple Inc"
},
"updated_at": "2022-12-12T10:10:34.095Z",
"user_id": "01GM2CQ5D7GSHGPA73X8NGXCHB"
}
]
}{
"error": {
"details": "payment_user_id cannot be found",
"error_code": "RESOURCE_NOT_FOUND",
"message": "Resource cannot be found. Resource does not exist, has been deleted, or is not accessible.",
"request_id": "{unique_id}",
"type": "API_ERROR"
}
}{
"error": {
"details": "<string>",
"error_code": "CREDENTIALS_INVALID",
"message": "<string>",
"request_id": "<string>",
"type": "LINKING_ERROR"
}
}{
"error": {
"details": "<string>",
"error_code": "CREDENTIALS_INVALID",
"message": "<string>",
"request_id": "<string>",
"type": "LINKING_ERROR"
}
}Payment users
List Payment Accounts for a Payment User
Retrieve Payment Accounts for a user (using a specific user_id).
Authorization: customer_token
Response field
payment_accounts (array of objects)
List of payment accounts for the Payment User:
account_number (object)
Bank account number details.
GET
/
payment_users
/
{paymentUserId}
/
payment_accounts
List Payment Accounts for a Payment User
curl --request GET \
--url https://api.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.prod.finverse.net/payment_users/{paymentUserId}/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.prod.finverse.net/payment_users/{paymentUserId}/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 => [
"Authorization: Bearer <token>"
],
]);
$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.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.prod.finverse.net/payment_users/{paymentUserId}/payment_accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"payment_accounts": [
{
"account_id": "01GM2X15D3N87RDSW5RV57MDVR",
"account_number": {
"number": "01GM2X15F9SFBYSJ8Y9CZPYB4T",
"type": "LOCAL"
},
"account_type": "EXTERNAL_ACCOUNT",
"accountholder_name": "01GM2X15E9W1E9XQQ1ZSS34N2V",
"bank_code": "004",
"branch_code": "123",
"created_at": "2022-12-12T10:10:34.095Z",
"currencies": [
"HKD",
"CNY"
],
"institution_id": "testbank",
"metadata": {
"key": "value",
"employer_name": "Apple Inc"
},
"updated_at": "2022-12-12T10:10:34.095Z",
"user_id": "01GM2CQ5D7GSHGPA73X8NGXCHB"
}
]
}{
"error": {
"details": "payment_user_id cannot be found",
"error_code": "RESOURCE_NOT_FOUND",
"message": "Resource cannot be found. Resource does not exist, has been deleted, or is not accessible.",
"request_id": "{unique_id}",
"type": "API_ERROR"
}
}{
"error": {
"details": "<string>",
"error_code": "CREDENTIALS_INVALID",
"message": "<string>",
"request_id": "<string>",
"type": "LINKING_ERROR"
}
}{
"error": {
"details": "<string>",
"error_code": "CREDENTIALS_INVALID",
"message": "<string>",
"request_id": "<string>",
"type": "LINKING_ERROR"
}
}