Skip to main content

Bling

Native integration · Read-only (pull) · Syncs automatically every 60 min (configurable) + on demand · OAuth connection

Bling is an ERP widely used by small and medium-sized businesses in Brazil. Connected to Dunning, it brings the receivables and contacts from your Bling into the collection operation — the open charges become charges, and the contacts become people in your portfolio.

Prerequisites

  • A Bling account with contacts and receivables.
  • An OAuth application registered in Bling's developer portal, pointing to Dunning's callback URL (see the requirement below).

How to connect

:::note No dedicated panel screen (yet) Today only the Kobana Gateway has a ready connect screen in the panel. For this ERP, the connection is made through the API (/api/v1/integrations/... routes) — the steps below describe the authorization flow; the equivalent self-service screen in the panel is on the roadmap. :::

Bling uses OAuth2: you authorize access within the Bling account itself, without pasting tokens by hand.

  1. In Dunning, open Settings → Integrations and click Connect on Bling.
  2. Dunning generates a secure link and redirects you to Bling.
  3. In Bling, log in and review the consent screen with the requested access.
  4. Authorize Dunning's access.
  5. Bling sends you back to Dunning already connected — the tokens are stored encrypted and the integration is active, with the first sync right afterward.

From then on, the token is renewed automatically behind the scenes; you do not need to reconnect at each expiration.

Field mapping (source → Dunning)

Bling fieldDunning field
Receivable (contas/receber)Charge
valorOriginal amount
vencimentoDue date
dataEmissaoIssue date
dataPagamentoPayment date
numeroDocumentoDocument number
historicoDescription
linkBoletoDigitable line / payment URL
linkQRCodePixPix copy-and-paste
situacao 1 (open) / 7 (confirmed) / 3 (partial)pending (or overdue if past due)
situacao 2 (received)paid (settlement + exit from the collection rule)
situacao 5 (cancelled)cancelled
situacao 4 / 6 (returned)ignored (not a collection rule target)
Contact (contatos)Person in the portfolio
Contact's numeroDocumentoPerson's document
nomePerson's name

Synchronization

Synchronization is idempotent and runs in two ways: automatic (every 60 min by default) and manual (sync button). Contacts and receivables are synced in the same cycle.

What it does not do / limitations

  • Does not issue charges or write back to Bling — it is pull-only.
  • No webhooks. The Bling API does not expose receivable webhooks to applications, so payments and cancellations appear at most on the next sync cycle.
  • Accounts with returned/partially-returned status are left out, as they are not a collection target.

Requirement: OAuth application in Bling

For "Connect" to work, there must be an OAuth application registered in Bling's developer portal, pointing to Dunning's callback URL. That application's credentials (client ID and client secret) can be configured globally in the Dunning environment or provided per integration, in case each organization uses its own application. Without that application registered, the connection flow does not open — it is the enablement step that falls to whoever administers Bling.

Disconnecting or reauthorizing

If access is revoked in Bling (or you want to switch accounts), just redo the "Connect" — a new consent generates new tokens. While the connection is active, token renewal is automatic; you only reauthorize when the refresh token stops being valid.

Troubleshooting

  • The sync is out of date. Check the interval (default 60 min) and click Sync now.
  • The connection dropped. Access may have been revoked in Bling or the refresh token expired — redo the "Connect" to reauthorize.
  • A contact did not appear. The contact sync runs alongside the receivables sync; a contact with no charge is created when their first charge is synced.
  • A charge appears duplicated. Dunning deduplicates by externalId (bling:receivable:{id}); a real duplicate only occurs with the same charge coming from another source.
  • "Connect" does not open. The OAuth application registered in Bling is missing (or the app's credentials are not configured) — see the requirement above.

Security

The whole flow is protected: the authorization link carries a signed state (anti-CSRF) with single use, the tokens are encrypted at rest and the token calls are logged with the body redacted — code and secrets never appear in the log.