1. Integration Guide
Kapitale
  • Integration Guide
    • ๐Ÿ“‹ Introduction
    • ๐Ÿ” Authentication
    • ๐Ÿš€ Integration Flow
    • ๐Ÿ”” Webhooks
    • ๐Ÿ”„ Integration Flowchart
    • ๐Ÿงช Sandbox Environment
    • ๐Ÿ“Š Status Map
    • โš ๏ธ Error Handling
    • ๐Ÿ“ Practical Examples
    • ๐Ÿ’ณ Receivable Consultation
    • ๐Ÿช Retail Pre-Register
    • ๐Ÿ“ž Support
  • API
    • Retail
      • Fetch retail information by CNPJ
      • Retail Pre-Register
    • Orders
      • Create a new order
      • List orders
      • Fetch order by ID
      • Set payment invoice
      • Cancel order
    • Receivable
      • Fetch receivables by CNPJ
  • Schemas
    • CreateOrderRequest
    • RetailInfo
    • Acquirer
    • PreRegisterRetailRequest
    • CancelOrderRequest
    • PurchaseItem
    • CompanyResponse
    • Order
    • FindReceivableResponse
    • OrderStatus
    • PaymentStatus
    • FindByIndustryCnpjResponse
    • OrderStatistics
    • Error
    • ReceivableItem
  1. Integration Guide

๐Ÿช Retail Pre-Register

This document describes how to pre-register a retail company (varejista) through the Partners API. Use this endpoint when the retail is not yet registered with Kapitale and you need to onboard them before creating orders or consulting receivables.

Endpoint#

Method: POST
Path: /retail/pre-register
Required scope: partner-can/retail.create
Content-Type: multipart/form-data

Authentication#

All requests must include a valid OAuth2 bearer token in the Authorization header:
The industry context is resolved from the partner credentials associated with the token (M2M). The retail will be linked to that industry.

Form Fields#

FieldTypeRequiredDescription
retail_cnpjstringYesRetail CNPJ (validated; digits with or without mask).
retail_representative_namestringYesLegal representative full name.
retail_representative_emailstringYesRepresentative e-mail address.
retail_representative_cpfstringYesRepresentative CPF (11 digits).
retail_representative_phonestringYesRepresentative phone (Brazilian format: DDD + 9 digits).
social_contractfileYesArticles of incorporation (PDF, JPG, JPEG, or PNG; max 10 MB).
representative_id_documentfileYesRepresentative ID (RG or CNH front; PDF, JPG, JPEG, or PNG; max 10 MB).

Request Example#

Success Response (200)#

Returns the created company record (partial example):
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "cnpj": "12345678000190",
  "name": "Empresa Varejo LTDA",
  "email": "contato@varejo.com.br",
  "phone": "11987654321",
  "created_by_industry": true,
  "status": "waiting"
}

What Happens on Success#

1.
Company data is fetched from the credit bureau (Procob) using the CNPJ.
2.
The legal representative user is created or updated in Kapitale.
3.
Documents are stored and sent to the receivable provider for quotation.
4.
The company is marked as created by the industry partner (created_by_industry: true).

Error Responses#

CodeMeaningRecommended Action
400Bad RequestCheck CNPJ, CPF, e-mail, phone, or file type/size.
401UnauthorizedCheck token validity, expiration, and scope (partner-can/retail.create).
404Not FoundCNPJ not found or invalid in the credit bureau.
409ConflictCNPJ already registered, user rejected, or missing representative document.
500Internal Server ErrorContact support.

Recommended Flow#

1.
GET /company/cnpj/{cnpj} โ€” if registered_retail is false, call pre-register.
2.
POST /retail/pre-register โ€” onboard the retail with required documents.
3.
GET /receivable/{cnpj} โ€” consult receivables (requires registration).
4.
POST /order โ€” create payment orders.
See also Integration Flow and Receivable Consultation.

โš ๏ธ Points of Attention#

The CNPJ must not already exist in Kapitale; otherwise the API returns 409.
Only PDF, JPG, JPEG, and PNG files are accepted (max 10 MB per file).
Receivable consultation (GET /receivable/{cnpj}) is only available after the client is registered with Kapitale.
Modified atย 2026-06-10 16:14:48
Previous
๐Ÿ’ณ Receivable Consultation
Next
๐Ÿ“ž Support
Built with