Subcontas ValidaPay

Criar subconta PJ

Com esta funcionalidade você pode criar subcontas Pessoa Jurídica na ValidaPay. Ao criar a subconta ela ficará associada à sua conta (chamaremos de conta Master).

Case de uso:

Como SaaS tenho vários Sellers, preciso gerar cobranças para esses Sellers e receber split em cada venda.

⚠️ Atenção: Não é possivel criar uma subconta com mesmo email e telefone da master account.

⚠️ Atenção: Dados de renda/faturamento no campo financialDetails são obrigatórios

POST/v1/proposals
Base URL Produção:https://api.validapay.com.br
Base URL Sandbox:https://sandbox.validapay.com.br

Authorizations

bearer

Authorization

string · header · required

Cabeçalho de autenticação Bearer no formato Bearer {{token}} onde {{token}} é o seu token OAuth2.

Escopos requeridos

proposals/write

Body

application/json

Content-Type:application/json
{
    "contactNumber": "+5511912345678",
    "documentNumber": "87649940000194",
    "businessEmail": "validapay@validapay.com.br",
    "businessName": "VaplidaPay",
    "tradingName": "validaPay LTDA",
    "companyType": "PJ",
    "owner": [
        {
            "ownerType": "SOCIO",
            "documentNumber": "72352781027",
            "fullName": "Cesar Lattes ",
            "phoneNumber": "+5511912345128",
            "email": "sociokyc@celcoin.com.br",
            "motherName": "Marie Curie",
            "socialName": "Nome",
            "birthDate": "02-02-1990",
            "address": {
                "postalCode": "06455030",
                "street": "Alameda Xingu",
                "number": "50",
                "addressComplement": "",
                "neighborhood": "Alphaville Industrial",
                "city": "Barueri",
                "state": "SP"
            },
            "isPoliticallyExposedPerson": false,
            "financialOwnerDetails": {
                "ownerDeclaredIncome": "ODIB02", 
                "ownerDeclaredRevenue": "ODRB02" 
              }
        }
    ],
    "businessAddress": {
        "postalCode": "06455030",
        "street": "Alamed Xingu",
        "number": "350",
        "addressComplement": "",
        "neighborhood": "Alphaville Industrial",
        "city": "Barueri",
        "state": "SP"
    },
    "webhookUrl": "https://api.teste.com.br" 
}

Schema

FieldTypeRequiredDescription
contactNumber
stringRequiredTelefone da empresa
documentNumber
stringRequiredCPF do sócio
businessEmail
stringRequiredemail da empresa
businessName
stringRequiredRazão social
tradingName
stringRequiredNome fantasia
companyType
stringRequiredPJ, MEI ou ME
owner[1]
array--
businessAddress
object--
webhookUrl
stringOptionalURL onde você gostaria de receber a notificação de criação de conta
const url = 'https://sandbox.validapay.com.br/v1/proposals';

const options = {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer {{token}}',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "contactNumber": "+5511912345678",
    "documentNumber": "87649940000194",
    "businessEmail": "validapay@validapay.com.br",
    "businessName": "VaplidaPay",
    "tradingName": "validaPay LTDA",
    "companyType": "PJ",
    "owner": [
        {
            "ownerType": "SOCIO",
            "documentNumber": "72352781027",
            "fullName": "Cesar Lattes ",
            "phoneNumber": "+5511912345128",
            "email": "sociokyc@celcoin.com.br",
            "motherName": "Marie Curie",
            "socialName": "Nome",
            "birthDate": "02-02-1990",
            "address": {
                "postalCode": "06455030",
                "street": "Alameda Xingu",
                "number": "50",
                "addressComplement": "",
                "neighborhood": "Alphaville Industrial",
                "city": "Barueri",
                "state": "SP"
            },
            "isPoliticallyExposedPerson": false,
            "financialOwnerDetails": {
                "ownerDeclaredIncome": "ODIB02", 
                "ownerDeclaredRevenue": "ODRB02" 
              }
        }
    ],
    "businessAddress": {
        "postalCode": "06455030",
        "street": "Alamed Xingu",
        "number": "350",
        "addressComplement": "",
        "neighborhood": "Alphaville Industrial",
        "city": "Barueri",
        "state": "SP"
    },
    "webhookUrl": "https://api.teste.com.br" 
})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));

Response Examples

201201
{
    "status": "UNFINISHED",
    "message": "Formulário criado com sucesso",
    "formId": "fb8cbb9d-d376-4604-940c-957e76e3dcbb"
}
200200
{
    "status": "FINISHED",
    "message": "Formulário criado com sucesso",
    "formId": "8f82a068-ff1a-45b7-8f98-71f07176e0dd"
}