1. Integration Guide
Kapitale
  • Integration Guide
    • ๐Ÿ“‹ Introduction
    • ๐Ÿ” Authentication
    • ๐Ÿš€ Integration Flow
    • ๐Ÿ”” Webhooks
    • ๐Ÿ”„ Integration Flowchart
    • ๐Ÿงช Sandbox Environment
    • ๐Ÿ“Š Status Map
    • โš ๏ธ Error Handling
    • ๐Ÿ“ Practical Examples
    • ๐Ÿ’ณ Receivable Consultation
    • ๐Ÿ“ž Support
  • API
    • Retail
      • Fetch retail information by CNPJ
    • 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
    • CancelOrderRequest
    • PurchaseItem
    • Order
    • FindReceivableResponse
    • OrderStatus
    • PaymentStatus
    • FindByIndustryCnpjResponse
    • OrderStatistics
    • Error
    • ReceivableItem
  1. Integration Guide

๐Ÿ” Authentication

All API routes require authentication via Bearer Token JWT. The token must be obtained through the Kapitale OAuth2 authentication system using the client credentials flow.

Authentication Endpoint URLs#

EnvironmentURL
Productionhttps://partners-auth.kapitale.com.br/oauth2/token
Sandboxhttps://partners-auth-sandbox.kapitale.com.br/oauth2/token

OAuth Scopes#

Each endpoint requires a specific scope in the token:
ScopeEndpoints
partner-can/cnpj.readGET /company/cnpj/{cnpj}
partner-can/orders.createPOST /order
partner-can/orders.readGET /order, GET /order/{id}, PATCH /order/cancel/{order_id}
partner-can/orders.sentnfPATCH /order/invoice/{order_id}

How to obtain the token#

The API uses the OAuth2 Client Credentials flow. You will need client_id and client_secret provided by the Kapitale team.
Request parameters (application/x-www-form-urlencoded):
ParameterRequiredDescription
grant_typeYesMust be client_credentials
client_idYesYour client identifier
client_secretYesYour client secret
scopeYesSpace-separated list of scopes (e.g., partner-can/cnpj.read partner-can/orders.create partner-can/orders.read partner-can/orders.sentnf)
Example:
Replace {{client_id}} and {{client_secret}} with your credentials. Store them securely (e.g., environment variables) and never commit them to version control.
Example response:
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "expires_in": 3600,
  "token_type": "Bearer"
}
Use the access_token value in the Authorization header of your API requests.

How to use the token#

Include the token in the Authorization header of all requests:

Example of authenticated request#

Modified atย 2026-03-16 14:51:55
Previous
๐Ÿ“‹ Introduction
Next
๐Ÿš€ Integration Flow
Built with