Customers
Find a customer
Find a customer by id
GET
/
customers
/
{id}
Find a customer
curl --request GET \
--url https://sandbox-api.paynext.com/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-API-Version: <x-api-version>'const options = {
method: 'GET',
headers: {'X-API-Version': '<x-api-version>', Authorization: 'Bearer <token>'}
};
fetch('https://sandbox-api.paynext.com/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.paynext.com/customers/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Version", "<x-api-version>")
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://sandbox-api.paynext.com/customers/{id}")
.header("X-API-Version", "<x-api-version>")
.header("Authorization", "Bearer <token>")
.asString();import requests
url = "https://sandbox-api.paynext.com/customers/{id}"
headers = {
"X-API-Version": "<x-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.paynext.com/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>",
"X-API-Version: <x-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"address": {
"city": "San Francisco",
"country": "AD",
"line1": "123 Market Street",
"line2": "Suite 400",
"postal_code": "94105",
"state": "CA"
},
"created_at": "2025-05-28T14:00:00Z",
"email": "alice.johnson@example.com",
"external_id": "ext_001",
"full_name": "Alice Johnson",
"id": "cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f",
"metadata": {
"key": "value"
},
"payment_methods": [
{
"details": {
"bin": "411111",
"bin_data": {
"brand": "visa",
"country": "AD",
"currency_code": "<string>",
"description": "Chase Sapphire Preferred",
"funding": "debit",
"issuer": "Chase Bank",
"type": "consumer"
},
"exp_month": 12,
"exp_year": 2028,
"is_network_tokenized": true,
"last4": "1111",
"network_token": {
"bin": "48953700",
"last4": "0370",
"exp_month": 5,
"exp_year": 31,
"status": "active",
"last_synced_at": "2025-05-26T10:15:00Z"
},
"number": "4111111111111111"
},
"type": "CARD",
"billing_address": {
"city": "San Francisco",
"country": "AD",
"line1": "123 Market Street",
"line2": "Suite 400",
"postal_code": "94105",
"state": "CA"
},
"card_updater": true,
"fpan_out_of_sync": false,
"status": "active"
}
],
"phone": "+1-555-123-4567",
"subscriptions": [
{
"created_at": "2025-05-26T10:00:00Z",
"current_period_end": "<string>",
"cancelled_at": "2026-06-10T14:32:08Z",
"cancellation_details": {
"reason": "fraud_prevention",
"trigger_payment_id": "pay_e8a1b2c3-1d2e-3f4a-5b6c-7d8e9f0a1b2c"
},
"current_period_start": "<string>",
"id": "sub_123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"key": "value"
},
"next_billing_date": "2025-06-26T12:00:00Z",
"past_due": {
"attempt_count": 2,
"max_attempts_count": 7
},
"plan": {
"id": "price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"interval": "days",
"interval_count": 1,
"name": "Pro Plan",
"price": {
"amount": 1999,
"currency": "AED"
},
"tax": {
"collect_tax": "<unknown>"
},
"trial_interval": "days",
"trial_interval_count": 14,
"trial_price": {
"amount": 1999,
"currency": "AED"
},
"type": "recurring"
},
"status": "trial",
"updated_at": "2025-05-27T10:00:00Z"
}
],
"updated_at": "2025-05-28T14:05:00Z"
}{
"error": {
"message": "some error message"
}
}{
"error": {
"message": "some error message"
}
}{
"error": {
"message": "some error message"
}
}{
"error": {
"message": "some error message"
}
}Authorizations
Authentication header of the form api key, where api key is your organization api key.
Headers
Specifies the version of the API to use
Available options:
1.0.0 Path Parameters
The ID of the customer to find
Response
OK
Address associated with customer
Show child attributes
Show child attributes
The date and time the customer was created in UTC format
Example:
"2025-05-28T14:00:00Z"
Email of the customer
Example:
"alice.johnson@example.com"
External ID of the customer
Example:
"ext_001"
Full name of the customer
Example:
"Alice Johnson"
Unique identifier
Example:
"cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f"
Additional metadata as a JSON object
Show child attributes
Show child attributes
Example:
{ "key": "value" }
payment_methods
(Card API Schema · object | PayPal API Schema · object | Venmo API Schema · object | CashApp API Schema · object | Apple Pay API Schema · object | Google Pay API Schema · object)[]
- Card API Schema
- PayPal API Schema
- Venmo API Schema
- CashApp API Schema
- Apple Pay API Schema
- Google Pay API Schema
Show child attributes
Show child attributes
Customer's phone number
Example:
"+1-555-123-4567"
Show child attributes
Show child attributes
The date and time the customer was last updated in UTC format
Example:
"2025-05-28T14:05:00Z"
Was this page helpful?
⌘I
Find a customer
curl --request GET \
--url https://sandbox-api.paynext.com/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-API-Version: <x-api-version>'const options = {
method: 'GET',
headers: {'X-API-Version': '<x-api-version>', Authorization: 'Bearer <token>'}
};
fetch('https://sandbox-api.paynext.com/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox-api.paynext.com/customers/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Version", "<x-api-version>")
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://sandbox-api.paynext.com/customers/{id}")
.header("X-API-Version", "<x-api-version>")
.header("Authorization", "Bearer <token>")
.asString();import requests
url = "https://sandbox-api.paynext.com/customers/{id}"
headers = {
"X-API-Version": "<x-api-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.paynext.com/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>",
"X-API-Version: <x-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"address": {
"city": "San Francisco",
"country": "AD",
"line1": "123 Market Street",
"line2": "Suite 400",
"postal_code": "94105",
"state": "CA"
},
"created_at": "2025-05-28T14:00:00Z",
"email": "alice.johnson@example.com",
"external_id": "ext_001",
"full_name": "Alice Johnson",
"id": "cus_b8d0fe7e-3a7f-4b5f-a68b-d31358b49c3f",
"metadata": {
"key": "value"
},
"payment_methods": [
{
"details": {
"bin": "411111",
"bin_data": {
"brand": "visa",
"country": "AD",
"currency_code": "<string>",
"description": "Chase Sapphire Preferred",
"funding": "debit",
"issuer": "Chase Bank",
"type": "consumer"
},
"exp_month": 12,
"exp_year": 2028,
"is_network_tokenized": true,
"last4": "1111",
"network_token": {
"bin": "48953700",
"last4": "0370",
"exp_month": 5,
"exp_year": 31,
"status": "active",
"last_synced_at": "2025-05-26T10:15:00Z"
},
"number": "4111111111111111"
},
"type": "CARD",
"billing_address": {
"city": "San Francisco",
"country": "AD",
"line1": "123 Market Street",
"line2": "Suite 400",
"postal_code": "94105",
"state": "CA"
},
"card_updater": true,
"fpan_out_of_sync": false,
"status": "active"
}
],
"phone": "+1-555-123-4567",
"subscriptions": [
{
"created_at": "2025-05-26T10:00:00Z",
"current_period_end": "<string>",
"cancelled_at": "2026-06-10T14:32:08Z",
"cancellation_details": {
"reason": "fraud_prevention",
"trigger_payment_id": "pay_e8a1b2c3-1d2e-3f4a-5b6c-7d8e9f0a1b2c"
},
"current_period_start": "<string>",
"id": "sub_123e4567-e89b-12d3-a456-426614174000",
"metadata": {
"key": "value"
},
"next_billing_date": "2025-06-26T12:00:00Z",
"past_due": {
"attempt_count": 2,
"max_attempts_count": 7
},
"plan": {
"id": "price_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"interval": "days",
"interval_count": 1,
"name": "Pro Plan",
"price": {
"amount": 1999,
"currency": "AED"
},
"tax": {
"collect_tax": "<unknown>"
},
"trial_interval": "days",
"trial_interval_count": 14,
"trial_price": {
"amount": 1999,
"currency": "AED"
},
"type": "recurring"
},
"status": "trial",
"updated_at": "2025-05-27T10:00:00Z"
}
],
"updated_at": "2025-05-28T14:05:00Z"
}{
"error": {
"message": "some error message"
}
}{
"error": {
"message": "some error message"
}
}{
"error": {
"message": "some error message"
}
}{
"error": {
"message": "some error message"
}
}