Create a customer
curl --request POST \
--url https://api.fintoc.com/v2/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"city": "Santiago",
"country": "CL",
"line1": "Av. Providencia 123",
"line2": "Depto 45",
"postal_code": "7500000",
"state": "RM"
},
"email": "jared@piedpiper.com",
"metadata": {
"order_id": "12345"
},
"name": "Test Customer 1",
"phone": "+56911111111",
"tax_id": {
"type": "cl_rut",
"value": "11111111-1"
}
}
'import requests
url = "https://api.fintoc.com/v2/customers"
payload = {
"address": {
"city": "Santiago",
"country": "CL",
"line1": "Av. Providencia 123",
"line2": "Depto 45",
"postal_code": "7500000",
"state": "RM"
},
"email": "jared@piedpiper.com",
"metadata": { "order_id": "12345" },
"name": "Test Customer 1",
"phone": "+56911111111",
"tax_id": {
"type": "cl_rut",
"value": "11111111-1"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: {
city: 'Santiago',
country: 'CL',
line1: 'Av. Providencia 123',
line2: 'Depto 45',
postal_code: '7500000',
state: 'RM'
},
email: 'jared@piedpiper.com',
metadata: {order_id: '12345'},
name: 'Test Customer 1',
phone: '+56911111111',
tax_id: {type: 'cl_rut', value: '11111111-1'}
})
};
fetch('https://api.fintoc.com/v2/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.fintoc.com/v2/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([
'address' => [
'city' => 'Santiago',
'country' => 'CL',
'line1' => 'Av. Providencia 123',
'line2' => 'Depto 45',
'postal_code' => '7500000',
'state' => 'RM'
],
'email' => 'jared@piedpiper.com',
'metadata' => [
'order_id' => '12345'
],
'name' => 'Test Customer 1',
'phone' => '+56911111111',
'tax_id' => [
'type' => 'cl_rut',
'value' => '11111111-1'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v2/customers"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"Santiago\",\n \"country\": \"CL\",\n \"line1\": \"Av. Providencia 123\",\n \"line2\": \"Depto 45\",\n \"postal_code\": \"7500000\",\n \"state\": \"RM\"\n },\n \"email\": \"jared@piedpiper.com\",\n \"metadata\": {\n \"order_id\": \"12345\"\n },\n \"name\": \"Test Customer 1\",\n \"phone\": \"+56911111111\",\n \"tax_id\": {\n \"type\": \"cl_rut\",\n \"value\": \"11111111-1\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v2/customers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"city\": \"Santiago\",\n \"country\": \"CL\",\n \"line1\": \"Av. Providencia 123\",\n \"line2\": \"Depto 45\",\n \"postal_code\": \"7500000\",\n \"state\": \"RM\"\n },\n \"email\": \"jared@piedpiper.com\",\n \"metadata\": {\n \"order_id\": \"12345\"\n },\n \"name\": \"Test Customer 1\",\n \"phone\": \"+56911111111\",\n \"tax_id\": {\n \"type\": \"cl_rut\",\n \"value\": \"11111111-1\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": {\n \"city\": \"Santiago\",\n \"country\": \"CL\",\n \"line1\": \"Av. Providencia 123\",\n \"line2\": \"Depto 45\",\n \"postal_code\": \"7500000\",\n \"state\": \"RM\"\n },\n \"email\": \"jared@piedpiper.com\",\n \"metadata\": {\n \"order_id\": \"12345\"\n },\n \"name\": \"Test Customer 1\",\n \"phone\": \"+56911111111\",\n \"tax_id\": {\n \"type\": \"cl_rut\",\n \"value\": \"11111111-1\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "cus_0ujsswThIGTUYm2K8FjOOfXtY1K",
"object": "customer",
"address": {
"city": "Santiago",
"country": "cl",
"line1": "Av. Providencia 123",
"line2": "Depto 45",
"postal_code": "7500000",
"state": "RM"
},
"created_at": "2026-01-15T14:30:00Z",
"email": "jared@piedpiper.com",
"metadata": {
"order_id": "12345"
},
"mode": "live",
"name": "Test Customer 1",
"phone": "+56911111111",
"tax_id": {
"type": "cl_rut",
"value": "111111111"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_parameter",
"param": "email",
"message": "either email or tax_id must be present",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "conflicted_request_error",
"code": "conflicted_request",
"message": "A Customer with this tax_id already exists"
}
}Clientes
Create a customer
Creates a customer in the live or test mode of the API key used. Send at least one of email or tax_id; every other field is optional. If you send tax_id, both its type and value are required. Fintoc normalizes values before storing them. It lowercases email and address.country, removes dots and hyphens from Chilean tax IDs (RUTs), uppercases Mexican tax IDs (RFCs), and removes leading and trailing spaces from custom identifiers.
POST
/
v2
/
customers
Create a customer
curl --request POST \
--url https://api.fintoc.com/v2/customers \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"address": {
"city": "Santiago",
"country": "CL",
"line1": "Av. Providencia 123",
"line2": "Depto 45",
"postal_code": "7500000",
"state": "RM"
},
"email": "jared@piedpiper.com",
"metadata": {
"order_id": "12345"
},
"name": "Test Customer 1",
"phone": "+56911111111",
"tax_id": {
"type": "cl_rut",
"value": "11111111-1"
}
}
'import requests
url = "https://api.fintoc.com/v2/customers"
payload = {
"address": {
"city": "Santiago",
"country": "CL",
"line1": "Av. Providencia 123",
"line2": "Depto 45",
"postal_code": "7500000",
"state": "RM"
},
"email": "jared@piedpiper.com",
"metadata": { "order_id": "12345" },
"name": "Test Customer 1",
"phone": "+56911111111",
"tax_id": {
"type": "cl_rut",
"value": "11111111-1"
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: {
city: 'Santiago',
country: 'CL',
line1: 'Av. Providencia 123',
line2: 'Depto 45',
postal_code: '7500000',
state: 'RM'
},
email: 'jared@piedpiper.com',
metadata: {order_id: '12345'},
name: 'Test Customer 1',
phone: '+56911111111',
tax_id: {type: 'cl_rut', value: '11111111-1'}
})
};
fetch('https://api.fintoc.com/v2/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.fintoc.com/v2/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([
'address' => [
'city' => 'Santiago',
'country' => 'CL',
'line1' => 'Av. Providencia 123',
'line2' => 'Depto 45',
'postal_code' => '7500000',
'state' => 'RM'
],
'email' => 'jared@piedpiper.com',
'metadata' => [
'order_id' => '12345'
],
'name' => 'Test Customer 1',
'phone' => '+56911111111',
'tax_id' => [
'type' => 'cl_rut',
'value' => '11111111-1'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fintoc.com/v2/customers"
payload := strings.NewReader("{\n \"address\": {\n \"city\": \"Santiago\",\n \"country\": \"CL\",\n \"line1\": \"Av. Providencia 123\",\n \"line2\": \"Depto 45\",\n \"postal_code\": \"7500000\",\n \"state\": \"RM\"\n },\n \"email\": \"jared@piedpiper.com\",\n \"metadata\": {\n \"order_id\": \"12345\"\n },\n \"name\": \"Test Customer 1\",\n \"phone\": \"+56911111111\",\n \"tax_id\": {\n \"type\": \"cl_rut\",\n \"value\": \"11111111-1\"\n }\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))
}HttpResponse<String> response = Unirest.post("https://api.fintoc.com/v2/customers")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"address\": {\n \"city\": \"Santiago\",\n \"country\": \"CL\",\n \"line1\": \"Av. Providencia 123\",\n \"line2\": \"Depto 45\",\n \"postal_code\": \"7500000\",\n \"state\": \"RM\"\n },\n \"email\": \"jared@piedpiper.com\",\n \"metadata\": {\n \"order_id\": \"12345\"\n },\n \"name\": \"Test Customer 1\",\n \"phone\": \"+56911111111\",\n \"tax_id\": {\n \"type\": \"cl_rut\",\n \"value\": \"11111111-1\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fintoc.com/v2/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": {\n \"city\": \"Santiago\",\n \"country\": \"CL\",\n \"line1\": \"Av. Providencia 123\",\n \"line2\": \"Depto 45\",\n \"postal_code\": \"7500000\",\n \"state\": \"RM\"\n },\n \"email\": \"jared@piedpiper.com\",\n \"metadata\": {\n \"order_id\": \"12345\"\n },\n \"name\": \"Test Customer 1\",\n \"phone\": \"+56911111111\",\n \"tax_id\": {\n \"type\": \"cl_rut\",\n \"value\": \"11111111-1\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "cus_0ujsswThIGTUYm2K8FjOOfXtY1K",
"object": "customer",
"address": {
"city": "Santiago",
"country": "cl",
"line1": "Av. Providencia 123",
"line2": "Depto 45",
"postal_code": "7500000",
"state": "RM"
},
"created_at": "2026-01-15T14:30:00Z",
"email": "jared@piedpiper.com",
"metadata": {
"order_id": "12345"
},
"mode": "live",
"name": "Test Customer 1",
"phone": "+56911111111",
"tax_id": {
"type": "cl_rut",
"value": "111111111"
}
}{
"error": {
"type": "invalid_request_error",
"code": "missing_parameter",
"param": "email",
"message": "either email or tax_id must be present",
"doc_url": "https://docs.fintoc.com/reference/errors"
}
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API Key: invalid-*oken"
}
}{
"error": {
"type": "conflicted_request_error",
"code": "conflicted_request",
"message": "A Customer with this tax_id already exists"
}
}Cuerpo
application/json
Respuesta
Customer created.
¿Esta página le ayudó?