curl --request GET \
--url https://api.stablepay.ai/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.stablepay.ai/v1/customers/{customerId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stablepay.ai/v1/customers/{customerId}', 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.stablepay.ai/v1/customers/{customerId}",
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.stablepay.ai/v1/customers/{customerId}"
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.stablepay.ai/v1/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.ai/v1/customers/{customerId}")
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{
"id": "cus_01...",
"externalId": "user001",
"type": "individual",
"countryCode": "KE",
"kycStatus": "review",
"kycAttempts": 1,
"riskLevel": null,
"metadata": {},
"verifiedAt": null,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"identity": null,
"reviewWarnings": [
{
"code": "COULD_NOT_PERFORM_AML_SCREENING",
"severity": "error",
"feature": "aml_screenings",
"message": "Could not retrieve data from KYC for performing AML Screening."
}
]
}Get Customer
Retrieve a customer by ID.
curl --request GET \
--url https://api.stablepay.ai/v1/customers/{customerId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.stablepay.ai/v1/customers/{customerId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.stablepay.ai/v1/customers/{customerId}', 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.stablepay.ai/v1/customers/{customerId}",
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.stablepay.ai/v1/customers/{customerId}"
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.stablepay.ai/v1/customers/{customerId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stablepay.ai/v1/customers/{customerId}")
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{
"id": "cus_01...",
"externalId": "user001",
"type": "individual",
"countryCode": "KE",
"kycStatus": "review",
"kycAttempts": 1,
"riskLevel": null,
"metadata": {},
"verifiedAt": null,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"identity": null,
"reviewWarnings": [
{
"code": "COULD_NOT_PERFORM_AML_SCREENING",
"severity": "error",
"feature": "aml_screenings",
"message": "Could not retrieve data from KYC for performing AML Screening."
}
]
}Authorizations
Stablepay API key. Include as Authorization: Bearer <key>.
Path Parameters
The customer's cus_ ID or your own externalId.
Query Parameters
When true, fetches the live status, verified identity and the current verificationUrl for resubmittable statuses.
Response
Customer found.
Prefixed ULID for this customer.
"cus_01KXG3R0X8DXTKB849FFFEPT7Y"
"user001"
individual, business One of none, pending, in_progress, review, approved, declined, soft_declined, expired, abandoned.
"approved"
1
"KE"
Current hosted verification URL. Returned with refresh=true for resubmittable statuses (pending, in_progress, soft_declined); omitted otherwise.
"https://verify.didit.me/session/XXXX"
The verified identity. Returned only with refresh=true.
Reasons why the customer isn't approved. This is surfaced to show your end-user why verification is stuck, declined, or needs action. Omitted when the customer is approved or in_progress. Returned with refresh=true, and also on the customer.kyc.updated webhook.
Show child attributes
Show child attributes
[
{
"code": "COULD_NOT_PERFORM_AML_SCREENING",
"severity": "error",
"feature": "aml_screenings",
"message": "Could not retrieve data from KYC for performing AML Screening."
}
]

