Criar cliente
curl --request POST \
--url https://api-sandbox.fortalpay.tech/v1/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Maria Silva",
"email": "maria@example.com"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Maria Silva', email: 'maria@example.com'})
};
fetch('https://api-sandbox.fortalpay.tech/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Maria Silva', email: 'maria@example.com'})
};
fetch('https://api-sandbox.fortalpay.tech/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-sandbox.fortalpay.tech/v1/customers"
payload = {
"name": "Maria Silva",
"email": "maria@example.com"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.fortalpay.tech/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' => 'Maria Silva',
'email' => 'maria@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api-sandbox.fortalpay.tech/v1/customers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Maria Silva\",\n \"email\": \"maria@example.com\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.fortalpay.tech/v1/customers"
payload := strings.NewReader("{\n \"name\": \"Maria Silva\",\n \"email\": \"maria@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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))
}using RestSharp;
var options = new RestClientOptions("https://api-sandbox.fortalpay.tech/v1/customers");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"name\": \"Maria Silva\",\n \"email\": \"maria@example.com\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"id": "6f84d2b5-a612-4e67-8af5-69f98de980f5",
"name": "Maria Silva",
"email": "maria@example.com",
"document": "***.***.***-25",
"phone": "85999999999",
"status": "ACTIVE",
"createdAt": "2026-08-02T10:30:00-03:00",
"updatedAt": "2026-08-02T10:30:00-03:00"
},
"success": true,
"error": null
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}Criar cliente
Crie e gerencie clientes para utilizar em cobranças, checkouts e pagamentos.
POST
/
customers
Criar cliente
curl --request POST \
--url https://api-sandbox.fortalpay.tech/v1/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Maria Silva",
"email": "maria@example.com"
}
'const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Maria Silva', email: 'maria@example.com'})
};
fetch('https://api-sandbox.fortalpay.tech/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Maria Silva', email: 'maria@example.com'})
};
fetch('https://api-sandbox.fortalpay.tech/v1/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api-sandbox.fortalpay.tech/v1/customers"
payload = {
"name": "Maria Silva",
"email": "maria@example.com"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.fortalpay.tech/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' => 'Maria Silva',
'email' => 'maria@example.com'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.post("https://api-sandbox.fortalpay.tech/v1/customers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Maria Silva\",\n \"email\": \"maria@example.com\"\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.fortalpay.tech/v1/customers"
payload := strings.NewReader("{\n \"name\": \"Maria Silva\",\n \"email\": \"maria@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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))
}using RestSharp;
var options = new RestClientOptions("https://api-sandbox.fortalpay.tech/v1/customers");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"name\": \"Maria Silva\",\n \"email\": \"maria@example.com\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"data": {
"id": "6f84d2b5-a612-4e67-8af5-69f98de980f5",
"name": "Maria Silva",
"email": "maria@example.com",
"document": "***.***.***-25",
"phone": "85999999999",
"status": "ACTIVE",
"createdAt": "2026-08-02T10:30:00-03:00",
"updatedAt": "2026-08-02T10:30:00-03:00"
},
"success": true,
"error": null
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}{
"data": null,
"success": false,
"error": {
"timestamp": "2023-11-07T05:31:56Z",
"status": 123,
"message": "<string>",
"path": "<string>",
"fields": [
{
"field": "<string>",
"message": "<string>"
}
]
}
}O identificador público do cliente é retornado em
data.id.
Os campos name e email são obrigatórios. O e-mail deve ter um formato válido.Authorizations
Todas as requisições devem incluir sua API key no cabeçalho Authorization
usando o formato ApiKey <sua_api_key>. Não use o esquema Bearer.
Sem esse cabeçalho, a requisição será rejeitada.
Use fpay_sk_test_... no ambiente de teste e fpay_sk_live_... em produção.
Saiba como criar e usar uma API key.
Body
application/json
Required string length:
1 - 150Required string length:
1 - 150CPF ou CNPJ. Os caracteres de formatação são removidos antes do armazenamento.
Maximum string length:
20Telefone. Os caracteres de formatação são removidos antes do armazenamento.
Maximum string length:
20