Update Billing Details
curl --request PUT \
--url https://api.vertracloud.app/v1/users/me/billing \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"address": {
"line1": "<string>",
"number": "<string>",
"line2": "<string>",
"district": "<string>",
"city": "<string>",
"city_code": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"phone": {},
"tax_id": {
"type": "<string>",
"value": "<string>"
}
}
'import requests
url = "https://api.vertracloud.app/v1/users/me/billing"
payload = {
"name": "<string>",
"address": {
"line1": "<string>",
"number": "<string>",
"line2": "<string>",
"district": "<string>",
"city": "<string>",
"city_code": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"phone": {},
"tax_id": {
"type": "<string>",
"value": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
address: {
line1: '<string>',
number: '<string>',
line2: '<string>',
district: '<string>',
city: '<string>',
city_code: '<string>',
state: '<string>',
postal_code: '<string>',
country: '<string>'
},
phone: {},
tax_id: {type: '<string>', value: '<string>'}
})
};
fetch('https://api.vertracloud.app/v1/users/me/billing', 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.vertracloud.app/v1/users/me/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'address' => [
'line1' => '<string>',
'number' => '<string>',
'line2' => '<string>',
'district' => '<string>',
'city' => '<string>',
'city_code' => '<string>',
'state' => '<string>',
'postal_code' => '<string>',
'country' => '<string>'
],
'phone' => [
],
'tax_id' => [
'type' => '<string>',
'value' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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.vertracloud.app/v1/users/me/billing"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"number\": \"<string>\",\n \"line2\": \"<string>\",\n \"district\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"phone\": {},\n \"tax_id\": {\n \"type\": \"<string>\",\n \"value\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.vertracloud.app/v1/users/me/billing")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"number\": \"<string>\",\n \"line2\": \"<string>\",\n \"district\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"phone\": {},\n \"tax_id\": {\n \"type\": \"<string>\",\n \"value\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/users/me/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"number\": \"<string>\",\n \"line2\": \"<string>\",\n \"district\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"phone\": {},\n \"tax_id\": {\n \"type\": \"<string>\",\n \"value\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"response": {
"name": "Ana Souza",
"address": {
"line1": "Rua das Flores",
"number": "120",
"line2": null,
"district": "Centro",
"city": "Fortaleza",
"city_code": "2304400",
"state": "CE",
"postal_code": "60000000",
"country": "BR"
},
"phone": "+5585999990000",
"tax_id": { "type": "cpf", "masked": "CPF ••• 47" },
"complete": true
}
}
Billing
Update Billing Details
Replaces the billing details of the account. Requires the billing:write scope.
PUT
/
v1
/
users
/
me
/
billing
Update Billing Details
curl --request PUT \
--url https://api.vertracloud.app/v1/users/me/billing \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"address": {
"line1": "<string>",
"number": "<string>",
"line2": "<string>",
"district": "<string>",
"city": "<string>",
"city_code": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"phone": {},
"tax_id": {
"type": "<string>",
"value": "<string>"
}
}
'import requests
url = "https://api.vertracloud.app/v1/users/me/billing"
payload = {
"name": "<string>",
"address": {
"line1": "<string>",
"number": "<string>",
"line2": "<string>",
"district": "<string>",
"city": "<string>",
"city_code": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"phone": {},
"tax_id": {
"type": "<string>",
"value": "<string>"
}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
address: {
line1: '<string>',
number: '<string>',
line2: '<string>',
district: '<string>',
city: '<string>',
city_code: '<string>',
state: '<string>',
postal_code: '<string>',
country: '<string>'
},
phone: {},
tax_id: {type: '<string>', value: '<string>'}
})
};
fetch('https://api.vertracloud.app/v1/users/me/billing', 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.vertracloud.app/v1/users/me/billing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'address' => [
'line1' => '<string>',
'number' => '<string>',
'line2' => '<string>',
'district' => '<string>',
'city' => '<string>',
'city_code' => '<string>',
'state' => '<string>',
'postal_code' => '<string>',
'country' => '<string>'
],
'phone' => [
],
'tax_id' => [
'type' => '<string>',
'value' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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.vertracloud.app/v1/users/me/billing"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"number\": \"<string>\",\n \"line2\": \"<string>\",\n \"district\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"phone\": {},\n \"tax_id\": {\n \"type\": \"<string>\",\n \"value\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://api.vertracloud.app/v1/users/me/billing")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"number\": \"<string>\",\n \"line2\": \"<string>\",\n \"district\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"phone\": {},\n \"tax_id\": {\n \"type\": \"<string>\",\n \"value\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/users/me/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"address\": {\n \"line1\": \"<string>\",\n \"number\": \"<string>\",\n \"line2\": \"<string>\",\n \"district\": \"<string>\",\n \"city\": \"<string>\",\n \"city_code\": \"<string>\",\n \"state\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\"\n },\n \"phone\": {},\n \"tax_id\": {\n \"type\": \"<string>\",\n \"value\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"response": {
"name": "Ana Souza",
"address": {
"line1": "Rua das Flores",
"number": "120",
"line2": null,
"district": "Centro",
"city": "Fortaleza",
"city_code": "2304400",
"state": "CE",
"postal_code": "60000000",
"country": "BR"
},
"phone": "+5585999990000",
"tax_id": { "type": "cpf", "masked": "CPF ••• 47" },
"complete": true
}
}
Billing details are used on receipts and invoices, and an order needs them complete. The request
replaces the saved details. It carries personal data (name, address and CPF/CNPJ), so only send
values the account owner provided.
Outside Brazil,
string
required
The name on receipts and invoices.
object
required
Show Toggle object
Show Toggle object
string
required
Street name.
string
Street number, or
S/N. Required in Brazil.string
Complement, for example
Apt 2.string
Neighborhood (bairro). Required in Brazil.
string
required
City.
string
Seven-digit IBGE city code. Required in Brazil.
string
Two-letter state code in Brazil, for example
CE. Required in Brazil.string
Postal code. In Brazil, the 8-digit CEP is required.
string
required
Two-letter ISO country code, for example
BR.string | null
Optional phone number, in E.164 format, for example
+5585999990000. null or omitted removes
the saved phone.object | null
line1, city and postal_code are enough.
Response
The saved details, with the document masked, andcomplete. See
Get Billing Details for the fields. The
response is never cached.
{
"response": {
"name": "Ana Souza",
"address": {
"line1": "Rua das Flores",
"number": "120",
"line2": null,
"district": "Centro",
"city": "Fortaleza",
"city_code": "2304400",
"state": "CE",
"postal_code": "60000000",
"country": "BR"
},
"phone": "+5585999990000",
"tax_id": { "type": "cpf", "masked": "CPF ••• 47" },
"complete": true
}
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
UNAUTHORIZED: The user is not authenticated.USER_NOT_FOUND: The authenticated user was not found.BILLING_DETAILS_INVALID: A field failed validation; its name is indetails.path(400).TAX_ID_INVALID: The CPF or CNPJ is not valid (400).PAYMENT_METHOD_UNAVAILABLE: Online payment is temporarily unavailable (400).INTERNAL_SERVER_ERROR: An unexpected server error occurred.
{
"code": "BILLING_DETAILS_INVALID",
"details": { "path": "address.postal_code" }
}