Skip to content
Proud to collaborate with Microsoft for Startups

bling.settle-receivable ​

Convenience wrapper: settles a receivable by creating an INCOME lançamento at Bling and refreshing the parent receivable. Used by the Stripe webhook handler when a charge succeeds.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-bling
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
connection_uuiduuidYes——
receivable_uuiduuidNo—commerce_entity UUID of the receivable to settle
receivable_external_refstringNo—Bling-side receivable id (use if no commerce_entity row exists yet)
amountstringYes—Decimal as string
posted_datestringNo——
competence_datestringNo——
descriptionstringNo——
document_numberstringNo—External ref (Stripe charge id, NF number, etc.)
payment_method_external_refstringNo——
financial_category_external_refstringNo——
bank_account_external_refstringNo——
idempotency_keystringNo—Caller-provided key to dedupe retries (e.g. Stripe event id)
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
connection_uuiduuidYes——
receivable_uuiduuidNo—commerce_entity UUID of the receivable to settle
receivable_external_refstringNo—Bling-side receivable id (use if no commerce_entity row exists yet)
amountstringYes—Decimal as string
posted_datestringNo——
competence_datestringNo——
descriptionstringNo——
document_numberstringNo—External ref (Stripe charge id, NF number, etc.)
payment_method_external_refstringNo——
financial_category_external_refstringNo——
bank_account_external_refstringNo——
idempotency_keystringNo—Caller-provided key to dedupe retries (e.g. Stripe event id)
actorstringNo——
resolved_receivable_external_refstringNo——
journal_entry_uuiduuidNo—commerce_entity UUID of the created lançamento
journal_entry_external_refstringNo—Bling-side lançamento id
refreshed_receivable_statusstringNo——
refresh_skippedbooleanNo——
refresh_errorstringNo——
settled_atstringNo——
completed_atstringNo——
failure_reasonstringNo——
failed_atstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepjsonNo——
failed_layerjsonNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
initiatedYesNo—resolveSettle requested
refreshingNoNo—completeRe-fetching the parent receivable to surface new status
resolvingNoNo—settleResolving Bling-side receivable id
settlingNoNo—refreshCreating the lançamento at Bling
completedNoYesYes—Receivable settled
failedNoYesNo—Settle failed

State Diagram ​

Transitions ​

FromActionToDescription
initiatedresolveresolving—
resolvingsettlesettling—
settlingrefreshrefreshing—
refreshingcompletecompleted—
initiatedfailfailed—
resolvingfailfailed—
settlingfailfailed—
refreshingfailfailed—

Business Errors ​

CodeMessage Template
BLING_CONNECTION_NOT_FOUNDBling connection {connection_uuid} not found in organization
BLING_CONNECTION_WRONG_PROVIDERConnection {connection_uuid} is not a Bling connection
BLING_SETTLE_RECEIVABLE_NO_REFProvide one of receivable_uuid or receivable_external_ref
BLING_SETTLE_RECEIVABLE_NOT_FOUNDNo commerce_entity row found for receivable
BLING_SETTLE_RECEIVABLE_WRONG_TYPEcommerce_entity {uuid} is entity_type={entity_type!r}; settle-receivable requires entity_type='receivable'
BLING_SETTLE_FAILEDbling.create-journal-entry failed during settle:

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "bling.settle-receivable",
  "initial_data": {
    "organization_uuid": "value",
    "connection_uuid": "value",
    "amount": "value"
  }
}