Obter cliente
curl --request GET \
--url https://api-payment.safefypay.com.br/v1/customers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-payment.safefypay.com.br/v1/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-payment.safefypay.com.br/v1/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://api-payment.safefypay.com.br/v1/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-payment.safefypay.com.br/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"externalId": "cliente_123",
"name": "Joao Silva",
"email": "joao@email.com",
"document": "123.456.789-00",
"documentType": "CPF",
"phone": "5511999998888",
"status": "Active",
"metadata": null,
"address": {
"street": "Rua das Flores",
"number": "123",
"complement": "Apto 45",
"neighborhood": "Centro",
"city": "Sao Paulo",
"state": "SP",
"postalCode": "01234-567",
"country": "BR"
},
"createdAt": "2025-01-15T15:00:00Z"
},
"message": null,
"error": null
}{
"data": null,
"message": null,
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": null,
"error": {
"message": "Cliente nao encontrado.",
"code": "not_found"
}
}Clientes
Buscar cliente
Consulte um cliente por ID
GET
/
v1
/
customers
/
{id}
Obter cliente
curl --request GET \
--url https://api-payment.safefypay.com.br/v1/customers/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-payment.safefypay.com.br/v1/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-payment.safefypay.com.br/v1/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://api-payment.safefypay.com.br/v1/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-payment.safefypay.com.br/v1/customers/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"externalId": "cliente_123",
"name": "Joao Silva",
"email": "joao@email.com",
"document": "123.456.789-00",
"documentType": "CPF",
"phone": "5511999998888",
"status": "Active",
"metadata": null,
"address": {
"street": "Rua das Flores",
"number": "123",
"complement": "Apto 45",
"neighborhood": "Centro",
"city": "Sao Paulo",
"state": "SP",
"postalCode": "01234-567",
"country": "BR"
},
"createdAt": "2025-01-15T15:00:00Z"
},
"message": null,
"error": null
}{
"data": null,
"message": null,
"error": {
"message": "Token invalido ou expirado.",
"code": "unauthorized"
}
}{
"data": null,
"message": null,
"error": {
"message": "Cliente nao encontrado.",
"code": "not_found"
}
}Retorna os dados completos de um cliente específico.
Autorizações
Token JWT obtido via /v1/auth/token
Parâmetros de caminho
ID do cliente
Exemplo:
"550e8400-e29b-41d4-a716-446655440000"