Skip to main content
All use cases
White-label / EmbedFintechs

Your brand and your app, with CodeSpar's payments underneath.

A fintech (Fintera, in this example) wants its subscribers to pay boletos and Pix bills inside its own app. On CodeSpar, each subscriber is a consumer of Fintera's organization: codespar_kyc onboarding opens the subscriber's payment account through Celcoin (CPF, or CNPJ for a business), and codespar_pay pays a Pix or an existing boleto from that account. Fintera's app is the interface; CodeSpar runs the payments underneath.

See the prices and applicable conditions on the pricing page.

BeforePayment flows outside your app
AfterSubscribers pay inside your app, as your organization's consumers
org → consumers
each subscriber a consumer of your organization
Try it in the Sandbox
org
Your organization
Each subscriber is a consumer scoped to it
codespar_kyc
Onboarding
Opens the subscriber's payment account through Celcoin: CPF or CNPJ
Pix · boleto
Payments
codespar_pay pays a Pix or an existing boleto
statement
History
codespar_wallet action=statement lists each subscriber's entries
Illustrative example · demo data

One organization, many subscribers.

An example with demo data: Fintera's organization, its subscribers as consumers, and the Pix and boleto payments they made from their own accounts in August.

  • Each subscriber is a consumer of Fintera's organization
  • The subscriber's account is opened through codespar_kyc onboarding
  • Each payment comes from the subscriber's own account

Show me August's payments for Fintera's subscribers.

Listing August's payments across Fintera's consumers.

Subscriber payments · example
org_fintera · 2026-08
Example
Organizationorg_fintera
Subscribers41,200
RailsPix + boleto
Paid withcodespar_pay
payments-2026-08.csv
✓ exampleorg_fintera
The pain

The conversation is the easy part.

Consumer fintechs that want bill payment end up rebuilding onboarding, accounts and payments around a processor, outside the app their subscribers already use.

Send subscribers to another app to pay a bill

Subscribers pay inside your app, with CodeSpar underneath

Build onboarding and accounts from scratch

codespar_kyc onboarding opens each subscriber's payment account

Build a payment integration per rail

codespar_pay pays a Pix or an existing boleto

Rebuild each subscriber's history

codespar_wallet action=statement lists the subscriber's entries

How the agent does it

Your organization, your subscribers as consumers.

Each subscriber is a consumer of your organization. codespar_kyc with check_type onboarding (CPF) or onboarding-business (CNPJ) opens the subscriber's payment account through Celcoin; codespar_pay pays a Pix or an existing boleto from it; codespar_wallet reads the balance and the statement. Your app is the interface.

01
Sign up
Your app

In your app

02
Onboard
codespar_kyc

Payment account, CPF or CNPJ

Celcoin
03
Pay
codespar_pay

Pix or boleto

codespar_pay
04
Statement
codespar_wallet

The subscriber's entries

Wallet
05
Show
Your app

History in your app

Architecture

Your organization holds your subscribers as consumers. codespar_kyc opens each consumer's payment account at Celcoin (onboarding for a CPF, onboarding-business for a CNPJ), returning a verification to poll until the account exists. codespar_pay pays from that account: a Pix to a key or a copia-e-cola, or an existing boleto by its line, with an idempotency key. codespar_wallet reads the consumer's balance and statement for your app.

In code

The code, and what it assumes.

white-label-monetization.ts
// Prerequisites: CODESPAR_API_KEY set to a test key (csk_test_…), a Celcoin
// connection, and a subscriber (sub_8821) whose payment account was opened with
// codespar_kyc (check_type "onboarding"; see the meta-tool reference for its fields).
import { CodeSpar } from "@codespar/sdk";

const session = await new CodeSpar().create("sub_8821", { preset: "brazilian" });

// the subscriber pays an existing boleto from their own account
const pay = await session.execute("codespar_pay", {
  action: "pay",
  method: "boleto",
  linha_digitavel: "<the boleto's 47-digit line>",
  amount: 12_990, // centavos
  currency: "BRL",
  description: "Electricity bill",
  consumer_id: "sub_8821",
  idempotency_key: "bill-8821-2026-08", // required for a boleto
});
console.log(pay.success, pay.data);

// the subscriber's history, for your app
const statement = await session.execute("codespar_wallet", { action: "statement", consumer_id: "sub_8821", limit: 20 });
console.log(statement.data);

Example with the published SDK (@codespar/sdk 0.16.11). Its prerequisites are in the comments. Compiling does not prove the integration: run it in test mode first.

Featured tools
codespar_kyc

Opens the subscriber's payment account through Celcoin: onboarding (CPF) or onboarding-business (CNPJ).

codespar_pay

Pays a Pix or an existing boleto from the subscriber's account.

codespar_wallet

Reads the subscriber's balance and statement.

See the meta-tool reference
MCP servers wired

Start with a test key.

Test keys are free. Open the sandbox, connect the providers your project uses and see which tools it can call before you build.

White-label monetization — CodeSpar | CodeSpar