Skip to main content

kobana dunning charges

Commands of kobana dunning charges. Every global option (Global options) applies here.

CommandHTTPDescription
charges bulk deleteDELETE /v1/charges/bulkBulk-delete charges
charges listGET /v1/chargesList charges
charges createPOST /v1/chargesCreate charge
charges bulk-assign-rulePOST /v1/charges/bulk-assign-ruleBulk-assign a collection rule
charges bulk-cancelPOST /v1/charges/bulk-cancelBulk-cancel charges
charges getGET /v1/charges/{id}Get charge
charges updatePUT /v1/charges/{id}Update charge
charges deleteDELETE /v1/charges/{id}Delete charge
charges notifyPOST /v1/charges/{id}/notifyNotify charge
charges settlement-pdfGET /v1/charges/{id}/settlement-pdfSettlement letter (PDF)

charges bulk delete​

Bulk-delete charges

kobana dunning charges bulk delete [OPTIONS]

DELETE /v1/charges/bulk

Deletes (soft delete, irreversible) up to 100 charges in one call, with the ids in the JSON body, cascading to related tasks and offers. A charge with associated records (notifications, interactions, negativations, protests) cannot be deleted and is returned in failed with has_related_records. Requires the delete access level (or all) — write is not enough. It replaced POST /charges/bulk-archive.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
idsarray<string (uuid)>yesTarget record IDs (1 to 100 per call). Duplicates are ignored.

More fields and nested objects: kobana schema dunning.charges.bulk.delete.

Responses

HTTPDescription
200Per-item result of the bulk deletion.
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

charges list​

List charges

kobana dunning charges list [OPTIONS]

GET /v1/charges

Lists the organization’s charges with pagination and filters. Past-due pending charges are promoted to overdue on read.

Query parameters

NameTypeRequiredDescription
pageintegernoPage number (starts at 1).
per_pageintegernoItems per page (max 100).
sort_bystringnoSort field (public snake_case name, e.g. due_date).
sort_orderstringnoSort direction (asc | desc). Values: asc, desc.
searchstringnoSearch by document number, description, external_id, customer name or document.
person_idstringnoFilter by a customer’s charges (UUID).
statusstringnoFilter by status. Accepts a single value or a comma-separated list (pending, paid, overdue, cancelled, negotiated, protested, negatived, written_off).
due_date_fromstringnoDue date from (inclusive, YYYY-MM-DD or ISO datetime).
due_date_tostringnoDue date to (inclusive, YYYY-MM-DD or ISO datetime).
includestringnoRelations to include in the response (person).

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
200Paginated charge list.
404Resource not found or outside your organization.
413Request body larger than 2 MB.

charges create​

Create charge

kobana dunning charges create [OPTIONS]

POST /v1/charges

Creates a charge for a customer. Without collection_rule_id, the organization’s default collection rule is applied. current_amount = original + interest + fine − discount; an already past-due charge starts as overdue.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
person_idstring (uuid)yesCustomer (debtor) of the charge.
original_amountnumberyesOriginal charge amount.
issue_datestringyesIssue date.
due_datestringyesDue date.
collection_rule_idstring (uuid)noCollection rule tracking the charge. If omitted on create, the organization’s default rule is used.
document_numberstringnoSource document number (invoice, contract, etc.).
descriptionstringnoFree-form charge description.
interest_amountnumbernoAccrued interest (default 0).
fine_amountnumbernoFine amount (default 0).
discount_amountnumbernoApplied discount (default 0).
statusstringnoStatus (pending | paid | overdue | cancelled | negotiated | protested | negatived | written_off). Values: pending, paid, overdue, cancelled, negotiated, protested, negatived, written_off.
payment_methodstringnoPayment method (boleto | pix | credit_card | transfer). Values: boleto, pix, credit_card, transfer, null.
barcodestringnoBoleto barcode/digitable line.
pix_emvstringnoPix copy-and-paste code (EMV).
payment_urlstring (uri)noPayment page URL.
external_idstringnoIdentifier in YOUR system (integration key).
custom_dataobjectnoAPI-consumer custom metadata. Limits: 64 KB serialized and 16 nesting levels.
custom_metadataobjectnoUser metadata (free-form JSON object, read-write). See custom_data for the legacy field on core resources.
tagsarray<string>noFree-form tags.
charge_policyobjectno

More fields and nested objects: kobana schema dunning.charges.create.

Responses

HTTPDescription
201Charge created.
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

charges bulk-assign-rule​

Bulk-assign a collection rule

kobana dunning charges bulk-assign-rule [OPTIONS]

POST /v1/charges/bulk-assign-rule

Applies a collection rule to up to 100 charges. Rule entry respects the engine idempotency: a charge with an active/paused enrollment keeps the current one. Only pending/overdue charges are eligible; the rest are returned in failed with invalid_status.

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
idsarray<string (uuid)>yesTarget record IDs (1 to 100 per call). Duplicates are ignored.
collection_rule_idstring (uuid)yesID of the collection rule to apply (must belong to the organization).

More fields and nested objects: kobana schema dunning.charges.bulk-assign-rule.

Responses

HTTPDescription
200Per-item result of the bulk rule assignment.
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

charges bulk-cancel​

Bulk-cancel charges

kobana dunning charges bulk-cancel [OPTIONS]

POST /v1/charges/bulk-cancel

Cancels up to 100 charges in one call. Each cancellation goes through the collection engine (validates the status transition, exits the enrollment and suppresses pending notifications). A partial result is not an error: non-cancellable items are returned in failed with a reason (not_found, invalid_status).

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
idsarray<string (uuid)>yesTarget record IDs (1 to 100 per call). Duplicates are ignored.

More fields and nested objects: kobana schema dunning.charges.bulk-cancel.

Responses

HTTPDescription
200Per-item result of the bulk cancellation.
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

charges get​

Get charge

kobana dunning charges get [ID] [OPTIONS]

GET /v1/charges/{id}

Returns a charge by ID. Use include=engine to receive engine telemetry (rule enrollment and step executions).

Path arguments: id

Query parameters

NameTypeRequiredDescription
includestringnoRelations to include in the response (person, engine — rule telemetry).

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
200Charge found.
404Resource not found or outside your organization.
413Request body larger than 2 MB.

charges update​

Update charge

kobana dunning charges update [ID] [OPTIONS]

PUT /v1/charges/{id}

Updates a charge’s data (partial). status, paid_amount and paid_at belong to the engine: resending the stored value is accepted, but changing them answers 422 ENGINE_MANAGED_FIELD — payments go through POST /charges/{id}/pay. The only transition accepted here is status: cancelled (409 if the current status does not allow it).

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
person_idstring (uuid)noCustomer (debtor) of the charge.
collection_rule_idstring (uuid)noCollection rule tracking the charge. If omitted on create, the organization’s default rule is used.
document_numberstringnoSource document number (invoice, contract, etc.).
descriptionstringnoFree-form charge description.
original_amountnumbernoOriginal charge amount.
interest_amountnumbernoAccrued interest (default 0).
fine_amountnumbernoFine amount (default 0).
discount_amountnumbernoApplied discount (default 0).
issue_datestringnoIssue date.
due_datestringnoDue date.
statusstringnoStatus (pending | paid | overdue | cancelled | negotiated | protested | negatived | written_off). Values: pending, paid, overdue, cancelled, negotiated, protested, negatived, written_off.
payment_methodstringnoPayment method (boleto | pix | credit_card | transfer). Values: boleto, pix, credit_card, transfer, null.
barcodestringnoBoleto barcode/digitable line.
pix_emvstringnoPix copy-and-paste code (EMV).
payment_urlstring (uri)noPayment page URL.
external_idstringnoIdentifier in YOUR system (integration key).
custom_dataobjectnoAPI-consumer custom metadata. Limits: 64 KB serialized and 16 nesting levels.
custom_metadataobjectnoUser metadata (free-form JSON object, read-write). See custom_data for the legacy field on core resources.
tagsarray<string>noFree-form tags.
charge_policyobjectno
paid_amountnumbernoAmount actually paid.
paid_atstringnoPayment date.
custom_data_modestringnoHow custom_data is applied on update: replace (default) overwrites the whole object; merge deep-merges the payload over the stored value — nested objects merge, scalars/arrays/null overwrite the key. Values: replace, merge.
custom_metadata_modestringnoHow the custom_metadata sent is reconciled with the stored value: replace (default) replaces the whole object; merge deep-merges — nested objects merge, scalars and arrays replace the key, and a key sent as null is stored as null (not removed). Update only. Values: replace, merge.

More fields and nested objects: kobana schema dunning.charges.update.

Responses

HTTPDescription
200Charge updated.
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

charges delete​

Delete charge

kobana dunning charges delete [ID] [OPTIONS]

DELETE /v1/charges/{id}

Soft-deletes a charge along with related tasks and offers. A charge with associated notifications, interactions, negativations or protests cannot be deleted (409).

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
204Charge deleted (returns a confirmation message).
404Resource not found or outside your organization.
409Conflict with the current resource state (or reused idempotency key).
413Request body larger than 2 MB.

charges notify​

Notify charge

kobana dunning charges notify [ID] [OPTIONS]

POST /v1/charges/{id}/notify

Creates a manual notification for the charge and queues it for processing. The recipient must be one of the person’s registered contacts (422 UNKNOWN_RECIPIENT otherwise). Updates last_notification_at; the rule progress (current_step) does not change — only the engine advances it.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Request body

NameTypeRequiredDescription
channelstringyesChannel (email | sms | whatsapp | voice | manual). Values: email, sms, whatsapp, voice, manual.
recipientstringyesRecipient: email for email, phone for sms/whatsapp/voice — always a registered contact of the charge’s person; free-form for manual.
bodystringyesMessage body.
subjectstringnoSubject (used for email).
collection_rule_step_idstring (uuid)noStep of the charge’s collection rule to associate with the notification (a label; does not change current_step).

More fields and nested objects: kobana schema dunning.charges.notify.

Responses

HTTPDescription
201Notification created and queued (queued status).
400Invalid request (validation error).
404Resource not found or outside your organization.
413Request body larger than 2 MB.

charges settlement-pdf​

Settlement letter (PDF)

kobana dunning charges settlement-pdf [ID] [OPTIONS]

GET /v1/charges/{id}/settlement-pdf

Generates the charge’s settlement letter as a PDF (legal document), scoped to the organization. Allowed only when the charge is paid (status paid); otherwise returns 409 (CHARGE_NOT_SETTLED). Responds with application/pdf as a binary attachment.

Path arguments: id

Headers

NameTypeRequiredDescription
X-Workspace-IdstringnoWorkspace the call acts on (id or public_id, listed by GET /v1/workspaces). Optional while the organization has a single workspace; with two or more, omitting it is 400 WORKSPACE_REQUIRED. A workspace of another organization is 403 UNKNOWN_WORKSPACE.

Responses

HTTPDescription
200Settlement letter PDF (binary application/pdf attachment).
404Resource not found or outside your organization.
409Charge is not settled — the letter can only be generated for paid status (code CHARGE_NOT_SETTLED).
413Request body larger than 2 MB.