> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Use COB with Pix Lerian

> Create static BR Codes and immediate or due-date Pix collections in a Pix Lerian v1.0.0 test integration.

COB creates Pix payment payloads and tracks collection state. Use it with the supplied mock provider for v1.0.0 integration testing.

## Create a static BR Code

Use [Create static BR Code](/en/reference/interfaces/pix-lerian/cob/create-static-brcode) when you need a reusable BR Code. The returned resource contains the encoded payment payload. Keep its identifier and use [Get static BR Code](/en/reference/interfaces/pix-lerian/cob/get-static-brcode) or [List static BR Codes](/en/reference/interfaces/pix-lerian/cob/list-static-brcodes) to retrieve it later.

A static BR Code is not a collection settlement record. Use a collection when you need to track a charge lifecycle.

## Create an immediate collection

1. Call [Create immediate collection](/en/reference/interfaces/pix-lerian/cob/create-immediate-collection) with a new idempotency value.
2. Save the collection identifier, BR Code payload, location, and expiration returned by the API.
3. Read it through [Get immediate collection](/en/reference/interfaces/pix-lerian/cob/get-immediate-collection) or [List immediate collections](/en/reference/interfaces/pix-lerian/cob/list-immediate-collections).
4. The mock provider callback records payment only when its amount matches the immediate collection amount. An identical callback is a safe replay; conflicting payment data is not.
5. If the charge must end without payment, use [Cancel immediate collection](/en/reference/interfaces/pix-lerian/cob/cancel-immediate-collection). Cancelling an already cancelled collection returns the existing terminal result.

## Create a due-date collection

A due-date collection requires the due-date calendar and debtor data. It can also carry value modifiers such as fine, interest, abatement, or discount.

1. Call [Create due-date collection](/en/reference/interfaces/pix-lerian/cob/create-due-date-collection). The plugin validates the Pix key before it creates the collection.
2. Save the identifier and payment payload. Read it with [Get due-date collection](/en/reference/interfaces/pix-lerian/cob/get-due-date-collection), or find it through [List due-date collections](/en/reference/interfaces/pix-lerian/cob/list-due-date-collections).
3. Apply only the documented due-date revision contract when a permitted value modifier must change. It uses JSON Merge Patch; do not send a full replacement body by default.
4. Cancel through [Cancel due-date collection](/en/reference/interfaces/pix-lerian/cob/cancel-due-date-collection) when the collection must no longer be payable.

The collection callback is internal to the plugin. Your test client confirms payment by reading the public collection resource after the mock outcome, not by posting a payment callback itself.

## Avoid unsupported assumptions

This page covers static BR Codes and collections. For scheduled payments, see the scheduled-payment operations in the SPI API reference. This page does not establish a production provider path or native SPI messaging integration.
