Criar Contas em Lote

Essa funcionalidade permite que os clientes da Celcoin consigam realizar a abertura de diversas contas BaaS para seus clientes.

  1. Contas PF
  2. Contas PJ

🚧

Importante

O Limite de contas por chamada é de 1000;


1. Contas PF

Passos para Integrar

  1. Realizar autenticação na API - [API Reference]
  2. Criar Contas PF na API - [API Reference]
  3. Receber o Webhook com o status da abertura de conta, você receberá 1 webhook para cada conta, no caso de um JSON com 10 registro, você receberá 10 Webhooks.

Caso seja necessário você pode consultar uma conta para saber se ela foi criada com sucesso.


Criar Contas PF

JSON de exemplo

{
   "bulkData":[
      {
         "clientCode":"8e11caf4-024c-4e53-924b-9905704e775d",
         "accountOnboardingType":"BANKACCOUNT",
         "documentNumber":"18139538914",
         "phoneNumber":"+5541966669801",
         "email":"[email protected]",
         "motherName":"Cassandra Bradtke",
         "fullName":"Darryl Watsica",
         "socialName":"Marjolaine",
         "birthDate":"31-12-2000",
         "address":{
            "postalCode":"31987027",
            "street":"Antwon Junctions",
            "number":"80343897",
            "addressComplement":"Gaston Springs",
            "neighborhood":"Shaun Alley",
            "city":"Treutelchester",
            "state":"SP"
         },
         "isPoliticallyExposedPerson":false
      },
      {
         "clientCode":"35c66a3e-a296-44fd-83bd-f6584595b001",
         "accountOnboardingType":"BANKACCOUNT",
         "documentNumber":"28139538914",
         "phoneNumber":"+5541966669802",
         "email":"[email protected]",
         "motherName":"Bruce Heathcote",
         "fullName":"Joan Murphy",
         "socialName":"Lane",
         "birthDate":"31-12-2000",
         "address":{
            "postalCode":"14999627",
            "street":"Retta Rue",
            "number":"89160756",
            "addressComplement":"Rebecca Mews",
            "neighborhood":"Bergnaum Flats",
            "city":"Macyshire",
            "state":"SP"
         },
         "isPoliticallyExposedPerson":true
      }
   ]
}

cURL da chamada

curl --location --request POST 'https://sandbox.openfinance.celcoin.dev/baas-onboarding/v1/account/natural-person/create/bulk' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data-raw '{
   "bulkData":[
      {
         "clientCode":"8e11caf4-024c-4e53-924b-9905704e775d",
         "accountOnboardingType":"BANKACCOUNT",
         "documentNumber":"18139538914",
         "phoneNumber":"+5541966669801",
         "email":"[email protected]",
         "motherName":"Cassandra Bradtke",
         "fullName":"Darryl Watsica",
         "socialName":"Marjolaine",
         "birthDate":"31-12-2000",
         "address":{
            "postalCode":"31987027",
            "street":"Antwon Junctions",
            "number":"80343897",
            "addressComplement":"Gaston Springs",
            "neighborhood":"Shaun Alley",
            "city":"Treutelchester",
            "state":"SP"
         },
         "isPoliticallyExposedPerson":false
      },
      {
         "clientCode":"35c66a3e-a296-44fd-83bd-f6584595b001",
         "accountOnboardingType":"BANKACCOUNT",
         "documentNumber":"28139538914",
         "phoneNumber":"+5541966669802",
         "email":"[email protected]",
         "motherName":"Bruce Heathcote",
         "fullName":"Joan Murphy",
         "socialName":"Lane",
         "birthDate":"31-12-2000",
         "address":{
            "postalCode":"14999627",
            "street":"Retta Rue",
            "number":"89160756",
            "addressComplement":"Rebecca Mews",
            "neighborhood":"Bergnaum Flats",
            "city":"Macyshire",
            "state":"SP"
         },
         "isPoliticallyExposedPerson":true
      }
   ]
}'

Exemplo de retorno

👍

Sucesso 200

{
  "version": "1.0.0",
  "status": "PROCESSING",
  "body": {
    "message": "Os dados foram recebidos em 29/12/2022 às 13:00:00 e estão em processamento. Aguarde o recebimento via webhook de cada onboarding solicitado."
  }
}

❗

Error 400

{
  "version": "1.0.0",
  "status": "ERROR",
  "error": {
    "errorCode": "CIE999",
    "message": "Ocorreu um erro interno durante a chamada da api.."
  }
}

Tabela de errorCode

CodeMessage
CBE195bulkData é obrigatório.
CBE196bulkData não deve ultrapassar 1000 registros de onboarding.

Webhook de Retorno

{
   "entity":"onboarding-create",
   "createTimestamp":"2023-01-09T16:52:29.7283554",
   "status":"CONFIRMED",
   "body":{
      "account":{
         "branch":"0001",
         "account":"30053912916684",
         "name":"Rickey Jerde",
         "documentNumber":"38139538914"
      },
      "onboardingId":"74b76ddd-9092-49dc-a53f-8abbb7e56491",
      "clientCode":"dfc20f02-6cc6-49ab-8c31-b4e5720a057e",
      "createDate":"2023-01-09T16:52:29.7283554"
   },
   "error":null
}

Status da abertura de conta

RetornoDescrição
PROCESSINGAbertura de conta ainda em processamento.
CONFIRMEDAbertura de conta finalizada com sucesso.
ERRORAbertura de conta finalizada com erro, favor verificar o objeto 'error' do payload.

Consultar Conta pelo DocumentNumber

cURL da Chamada:

curl --location --request GET 'https://sandbox.openfinance.celcoin.dev/baas-accountmanager/v1/account/fetch?DocumentNumber=21503446026' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{token}}'

Modelo de Retorno

{
    "body": {
        "statusAccount": "ATIVO",
        "documentNumber": "21503446026",
        "phoneNumber": "+5512381175556",
        "email": "[email protected]",
        "clientCode": "12332191",
        "motherName": "julia Sobrenome",
        "fullName": "julia Sobrenome",
        "socialName": "Nome",
        "birthDate": "31-12-1984",
        "address": {
            "postalCode": "12211400",
            "street": "Av Paulista",
            "number": "313",
            "addressComplement": "Em frente ao parque.",
            "neighborhood": "Bairro",
            "city": "São Paulo",
            "state": "SP",
            "longitude": "-46.6488",
            "latitude": "-23.6288"
        },
        "isPoliticallyExposedPerson": false,
        "account": {
            "branch": "0001",
            "account": "30053912916536"
        },
        "createDate": "2023-01-05T14:13:32"
    },
    "version": "1.0.0",
    "status": "SUCCESS"
}

2. Contas PJ

Passos para Integrar

  1. Realizar autenticação na API - [API Reference]
  2. Criar Contas PJ na API - [API Reference]
  3. Receber o Webhook com o status da abertura de conta, você receberá 1 webhook para cada conta, no caso de um JSON com 10 registro, você receberá 10 Webhooks.

Caso seja necessário você pode consultar uma conta para saber se ela foi criada com sucesso.


2.Criar Contas PJ

JSON de exemplo

{
  "bulkData": [
    {
      "clientCode": "123456",
      "accountOnboardingType": "BANKACCOUNT",
      "documentNumber": "56461227000199",
      "contactNumber": "+551239215555",
      "businessEmail": "[email protected]",
      "businessName": "IP Pagamentos",
      "tradingName": "IPay",
      "owner": [
        {
          "documentNumber": "56461227123",
          "fullName": "Carlos Henrique da Silva",
          "phoneNumber": "+5512981175554",
          "email": "[email protected]",
          "motherName": "Celia Regina",
          "socialName": "Carlos",
          "birthDate": "31-12-1984",
          "address": {
            "postalCode": "12211400",
            "street": "Rua das Andorinhas",
            "number": "313",
            "addressComplement": "Em frente ao parque.",
            "neighborhood": "Rua das Maravilhas",
            "city": "São Paulo",
            "state": "SP",
            "longitude": "-46.6488",
            "latitude": "-23.6288"
          },
          "isPoliticallyExposedPerson": false
        }
      ],
      "businessAddress": {
        "postalCode": "12211400",
        "street": "Rua das Andorinhas",
        "number": "313",
        "addressComplement": "Em frente ao parque.",
        "neighborhood": "Rua das Maravilhas",
        "city": "São Paulo",
        "state": "SP",
        "longitude": "-46.6488",
        "latitude": "-23.6288"
      },
      "cadastraChavePix": false
    }
  ]
}

cURL da chamada

curl --location --request POST 'https://sandbox.openfinance.celcoin.dev/baas-onboarding/v1/account/business/create/bulk' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{token}}' \
--data-raw '{
  "bulkData": [
    {
      "clientCode": "123456",
      "accountOnboardingType": "BANKACCOUNT",
      "documentNumber": "56461227000199",
      "contactNumber": "+551239215555",
      "businessEmail": "[email protected]",
      "businessName": "IP Pagamentos",
      "tradingName": "IPay",
      "owner": [
        {
          "documentNumber": "56461227123",
          "fullName": "Carlos Henrique da Silva",
          "phoneNumber": "+5512981175554",
          "email": "[email protected]",
          "motherName": "Celia Regina",
          "socialName": "Carlos",
          "birthDate": "31-12-1984",
          "address": {
            "postalCode": "12211400",
            "street": "Rua das Andorinhas",
            "number": "313",
            "addressComplement": "Em frente ao parque.",
            "neighborhood": "Rua das Maravilhas",
            "city": "São Paulo",
            "state": "SP",
            "longitude": "-46.6488",
            "latitude": "-23.6288"
          },
          "isPoliticallyExposedPerson": false
        }
      ],
      "businessAddress": {
        "postalCode": "12211400",
        "street": "Rua das Andorinhas",
        "number": "313",
        "addressComplement": "Em frente ao parque.",
        "neighborhood": "Rua das Maravilhas",
        "city": "São Paulo",
        "state": "SP",
        "longitude": "-46.6488",
        "latitude": "-23.6288"
      },
      "cadastraChavePix": false
    }
  ]
}'

Exemplo de retorno

👍

Sucesso 200

{
  "version": "1.0.0",
  "status": "PROCESSING",
  "body": {
    "message": "Os dados foram recebidos em 29/12/2022 às 13:00:00 e estão em processamento. Aguarde o recebimento via webhook de cada onboarding solicitado."
  }
}

❗

Error 400

{
  "version": "1.0.0",
  "status": "ERROR",
  "error": {
    "errorCode": "CIE999",
    "message": "Ocorreu um erro interno durante a chamada da api.."
  }
}

Tabela de errorCode

CodeMessage
CBE195bulkData é obrigatório.
CBE196bulkData não deve ultrapassar 1000 registros de onboarding.

Webhook de Retorno

{
   "entity":"onboarding-create",
   "createTimestamp":"2023-01-09T17:17:25.1661907",
   "status":"CONFIRMED",
   "body":{
      "account":{
         "branch":"0001",
         "account":"30053912916700",
         "name":"Schuster - Wilderman",
         "documentNumber":"00012140532300"
      },
      "onboardingId":"aa6454dc-cb86-4255-ab9d-b2ec71004338",
      "clientCode":"d1afd321-344b-4a91-aecb-b66006417386",
      "createDate":"2023-01-09T17:17:25.1661907"
   },
   "error":null
}

Status da abertura de conta

RetornoDescrição
PROCESSINGAbertura de conta ainda em processamento.
CONFIRMEDAbertura de conta finalizada com sucesso.
ERRORAbertura de conta finalizada com erro, favor verificar o objeto 'error' do payload.

Consultar Conta pelo DocumentNumber

cURL da Chamada:

curl --location --request GET 'https://sandbox.openfinance.celcoin.dev/baas-accountmanager/v1/account/fetch-business?DocumentNumber=21503446026' \
--header 'accept: application/json' \
--header 'authorization: Bearer {{token}}'

Modelo de Retorno

{
  "version": "1.0.0",
  "status": "SUCCESS",
  "body": {
    "statusAccount": "ATIVO",
    "documentNumber": "87683664000180",
    "clientCode": "123456",
    "businessPhoneNumber": "+5512981175554",
    "businessEmail": "[email protected]",
    "createDate": "2022-08-01T10:00:01.0000000",
    "businessName": "IP Pagamentos",
    "tradingName": "IPay",
    "owner": {
      "documentNumber": "34335125070",
      "phoneNumber": "+5512981175554",
      "email": "[email protected]",
      "fullName": "Iago Daniel Souza",
      "socialName": "Iago Souza",
      "birthDate": "15-07-1986",
      "motherName": "Maria Eduarda",
      "address": {
        "postalCode": "12211400",
        "street": "Rua das Andorinhas",
        "number": "371",
        "addressComplement": "Próximo a lanchonete do zeca",
        "neighborhood": "Vila Zizinha",
        "city": "São José dos Campos",
        "state": "SP",
        "longitude": "-46.6488",
        "latitude": "-23.6288"
      },
      "isPoliticallyExposedPerson": false
    },
    "businessAccount": {
      "branch": "1234",
      "account": "123456"
    },
    "businessAddress": {
      "postalCode": "12211400",
      "street": "Rua das Andorinhas",
      "number": "371",
      "addressComplement": "Próximo a lanchonete do zeca",
      "neighborhood": "Vila Zizinha",
      "city": "São José dos Campos",
      "state": "SP",
      "longitude": "-46.6488",
      "latitude": "-23.6288"
    }
  }
}