Skip to main content
GET
/
v0
/
customers
/
{id}
Get
curl --request GET \
  --url https://api.paygentic.io/v0/customers/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.paygentic.io/v0/customers/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.paygentic.io/v0/customers/{id}', 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.paygentic.io/v0/customers/{id}",
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.paygentic.io/v0/customers/{id}"

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.paygentic.io/v0/customers/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.paygentic.io/v0/customers/{id}")

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_p1q2r3s4t5u6v7w8",
  "object": "customer",
  "consumerId": "org_x9y0z1a2b3c4d5e6",
  "createdAt": "2024-02-05T11:30:00Z",
  "merchantId": "org_f7g8h9i0j1k2l3m4",
  "taxId": null,
  "taxRates": {
    "default": 8.5
  },
  "updatedAt": "2024-02-10T14:20:00Z",
  "validTaxAddress": {
    "message": null,
    "valid": true
  }
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}
{
"message": "The requested resource was not found",
"error": "not_found"
}

Authorizations

Authorization
string
header
required

API key authentication

Path Parameters

id
string
required

The unique identifier of the customer. Unique identifier for a customer

Pattern: ^cus_[a-zA-Z0-9]+$

Response

Customer details retrieved successfully

id
string
required

Unique identifier for a customer

Pattern: ^cus_[a-zA-Z0-9]+$
object
enum<string>
default:customer
required
Available options:
customer
consumerId
string
required

Unique identifier for an organization

Pattern: ^org_[a-zA-Z0-9]+$
createdAt
string<date-time>
required
merchantId
string
required

Unique identifier for an organization

Pattern: ^org_[a-zA-Z0-9]+$
updatedAt
string<date-time>
required
validTaxAddress
object
required

Indicates whether the consumer address is valid for tax calculation when using Paygentic Tax. If valid=false, tax calculation will be skipped and internal invoice flow with default tax rate will be used.

organization
object
taxId
string

Business tax registration identifier. Sample values: 'GB123456789' for UK VAT, 'DE123456789' for German VAT, 'FR12345678901' for French VAT. Enables inter-company tax handling and exemption from standard tax collection.

externalId
string

Merchant-defined identifier for this customer in their own system.

Maximum string length: 255
taxRates
object

An object mapping plan IDs, metric IDs, or 'default' to a tax rate percentage (e.g., 13 for 13%)

notificationSettings
object