Criar um cliente
curl --request POST \
--url https://api.pague.dev/v1/customers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"name": "João da Silva",
"document": "12345678909",
"email": "jsmith@example.com",
"phone": "+5511999998888"
}
'import requests
url = "https://api.pague.dev/v1/customers"
payload = {
"name": "João da Silva",
"document": "12345678909",
"email": "jsmith@example.com",
"phone": "+5511999998888"
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'João da Silva',
document: '12345678909',
email: 'jsmith@example.com',
phone: '+5511999998888'
})
};
fetch('https://api.pague.dev/v1/customers', 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.pague.dev/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'João da Silva',
'document' => '12345678909',
'email' => 'jsmith@example.com',
'phone' => '+5511999998888'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pague.dev/v1/customers"
payload := strings.NewReader("{\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pague.dev/v1/customers")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pague.dev/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "João da Silva",
"email": "jsmith@example.com",
"document": "***456789**",
"createdAt": "2023-11-07T05:31:56Z",
"phone": "+5511999998888"
}{
"statusCode": 400,
"error": "BadRequest",
"message": "name must be longer than or equal to 2 characters",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}Clientes
Criar Cliente
Cria um novo cliente.
Permissão requerida: CUSTOMER:WRITE ou FULL_ACCESS
POST
/
customers
Criar um cliente
curl --request POST \
--url https://api.pague.dev/v1/customers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"name": "João da Silva",
"document": "12345678909",
"email": "jsmith@example.com",
"phone": "+5511999998888"
}
'import requests
url = "https://api.pague.dev/v1/customers"
payload = {
"name": "João da Silva",
"document": "12345678909",
"email": "jsmith@example.com",
"phone": "+5511999998888"
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'João da Silva',
document: '12345678909',
email: 'jsmith@example.com',
phone: '+5511999998888'
})
};
fetch('https://api.pague.dev/v1/customers', 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.pague.dev/v1/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'João da Silva',
'document' => '12345678909',
'email' => 'jsmith@example.com',
'phone' => '+5511999998888'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pague.dev/v1/customers"
payload := strings.NewReader("{\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pague.dev/v1/customers")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pague.dev/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"João da Silva\",\n \"document\": \"12345678909\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"+5511999998888\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "João da Silva",
"email": "jsmith@example.com",
"document": "***456789**",
"createdAt": "2023-11-07T05:31:56Z",
"phone": "+5511999998888"
}{
"statusCode": 400,
"error": "BadRequest",
"message": "name must be longer than or equal to 2 characters",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication token is required",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "<string>"
}{
"statusCode": 500,
"error": "InternalError",
"message": "An unexpected error occurred",
"timestamp": "2025-12-15T22:00:00.000Z",
"details": {},
"traceId": "2771463d58840c8e116dc6dda1e1e5d0"
}Cabeçalhos
Chave de API de integração (pd_live_* para produção, pd_test_* para sandbox)
Corpo
application/json
Nome do cliente
Maximum string length:
255Exemplo:
"João da Silva"
CPF (11 dígitos) ou CNPJ (14 dígitos), apenas números
Pattern:
^(\d{11}|\d{14})$Exemplo:
"12345678909"
E-mail do cliente
Maximum string length:
255Telefone do cliente com DDI
Pattern:
^\+\d{10,15}$Exemplo:
"+5511999998888"
Resposta
Cliente criado com sucesso
ID do cliente
Nome do cliente
Exemplo:
"João da Silva"
E-mail do cliente
Tipo do documento
Opções disponíveis:
cpf, cnpj Número do documento mascarado
Exemplo:
"***456789**"
Data de criação
Telefone do cliente com DDI
Exemplo:
"+5511999998888"
⌘I

