Skip to content
Proud to collaborate with Microsoft for Startups

bling.settle-payable ​

Convenience wrapper: settles a payable by creating an EXPENSE lançamento at Bling and refreshing the parent payable.

Overview ​

PropertyValue
Workflow typeLinear
LibraryApp-bling
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
connection_uuiduuidYes——
payable_uuiduuidNo——
payable_external_refstringNo——
amountstringYes——
posted_datestringNo——
competence_datestringNo——
descriptionstringNo——
document_numberstringNo——
payment_method_external_refstringNo——
financial_category_external_refstringNo——
bank_account_external_refstringNo——
idempotency_keystringNo——
actorstringNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes——
connection_uuiduuidYes——
payable_uuiduuidNo——
payable_external_refstringNo——
amountstringYes——
posted_datestringNo——
competence_datestringNo——
descriptionstringNo——
document_numberstringNo——
payment_method_external_refstringNo——
financial_category_external_refstringNo——
bank_account_external_refstringNo——
idempotency_keystringNo——
actorstringNo——
resolved_payable_external_refstringNo——
journal_entry_uuiduuidNo——
journal_entry_external_refstringNo——
refreshed_payable_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 payable
resolvingNoNo—settleResolving Bling-side payable id
settlingNoNo—refreshCreating the lançamento at Bling
completedNoYesYes—Payable 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_PAYABLE_NO_REFProvide one of payable_uuid or payable_external_ref
BLING_SETTLE_PAYABLE_NOT_FOUNDNo commerce_entity row found for payable
BLING_SETTLE_PAYABLE_WRONG_TYPEcommerce_entity {uuid} is entity_type={entity_type!r}; settle-payable requires entity_type='payable'
BLING_SETTLE_FAILEDbling.create-journal-entry failed during settle:

API Usage ​

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

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