Update payment account
curl --request PUT \
--url https://api.useaira.com/v1/payment-accounts/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legalEntity": {
"businessName": "<string>",
"taxId": "01234567000189",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"tradeName": "<string>",
"emails": [],
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"country": "Brasil",
"complement": "<string>"
}
}
'import requests
url = "https://api.useaira.com/v1/payment-accounts/{id}"
payload = {
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legalEntity": {
"businessName": "<string>",
"taxId": "01234567000189",
"customFields": {
"customField1": "value1",
"customField2": ["value2", "value3"]
},
"tradeName": "<string>",
"emails": [],
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"country": "Brasil",
"complement": "<string>"
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
legalEntity: {
businessName: '<string>',
taxId: '01234567000189',
customFields: {customField1: 'value1', customField2: ['value2', 'value3']},
tradeName: '<string>',
emails: [],
zipCode: '<string>',
street: '<string>',
number: '<string>',
neighborhood: '<string>',
city: '<string>',
country: 'Brasil',
complement: '<string>'
}
})
};
fetch('https://api.useaira.com/v1/payment-accounts/{id}', 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.useaira.com/v1/payment-accounts/{id}",
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([
'customerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'legalEntity' => [
'businessName' => '<string>',
'taxId' => '01234567000189',
'customFields' => [
'customField1' => 'value1',
'customField2' => [
'value2',
'value3'
]
],
'tradeName' => '<string>',
'emails' => [
],
'zipCode' => '<string>',
'street' => '<string>',
'number' => '<string>',
'neighborhood' => '<string>',
'city' => '<string>',
'country' => 'Brasil',
'complement' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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.useaira.com/v1/payment-accounts/{id}"
payload := strings.NewReader("{\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"legalEntity\": {\n \"businessName\": \"<string>\",\n \"taxId\": \"01234567000189\",\n \"customFields\": {\n \"customField1\": \"value1\",\n \"customField2\": [\n \"value2\",\n \"value3\"\n ]\n },\n \"tradeName\": \"<string>\",\n \"emails\": [],\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"Brasil\",\n \"complement\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<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.put("https://api.useaira.com/v1/payment-accounts/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"legalEntity\": {\n \"businessName\": \"<string>\",\n \"taxId\": \"01234567000189\",\n \"customFields\": {\n \"customField1\": \"value1\",\n \"customField2\": [\n \"value2\",\n \"value3\"\n ]\n },\n \"tradeName\": \"<string>\",\n \"emails\": [],\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"Brasil\",\n \"complement\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useaira.com/v1/payment-accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"legalEntity\": {\n \"businessName\": \"<string>\",\n \"taxId\": \"01234567000189\",\n \"customFields\": {\n \"customField1\": \"value1\",\n \"customField2\": [\n \"value2\",\n \"value3\"\n ]\n },\n \"tradeName\": \"<string>\",\n \"emails\": [],\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"Brasil\",\n \"complement\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"legalEntity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"businessName": "<string>",
"taxId": "01234567000189",
"taxIdType": "cnpj",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"tradeName": "<string>",
"emails": [],
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
}
}{
"message": "<string>",
"code": "<string>",
"details": {},
"causations": [
{
"message": "<string>",
"code": "<string>",
"details": {}
}
]
}{
"message": "<string>"
}Payment Accounts
Update payment account
Updates the legal entity of a payment account, including the billing emails that receive its invoices. The payload replaces the current legal entity, so send every field you want to keep: an omitted trade name, address or email list is cleared, and a partial address is rejected.
PUT
/
v1
/
payment-accounts
/
{id}
Update payment account
curl --request PUT \
--url https://api.useaira.com/v1/payment-accounts/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legalEntity": {
"businessName": "<string>",
"taxId": "01234567000189",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"tradeName": "<string>",
"emails": [],
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"country": "Brasil",
"complement": "<string>"
}
}
'import requests
url = "https://api.useaira.com/v1/payment-accounts/{id}"
payload = {
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"legalEntity": {
"businessName": "<string>",
"taxId": "01234567000189",
"customFields": {
"customField1": "value1",
"customField2": ["value2", "value3"]
},
"tradeName": "<string>",
"emails": [],
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"country": "Brasil",
"complement": "<string>"
}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
legalEntity: {
businessName: '<string>',
taxId: '01234567000189',
customFields: {customField1: 'value1', customField2: ['value2', 'value3']},
tradeName: '<string>',
emails: [],
zipCode: '<string>',
street: '<string>',
number: '<string>',
neighborhood: '<string>',
city: '<string>',
country: 'Brasil',
complement: '<string>'
}
})
};
fetch('https://api.useaira.com/v1/payment-accounts/{id}', 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.useaira.com/v1/payment-accounts/{id}",
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([
'customerId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'legalEntity' => [
'businessName' => '<string>',
'taxId' => '01234567000189',
'customFields' => [
'customField1' => 'value1',
'customField2' => [
'value2',
'value3'
]
],
'tradeName' => '<string>',
'emails' => [
],
'zipCode' => '<string>',
'street' => '<string>',
'number' => '<string>',
'neighborhood' => '<string>',
'city' => '<string>',
'country' => 'Brasil',
'complement' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <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.useaira.com/v1/payment-accounts/{id}"
payload := strings.NewReader("{\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"legalEntity\": {\n \"businessName\": \"<string>\",\n \"taxId\": \"01234567000189\",\n \"customFields\": {\n \"customField1\": \"value1\",\n \"customField2\": [\n \"value2\",\n \"value3\"\n ]\n },\n \"tradeName\": \"<string>\",\n \"emails\": [],\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"Brasil\",\n \"complement\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<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.put("https://api.useaira.com/v1/payment-accounts/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"legalEntity\": {\n \"businessName\": \"<string>\",\n \"taxId\": \"01234567000189\",\n \"customFields\": {\n \"customField1\": \"value1\",\n \"customField2\": [\n \"value2\",\n \"value3\"\n ]\n },\n \"tradeName\": \"<string>\",\n \"emails\": [],\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"Brasil\",\n \"complement\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.useaira.com/v1/payment-accounts/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"legalEntity\": {\n \"businessName\": \"<string>\",\n \"taxId\": \"01234567000189\",\n \"customFields\": {\n \"customField1\": \"value1\",\n \"customField2\": [\n \"value2\",\n \"value3\"\n ]\n },\n \"tradeName\": \"<string>\",\n \"emails\": [],\n \"zipCode\": \"<string>\",\n \"street\": \"<string>\",\n \"number\": \"<string>\",\n \"neighborhood\": \"<string>\",\n \"city\": \"<string>\",\n \"country\": \"Brasil\",\n \"complement\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archivedAt": "2023-11-07T05:31:56Z",
"legalEntity": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"businessName": "<string>",
"taxId": "01234567000189",
"taxIdType": "cnpj",
"customFields": {
"customField1": "value1",
"customField2": [
"value2",
"value3"
]
},
"tradeName": "<string>",
"emails": [],
"zipCode": "<string>",
"street": "<string>",
"number": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"state": "AC",
"country": "Brasil",
"complement": "<string>"
}
}{
"message": "<string>",
"code": "<string>",
"details": {},
"causations": [
{
"message": "<string>",
"code": "<string>",
"details": {}
}
]
}{
"message": "<string>"
}Authorizations
API Key Authentication.
Path Parameters
The unique identifier of the payment account in our system.
Body
application/json
Response
Schema representing a payment account.
The unique identifier of the payment account in our system.
The unique identifier of the customer that owns the payment account.
Archive timestamp for payment accounts that were archived.
Schema representing a legal entity: the registered company or person behind payment accounts and issued invoices.
Show child attributes
Show child attributes