Criar Cliente
curl --request POST \
--url https://pay.autorizou.dev/api/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"documents": [
{
"documents[].type": "<string>",
"documents[].value": "<string>"
}
],
"addresses": [
{
"addresses[].type": "<string>",
"addresses[].postal_code": "<string>",
"addresses[].line_1": "<string>",
"addresses[].line_2": "<string>",
"addresses[].number": "<string>",
"addresses[].neighborhood": "<string>",
"addresses[].city": "<string>",
"addresses[].state": "<string>",
"addresses[].country": "<string>"
}
],
"phone": {
"phone.type": "<string>",
"phone.ddi": "<string>",
"phone.ddd": "<string>",
"phone.number": "<string>"
}
}
'import requests
url = "https://pay.autorizou.dev/api/v1/customers"
payload = {
"name": "<string>",
"email": "<string>",
"documents": [
{
"documents[].type": "<string>",
"documents[].value": "<string>"
}
],
"addresses": [
{
"addresses[].type": "<string>",
"addresses[].postal_code": "<string>",
"addresses[].line_1": "<string>",
"addresses[].line_2": "<string>",
"addresses[].number": "<string>",
"addresses[].neighborhood": "<string>",
"addresses[].city": "<string>",
"addresses[].state": "<string>",
"addresses[].country": "<string>"
}
],
"phone": {
"phone.type": "<string>",
"phone.ddi": "<string>",
"phone.ddd": "<string>",
"phone.number": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
documents: [{'documents[].type': '<string>', 'documents[].value': '<string>'}],
addresses: [
{
'addresses[].type': '<string>',
'addresses[].postal_code': '<string>',
'addresses[].line_1': '<string>',
'addresses[].line_2': '<string>',
'addresses[].number': '<string>',
'addresses[].neighborhood': '<string>',
'addresses[].city': '<string>',
'addresses[].state': '<string>',
'addresses[].country': '<string>'
}
],
phone: {
'phone.type': '<string>',
'phone.ddi': '<string>',
'phone.ddd': '<string>',
'phone.number': '<string>'
}
})
};
fetch('https://pay.autorizou.dev/api/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://pay.autorizou.dev/api/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' => '<string>',
'email' => '<string>',
'documents' => [
[
'documents[].type' => '<string>',
'documents[].value' => '<string>'
]
],
'addresses' => [
[
'addresses[].type' => '<string>',
'addresses[].postal_code' => '<string>',
'addresses[].line_1' => '<string>',
'addresses[].line_2' => '<string>',
'addresses[].number' => '<string>',
'addresses[].neighborhood' => '<string>',
'addresses[].city' => '<string>',
'addresses[].state' => '<string>',
'addresses[].country' => '<string>'
]
],
'phone' => [
'phone.type' => '<string>',
'phone.ddi' => '<string>',
'phone.ddd' => '<string>',
'phone.number' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://pay.autorizou.dev/api/v1/customers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"documents\": [\n {\n \"documents[].type\": \"<string>\",\n \"documents[].value\": \"<string>\"\n }\n ],\n \"addresses\": [\n {\n \"addresses[].type\": \"<string>\",\n \"addresses[].postal_code\": \"<string>\",\n \"addresses[].line_1\": \"<string>\",\n \"addresses[].line_2\": \"<string>\",\n \"addresses[].number\": \"<string>\",\n \"addresses[].neighborhood\": \"<string>\",\n \"addresses[].city\": \"<string>\",\n \"addresses[].state\": \"<string>\",\n \"addresses[].country\": \"<string>\"\n }\n ],\n \"phone\": {\n \"phone.type\": \"<string>\",\n \"phone.ddi\": \"<string>\",\n \"phone.ddd\": \"<string>\",\n \"phone.number\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://pay.autorizou.dev/api/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"documents\": [\n {\n \"documents[].type\": \"<string>\",\n \"documents[].value\": \"<string>\"\n }\n ],\n \"addresses\": [\n {\n \"addresses[].type\": \"<string>\",\n \"addresses[].postal_code\": \"<string>\",\n \"addresses[].line_1\": \"<string>\",\n \"addresses[].line_2\": \"<string>\",\n \"addresses[].number\": \"<string>\",\n \"addresses[].neighborhood\": \"<string>\",\n \"addresses[].city\": \"<string>\",\n \"addresses[].state\": \"<string>\",\n \"addresses[].country\": \"<string>\"\n }\n ],\n \"phone\": {\n \"phone.type\": \"<string>\",\n \"phone.ddi\": \"<string>\",\n \"phone.ddd\": \"<string>\",\n \"phone.number\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pay.autorizou.dev/api/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"documents\": [\n {\n \"documents[].type\": \"<string>\",\n \"documents[].value\": \"<string>\"\n }\n ],\n \"addresses\": [\n {\n \"addresses[].type\": \"<string>\",\n \"addresses[].postal_code\": \"<string>\",\n \"addresses[].line_1\": \"<string>\",\n \"addresses[].line_2\": \"<string>\",\n \"addresses[].number\": \"<string>\",\n \"addresses[].neighborhood\": \"<string>\",\n \"addresses[].city\": \"<string>\",\n \"addresses[].state\": \"<string>\",\n \"addresses[].country\": \"<string>\"\n }\n ],\n \"phone\": {\n \"phone.type\": \"<string>\",\n \"phone.ddi\": \"<string>\",\n \"phone.ddd\": \"<string>\",\n \"phone.number\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyClientes
Criar Cliente
Endpoint principal para cadas novos clientes
POST
/
api
/
v1
/
customers
Criar Cliente
curl --request POST \
--url https://pay.autorizou.dev/api/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "<string>",
"documents": [
{
"documents[].type": "<string>",
"documents[].value": "<string>"
}
],
"addresses": [
{
"addresses[].type": "<string>",
"addresses[].postal_code": "<string>",
"addresses[].line_1": "<string>",
"addresses[].line_2": "<string>",
"addresses[].number": "<string>",
"addresses[].neighborhood": "<string>",
"addresses[].city": "<string>",
"addresses[].state": "<string>",
"addresses[].country": "<string>"
}
],
"phone": {
"phone.type": "<string>",
"phone.ddi": "<string>",
"phone.ddd": "<string>",
"phone.number": "<string>"
}
}
'import requests
url = "https://pay.autorizou.dev/api/v1/customers"
payload = {
"name": "<string>",
"email": "<string>",
"documents": [
{
"documents[].type": "<string>",
"documents[].value": "<string>"
}
],
"addresses": [
{
"addresses[].type": "<string>",
"addresses[].postal_code": "<string>",
"addresses[].line_1": "<string>",
"addresses[].line_2": "<string>",
"addresses[].number": "<string>",
"addresses[].neighborhood": "<string>",
"addresses[].city": "<string>",
"addresses[].state": "<string>",
"addresses[].country": "<string>"
}
],
"phone": {
"phone.type": "<string>",
"phone.ddi": "<string>",
"phone.ddd": "<string>",
"phone.number": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: '<string>',
documents: [{'documents[].type': '<string>', 'documents[].value': '<string>'}],
addresses: [
{
'addresses[].type': '<string>',
'addresses[].postal_code': '<string>',
'addresses[].line_1': '<string>',
'addresses[].line_2': '<string>',
'addresses[].number': '<string>',
'addresses[].neighborhood': '<string>',
'addresses[].city': '<string>',
'addresses[].state': '<string>',
'addresses[].country': '<string>'
}
],
phone: {
'phone.type': '<string>',
'phone.ddi': '<string>',
'phone.ddd': '<string>',
'phone.number': '<string>'
}
})
};
fetch('https://pay.autorizou.dev/api/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://pay.autorizou.dev/api/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' => '<string>',
'email' => '<string>',
'documents' => [
[
'documents[].type' => '<string>',
'documents[].value' => '<string>'
]
],
'addresses' => [
[
'addresses[].type' => '<string>',
'addresses[].postal_code' => '<string>',
'addresses[].line_1' => '<string>',
'addresses[].line_2' => '<string>',
'addresses[].number' => '<string>',
'addresses[].neighborhood' => '<string>',
'addresses[].city' => '<string>',
'addresses[].state' => '<string>',
'addresses[].country' => '<string>'
]
],
'phone' => [
'phone.type' => '<string>',
'phone.ddi' => '<string>',
'phone.ddd' => '<string>',
'phone.number' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://pay.autorizou.dev/api/v1/customers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"documents\": [\n {\n \"documents[].type\": \"<string>\",\n \"documents[].value\": \"<string>\"\n }\n ],\n \"addresses\": [\n {\n \"addresses[].type\": \"<string>\",\n \"addresses[].postal_code\": \"<string>\",\n \"addresses[].line_1\": \"<string>\",\n \"addresses[].line_2\": \"<string>\",\n \"addresses[].number\": \"<string>\",\n \"addresses[].neighborhood\": \"<string>\",\n \"addresses[].city\": \"<string>\",\n \"addresses[].state\": \"<string>\",\n \"addresses[].country\": \"<string>\"\n }\n ],\n \"phone\": {\n \"phone.type\": \"<string>\",\n \"phone.ddi\": \"<string>\",\n \"phone.ddd\": \"<string>\",\n \"phone.number\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://pay.autorizou.dev/api/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"documents\": [\n {\n \"documents[].type\": \"<string>\",\n \"documents[].value\": \"<string>\"\n }\n ],\n \"addresses\": [\n {\n \"addresses[].type\": \"<string>\",\n \"addresses[].postal_code\": \"<string>\",\n \"addresses[].line_1\": \"<string>\",\n \"addresses[].line_2\": \"<string>\",\n \"addresses[].number\": \"<string>\",\n \"addresses[].neighborhood\": \"<string>\",\n \"addresses[].city\": \"<string>\",\n \"addresses[].state\": \"<string>\",\n \"addresses[].country\": \"<string>\"\n }\n ],\n \"phone\": {\n \"phone.type\": \"<string>\",\n \"phone.ddi\": \"<string>\",\n \"phone.ddd\": \"<string>\",\n \"phone.number\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pay.autorizou.dev/api/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"<string>\",\n \"documents\": [\n {\n \"documents[].type\": \"<string>\",\n \"documents[].value\": \"<string>\"\n }\n ],\n \"addresses\": [\n {\n \"addresses[].type\": \"<string>\",\n \"addresses[].postal_code\": \"<string>\",\n \"addresses[].line_1\": \"<string>\",\n \"addresses[].line_2\": \"<string>\",\n \"addresses[].number\": \"<string>\",\n \"addresses[].neighborhood\": \"<string>\",\n \"addresses[].city\": \"<string>\",\n \"addresses[].state\": \"<string>\",\n \"addresses[].country\": \"<string>\"\n }\n ],\n \"phone\": {\n \"phone.type\": \"<string>\",\n \"phone.ddi\": \"<string>\",\n \"phone.ddd\": \"<string>\",\n \"phone.number\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_bodyEste endpoint permite cadastrar um novo cliente na plataforma Autorizou. O cliente é uma entidade obrigatória para processar qualquer pagamento e pode ter múltiplos cartões associados.
Casos de Uso
- Cadastro inicial de novos compradores
- Onboarding de usuários em marketplaces
- Gestão de relacionamento com compradores
- Preparação para futuros pagamentos
Parâmetros Obrigatórios
string
required
Nome completo do cliente (máximo 191 caracteres)
string
required
Email válido e único por merchant (máximo 191 caracteres)
Parâmetros Opcionais
Documentos
array
Endereços
array
Lista de endereços do cliente
Show Propriedades
Show Propriedades
string
required
Tipo do endereço:
billing (cobrança) ou shipping (entrega)string
required
CEP (apenas números)
string
required
Logradouro (rua, avenida, etc.)
string
Complemento (apartamento, sala, etc.)
string
required
Número do endereço
string
required
Bairro
string
required
Cidade
string
required
Estado (2 caracteres - ex: SP, RJ)
string
required
País (ISO 3166-1 alpha-2 - ex: BR)
Telefone
object
Exemplo de Requisição
curl -X POST https://pay.autorizou.dev/api/v1/customers \
-H "Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc" \
-H "Content-Type: application/json" \
-d '{
"name": "Maria da Silva Santos",
"email": "maria.santos@exemplo.com.br",
"documents": [
{
"type": "cpf",
"value": "12345678901"
}
],
"addresses": [
{
"type": "billing",
"postal_code": "01310100",
"line_1": "Av. Paulista",
"number": "1000",
"line_2": "Conjunto 101",
"neighborhood": "Bela Vista",
"city": "São Paulo",
"state": "SP",
"country": "BR"
}
],
"phone": {
"type": "mobile",
"ddi": "55",
"ddd": "11",
"number": "987654321"
}
}'
const customer = await fetch('https://pay.autorizou.dev/api/v1/customers', {
method: 'POST',
headers: {
'Authorization': 'Bearer 4eC39HqLyjWDarjtT1zdp7dc',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Maria da Silva Santos',
email: 'maria.santos@exemplo.com.br',
documents: [
{
type: 'CPF',
value: '12345678901'
}
],
addresses: [
{
type: 'billing',
postal_code: '01310100',
line_1: 'Av. Paulista',
number: '1000',
line_2: 'Conjunto 101',
neighborhood: 'Bela Vista',
city: 'São Paulo',
state: 'SP',
country: 'BR'
}
],
phone: {
type: 'mobile',
ddi: '55',
ddd: '11',
number: '987654321'
}
})
});
const result = await customer.json();
console.log('Cliente criado:', result);
<?php
$data = [
'name' => 'Maria da Silva Santos',
'email' => 'maria.santos@exemplo.com.br',
'documents' => [
[
'type' => 'CPF',
'value' => '12345678901'
]
],
'addresses' => [
[
'type' => 'billing',
'postal_code' => '01310100',
'line_1' => 'Av. Paulista',
'number' => '1000',
'line_2' => 'Conjunto 101',
'neighborhood' => 'Bela Vista',
'city' => 'São Paulo',
'state' => 'SP',
'country' => 'BR'
]
],
'phone' => [
'type' => 'mobile',
'ddi' => '55',
'ddd' => '11',
'number' => '987654321'
]
];
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://pay.autorizou.dev/api/v1/customers',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc',
'Content-Type: application/json'
],
CURLOPT_POSTFIELDS => json_encode($data)
]);
$response = curl_exec($curl);
$customer = json_decode($response, true);
curl_close($curl);
echo "Cliente criado: " . json_encode($customer, JSON_PRETTY_PRINT);
?>
Resposta de Sucesso
{
"id": "142465c6-4c9d-4fd1-9632-2c40af316da3",
"hash": "AUTCUS01K8RSCH3T5FNB7EVACV8DQVNX",
"name": "Maria da Silva Santos",
"email": "maria.santos@exemplo.com.br",
"created_at": "29/10/2025 17:08:42",
"updated_at": "29/10/2025 17:08:42"
}
Códigos de Erro
400 - Bad Request
400 - Bad Request
Requisição malformada ou parâmetros inválidos
{
"error": {
"code": "invalid_request",
"message": "Dados da requisição são inválidos"
}
}
422 - Validation Error
422 - Validation Error
Erro de validação nos dados fornecidos
{
"message": O email já está em uso.",
"errors": {
"email": [
"O email já está em uso."
]
}
}
Regras de Negócio
Email único: O email deve ser único por merchant. Tentativas de criar clientes com emails duplicados retornarão erro 422.
Validação de documentos: CPF e CNPJ são validados automaticamente. Apenas documentos válidos são aceitos.
Dados obrigatórios para pagamentos: Embora endereços e telefone sejam opcionais na criação, alguns métodos de pagamento podem exigir essas informações posteriormente.
Próximos Passos
Após criar um cliente, você pode:⌘I