Criar subconta
curl --request POST \
--url https://api.upag.io/v1/sub-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paymentMethodConfigurations": [
{}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({paymentMethodConfigurations: [{}]})
};
fetch('https://api.upag.io/v1/sub-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/sub-accounts';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({paymentMethodConfigurations: [{}]})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));Subcontas
Criar subconta
Abre subconta PF ou PJ em análise e retorna a chave secreta única
POST
https://api.upag.io
/
v1
/
sub-accounts
Criar subconta
curl --request POST \
--url https://api.upag.io/v1/sub-accounts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"paymentMethodConfigurations": [
{}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({paymentMethodConfigurations: [{}]})
};
fetch('https://api.upag.io/v1/sub-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.upag.io/v1/sub-accounts';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({paymentMethodConfigurations: [{}]})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));A subconta entra em revisão (KYC). Guarde o
Guarde
apiKey.secret — ele só é exibido na criação.
Pessoa física
curl -X POST https://api.upag.io/v1/sub-accounts \
-H "Authorization: Bearer sk_test_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"type": "individual",
"name": "João Silva",
"email": "joao@example.com",
"document": { "type": "cpf", "number": "39053344705" },
"phone": { "countryCode": "55", "areaCode": "11", "number": "999998888" },
"birthDate": "1990-01-01",
"motherName": "Maria Silva",
"publicPerson": false,
"address": {
"street": "Rua A",
"number": "10",
"complement": null,
"neighborhood": "Centro",
"city": "São Paulo",
"state": "SP",
"country": "BR",
"zip": "01001000"
}
}'
Pessoa jurídica
Envietype: "company" com legalName, tradingName, legalNature (mei, ltda, sa), constitutionDate, CNPJ, url, statementDescriptor, monthlyIncome (centavos), activity e representatives (array com sócios/representantes legais, CPF, endereço, role, ownershipPercentage, isLegalRepresentative).
Parâmetros comuns
array
Opcional — tarifas por método de pagamento na subconta.
Resposta
201 Created
Response
{
"id": "880e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"legalEntity": {
"id": "990e8400-e29b-41d4-a716-446655440000",
"type": "individual",
"status": "under_review",
"documentType": "cpf",
"documentNumber": "39053344705",
"legalName": null,
"tradingName": null,
"email": "joao@example.com",
"phone": { "countryCode": "55", "areaCode": "11", "number": "999998888" }
},
"account": {
"id": "880e8400-e29b-41d4-a716-446655440000",
"name": "João Silva",
"status": "pending",
"bankCode": null,
"branch": null,
"number": null,
"digit": null
},
"apiKey": {
"id": "aa0e8400-e29b-41d4-a716-446655440000",
"type": "secret",
"secret": "sk_test_abc123...",
"description": null,
"permissions": ["charge.read", "charge.write", "transfer.read", "transfer.write"],
"createdAt": "2026-03-18T10:00:00.000Z",
"updatedAt": "2026-03-18T10:00:00.000Z"
},
"paymentMethodConfigurations": [],
"createdAt": "2026-03-18T10:00:00.000Z",
"updatedAt": "2026-03-18T10:00:00.000Z"
}
apiKey.secret — exibido apenas nesta resposta.