Understand how a boleto behaves after creation, from the embedded Pix QR code and the document lifecycle to webhooks, due dates, refunds and rate limits.
This guide collects the behaviors of a Trio boleto that go beyond creating the document: the embedded Pix QR code, payer data, the lifecycle, webhooks, due date versus expiration date, refunds and rate limits. It complements the Create a boleto guide and does not replace the Create boleto API reference. All endpoints use the sandbox base URL https://api.sandbox.trio.com.br.
Every boleto created through Trio also carries an embedded Pix QR code. The payer chooses between paying with the traditional boleto data (barcode or digitable line) or through Pix.
When the boleto is paid through its Pix QR code, the in document Trio creates for the payment (the receivable, returned by GET /v2/documents/in/{id}) has the type pix_boleto. The document type tells the two payment methods apart: boleto and pix_boleto are distinct values of the enum.The payment is delivered through the in_document webhook with:
{ "type": "pix_boleto"}
This lets you tell a payment made through the boleto’s Pix QR code from a traditional boleto payment.Best practice: treat type = pix_boleto as a payment that originated through Pix, and keep reconciling by id and external_id.
The counterparty object carries the address fields the boleto document needs:
address
district
city
state
postal_code
All of them are required at creation, together with name and tax_number. In the response, the payer comes back as counterparty.id, the identifier Trio assigns to it.
No. Trio does not validate whether the address in counterparty exists or matches the payer. The fields are there to fill in the information the document requires. Even so, send the payer’s real and correct data whenever you have it.Best practice: do not use generic addresses or made-up data just to satisfy the schema. If your checkout does not collect an address today, decide how you will obtain it before issuing boletos.
Webhooks are registered through POST /v2/webhooks. The api_version field (v100 or v200) sets the version of the event payloads you receive. The examples below are from version v100; the events overview lists the available events.The in_document webhook communicates events related to receiving the boleto.When the boleto is paid through the embedded Pix, the type you receive is:
pix_boleto
The external_id you sent when creating the boleto also comes back in the webhooks.
No. There is no webhook event whose only purpose is to tell you a boleto has expired. Track expiration in your own integration when you need it.After the expiration_date, the boleto status changes to:
expired
Best practice: keep a polling routine for documents you need to follow until expiration, especially when your business must tell customers about overdue or expired boletos. Read the boleto with GET /v2/in/boletos/{id}.
Sep 10 ─────────────── Sep 30 ↑ ↑Due date Expiration │ │ │ └─ No longer accepts payment │ └─ From this date, the configured interest and fine may apply
So a boleto can still be paid after its due date, as long as it is within the validity period set by expiration_date.
The original boleto is cancelled and a new one is created with the same fields, the new amount and the new due date (or the current due date, when due_detail is omitted). The response is 201 with the new boleto, which has a new id.Best practice: when you recreate a boleto, replace the id, barcode, digitable_line and boleto_url stored in your system, and discard those of the cancelled boleto.
POST /v2/documents/in/{id}/refund applies to transactions that originated through Pix. This includes a boleto that was paid through its Pix QR code.
POST /v2/documents/in/{id}/refund
The {id} is the identifier of the in document (the payment, returned by GET /v2/documents/in/{id}), not the id of the boleto. The body carries the amount in cents (BRL 100.00 = 10000) and a description:
Boleto ↓Traditional payment ↓Do not use /refund as a Pix refund
Boleto paid through the Pix QR code
Boleto ↓Pix QR code ↓Pix payment (type = pix_boleto) ↓/refund available
Best practice: when you implement a refund routine, identify the origin of the payment first. A boleto paid through Pix is a Pix transaction for refund purposes.
Agree the cost per boleto directly with Trio’s commercial team. This matters most for operations that work with:
installment books (carnês, a series of boletos for one order);
multiple installments;
several boletos issued in advance;
high issuing volumes.
Do not assume the cost from the number of paid or unpaid boletos alone; validate the commercial terms of your project. This cost is separate from the fee you can charge the payer in options.fee, described in Fees.
Boleto creation follows the default rate limit of the create route: 60 requests per second. See Rate limit.Beyond that limit there is no specific cap on how many boletos you can issue. You can, for example, create the installments of an installment book in sequence.
Each boleto must have an external_id that is unique within your operation. The field takes up to 40 characters.Example:
{ "external_id": "pedido-123-parcela-01"}
{ "external_id": "pedido-123-parcela-02"}
{ "external_id": "pedido-123-parcela-03"}
Avoid reusing the same external_id for different boletos.
In installment books, put the installment number in the external_id. It simplifies reconciliation, tracking and finding the right boleto in your system. GET /v2/in/boletos accepts an external_id filter.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Documentation","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/trio-372e8dab/93Kz5zeq9leNAs-j/images/LOGO_TRIO-02.png?fit=max\u0026auto=format\u0026n=93Kz5zeq9leNAs-j\u0026q=85\u0026s=1cf0ec2d074438cb2e0a6ac1d66db4f9","dark":"https://mintcdn.com/trio-372e8dab/93Kz5zeq9leNAs-j/images/LOGO_TRIO_Prancheta1.png?fit=max\u0026auto=format\u0026n=93Kz5zeq9leNAs-j\u0026q=85\u0026s=9b412ec26f2e68ec5734e75b5363223a","href":"https://www.trio.com.br/"},"favicon":{"light":"https://mintcdn.com/trio-372e8dab/fUAB1jI_-7Nq6WNd/images/favicon-32x32.png?fit=max\u0026auto=format\u0026n=fUAB1jI_-7Nq6WNd\u0026q=85\u0026s=02e84f8cdce49974f6bd250833fbf98d","dark":"https://mintcdn.com/trio-372e8dab/fUAB1jI_-7Nq6WNd/images/favicon-32x32.png?fit=max\u0026auto=format\u0026n=fUAB1jI_-7Nq6WNd\u0026q=85\u0026s=02e84f8cdce49974f6bd250833fbf98d"},"api":{"mdx":{"auth":{"method":"basic"}}},"navbar":{"links":[{"href":"https://suporte.trio.com.br/","label":"Support"}],"primary":{"type":"button","label":"App Trio Sandbox","href":"https://app.sandbox.trio.com.br/"}},"footer":{"socials":{"linkedin":"https://br.linkedin.com/company/trio-fin"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"trio-372e8dab","hasAudioNarration":false,"actualSubdomain":"trio-372e8dab","customDomains":["docs.trio.com.br"],"gitSource":{"type":"github","owner":"triohq","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adf69a197503f50adc66f00","collectionId":"e0177391-3341-4c23-a54c-c655765b35ef","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adf69a197503f50adc66f00"},"feedback":{"thumbs":false,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6adf69a197503f50adc66f00","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"API reference","count":239},{"language":"default","tag":"Banking API","count":239},{"language":"default","tag":"Receivables","count":96},{"language":"default","tag":"Guides","count":51},{"language":"default","tag":"Payments","count":46},{"language":"default","tag":"Get Started","count":43},{"language":"default","tag":"Cards","count":35},{"language":"default","tag":"Webhooks","count":29},{"language":"default","tag":"Documents","count":29},{"language":"default","tag":"Pix","count":27}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"v2/guides/boleto/best-practices","slug":"/v2/guides/boleto/best-practices","pageMetadata":{"title":"Boleto best practices","description":"Understand how a boleto behaves after creation, from the embedded Pix QR code and the document lifecycle to webhooks, due dates, refunds and rate limits.","href":"/v2/guides/boleto/best-practices"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Understand how a boleto behaves after creation, from the embedded Pix QR code and the document lifecycle to webhooks, due dates, refunds and rate limits.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`This guide collects the behaviors of a Trio boleto that go beyond creating the document: the embedded Pix QR code, payer data, the lifecycle, webhooks, due date versus expiration date, refunds and rate limits. It complements the `,_jsx(_components.a,{href:`/v2/guides/boleto/create-boleto`,children:`Create a boleto`}),` guide and does not replace the `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/boletos/post`,children:`Create boleto`}),` API reference. All endpoints use the sandbox base URL `,_jsx(_components.code,{children:`https://api.sandbox.trio.com.br`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`hybrid-boleto-boleto-and-pix`,children:`Hybrid boleto: boleto and Pix`}),`\n`,_jsx(_components.p,{children:`Every boleto created through Trio also carries an embedded Pix QR code. The payer chooses between paying with the traditional boleto data (barcode or digitable line) or through Pix.`}),`\n`,_jsx(Heading,{level:`3`,id:`getting-the-pix-code-of-a-boleto`,children:`Getting the Pix code of a boleto`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /v2/in/boletos`}),` does not return the BR code (the Pix copy-and-paste code) directly. After creating the boleto:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Take the `,_jsx(_components.code,{children:`id`}),` returned in `,_jsx(_components.code,{children:`data.id`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Read the QR code with `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/pix/qrcode-dynamic/get`,children:_jsx(_components.code,{children:`GET /v2/in/pix/qrcodes/{id}`})}),`, using that same `,_jsx(_components.code,{children:`id`}),`.`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v2/in/pix/qrcodes/{id}`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The BR code comes in the `,_jsx(_components.code,{children:`data.hash`}),` field of the response.`]}),`\n`,_jsx(Heading,{level:`3`,id:`identifying-a-payment-made-through-pix`,children:`Identifying a payment made through Pix`}),`\n`,_jsxs(_components.p,{children:[`When the boleto is paid through its Pix QR code, the in document Trio creates for the payment (the receivable, returned by `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/documents/receivables/get-receivable`,children:_jsx(_components.code,{children:`GET /v2/documents/in/{id}`})}),`) has the type `,_jsx(_components.code,{children:`pix_boleto`}),`. The document `,_jsx(_components.code,{children:`type`}),` tells the two payment methods apart: `,_jsx(_components.code,{children:`boleto`}),` and `,_jsx(_components.code,{children:`pix_boleto`}),` are distinct values of the enum.`]}),`\n`,_jsxs(_components.p,{children:[`The payment is delivered through the `,_jsx(_components.code,{children:`in_document`}),` webhook with:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pix_boleto\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`This lets you tell a payment made through the boleto’s Pix QR code from a traditional boleto payment.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Best practice:`}),` treat `,_jsx(_components.code,{children:`type = pix_boleto`}),` as a payment that originated through Pix, and keep reconciling by `,_jsx(_components.code,{children:`id`}),` and `,_jsx(_components.code,{children:`external_id`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`payer-data`,children:`Payer data`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`counterparty`}),` object carries the address fields the boleto document needs:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`address`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`district`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`city`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`state`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`postal_code`})}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`All of them are required at creation, together with `,_jsx(_components.code,{children:`name`}),` and `,_jsx(_components.code,{children:`tax_number`}),`. In the response, the payer comes back as `,_jsx(_components.code,{children:`counterparty.id`}),`, the identifier Trio assigns to it.`]}),`\n`,_jsx(Heading,{level:`3`,id:`is-the-address-validated`,children:`Is the address validated?`}),`\n`,_jsxs(_components.p,{children:[`No. Trio does not validate whether the address in `,_jsx(_components.code,{children:`counterparty`}),` exists or matches the payer. The fields are there to fill in the information the document requires. Even so, send the payer’s real and correct data whenever you have it.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Best practice:`}),` do not use generic addresses or made-up data just to satisfy the schema. If your checkout does not collect an address today, decide how you will obtain it before issuing boletos.`]}),`\n`,_jsx(Heading,{level:`2`,id:`boleto-lifecycle`,children:`Boleto lifecycle`}),`\n`,_jsxs(_components.p,{children:[`A boleto follows the document lifecycle Trio uses for every document, described in `,_jsx(_components.a,{href:`/v2/guides/pix/document-lifecycle`,children:`Document lifecycle`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Created`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ↓`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Confirmed`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ↓`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Settled`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`main-statuses`,children:`Main statuses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`created`})}),_jsx(_components.td,{children:`Boleto created`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`confirmed`})}),_jsx(_components.td,{children:`Boleto registered and confirmed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`settled`})}),_jsx(_components.td,{children:`Boleto paid (settled)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`onhold`})}),_jsx(_components.td,{children:`Boleto on hold`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`refunded`})}),_jsx(_components.td,{children:`Boleto payment refunded`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed`})}),_jsx(_components.td,{children:`Boleto processing failed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`cancelled`})}),_jsxs(_components.td,{children:[`Boleto cancelled (through `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/boletos/cancel`,children:_jsx(_components.code,{children:`POST /v2/in/boletos/{id}/cancel`})}),` or by recreation)`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`settled`}),` is the status of a paid boleto.`]}),`\n`,_jsxs(_components.p,{children:[`After the `,_jsx(_components.code,{children:`expiration_date`}),`, the boleto moves to `,_jsx(_components.code,{children:`expired`}),` and can no longer be paid.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Do not treat the existence of a boleto as confirmation of payment. Confirm payment from the settlement status or event your integration receives.`})}),`\n`,_jsx(Heading,{level:`2`,id:`webhooks`,children:`Webhooks`}),`\n`,_jsxs(_components.p,{children:[`Webhooks are registered through `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/developers/webhooks/create-webhook`,children:_jsx(_components.code,{children:`POST /v2/webhooks`})}),`. The `,_jsx(_components.code,{children:`api_version`}),` field (`,_jsx(_components.code,{children:`v100`}),` or `,_jsx(_components.code,{children:`v200`}),`) sets the version of the event payloads you receive. The examples below are from version `,_jsx(_components.code,{children:`v100`}),`; the `,_jsx(_components.a,{href:`/v2/webhooks/events/overview`,children:`events overview`}),` lists the available events.`]}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`in_document`}),` webhook communicates events related to receiving the boleto.`]}),`\n`,_jsxs(_components.p,{children:[`When the boleto is paid through the embedded Pix, the `,_jsx(_components.code,{children:`type`}),` you receive is:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`pix_boleto`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`external_id`}),` you sent when creating the boleto also comes back in the webhooks.`]}),`\n`,_jsx(Heading,{level:`3`,id:`does-expiration-trigger-a-webhook`,children:`Does expiration trigger a webhook?`}),`\n`,_jsx(_components.p,{children:`No. There is no webhook event whose only purpose is to tell you a boleto has expired. Track expiration in your own integration when you need it.`}),`\n`,_jsxs(_components.p,{children:[`After the `,_jsx(_components.code,{children:`expiration_date`}),`, the boleto status changes to:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`expired`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Best practice:`}),` keep a polling routine for documents you need to follow until expiration, especially when your business must tell customers about overdue or expired boletos. Read the boleto with `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/boletos/get`,children:_jsx(_components.code,{children:`GET /v2/in/boletos/{id}`})}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`due-date-versus-expiration-date`,children:`Due date versus expiration date`}),`\n`,_jsx(_components.p,{children:`The two fields have different roles.`}),`\n`,_jsx(Heading,{level:`3`,id:`due-date`,children:`Due date`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`due_date`}),` is the due date of the boleto. After it, the configured charges may apply:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`fine;`}),`\n`,_jsx(_components.li,{children:`interest.`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`expiration-date`,children:`Expiration date`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`expiration_date`}),` is the payment deadline of the boleto.`]}),`\n`,_jsxs(_components.p,{children:[`After it, the boleto stops accepting payments and moves to `,_jsx(_components.code,{children:`expired`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`due_date: 2026-09-10`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`expiration_date: 2026-09-30`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`In this scenario:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Sep 10 ─────────────── Sep 30`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ↑ ↑`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Due date Expiration`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │ └─ No longer accepts payment`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` │`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` └─ From this date, the configured`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` interest and fine may apply`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`So a boleto can still be paid after its due date, as long as it is within the validity period set by `,_jsx(_components.code,{children:`expiration_date`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`updating-the-due-date`,children:`Updating the due date`}),`\n`,_jsxs(_components.p,{children:[`Update the due date of a boleto with `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/boletos/update`,children:_jsx(_components.code,{children:`PUT /v2/in/boletos/{id}`})}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`PUT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v2/in/boletos/{id}`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"due_detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"due_date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-16\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`When you change the due date:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`due_detail`}),` is updated;`]}),`\n`,_jsxs(_components.li,{children:[`the response is `,_jsx(_components.code,{children:`204 No Content`}),` with no body: read `,_jsx(_components.code,{children:`GET /v2/in/boletos/{id}`}),` to see the updated data;`]}),`\n`,_jsxs(_components.li,{children:[`the `,_jsx(_components.code,{children:`barcode`}),` does not change;`]}),`\n`,_jsx(_components.li,{children:`the Pix QR code does not change.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Only the due date can be changed through this endpoint. To change the amount, recreate the boleto as described below.`}),`\n`,_jsx(Heading,{level:`3`,id:`changing-the-amount-recreation`,children:`Changing the amount: recreation`}),`\n`,_jsxs(_components.p,{children:[`To change the amount of a boleto, use `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/boletos/recreate`,children:_jsx(_components.code,{children:`POST /v2/in/boletos/{id}/recreate`})}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v2/in/boletos/{id}/recreate`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"due_detail\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"due_date\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-12-16\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The original boleto is cancelled and a new one is created with the same fields, the new amount and the new due date (or the current due date, when `,_jsx(_components.code,{children:`due_detail`}),` is omitted). The response is `,_jsx(_components.code,{children:`201`}),` with the new boleto, which has a new `,_jsx(_components.code,{children:`id`}),`.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Best practice:`}),` when you recreate a boleto, replace the `,_jsx(_components.code,{children:`id`}),`, `,_jsx(_components.code,{children:`barcode`}),`, `,_jsx(_components.code,{children:`digitable_line`}),` and `,_jsx(_components.code,{children:`boleto_url`}),` stored in your system, and discard those of the cancelled boleto.`]}),`\n`,_jsx(Heading,{level:`3`,id:`cancellation`,children:`Cancellation`}),`\n`,_jsxs(_components.p,{children:[`Cancel a boleto with `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/boletos/cancel`,children:_jsx(_components.code,{children:`POST /v2/in/boletos/{id}/cancel`})}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v2/in/boletos/{id}/cancel`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The response is `,_jsx(_components.code,{children:`204 No Content`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`protest`,children:`Protest`}),`\n`,_jsx(_components.p,{children:`The API also lets you add and remove the protest of a boleto:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`PUT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v2/in/boletos/{id}/protest/add`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`PUT`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v2/in/boletos/{id}/protest/remove`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Both respond `,_jsx(_components.code,{children:`204 No Content`}),`. See the `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/boletos/add-protest`,children:`Add protest`}),` and `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/boletos/remove-protest`,children:`Remove protest`}),` references.`]}),`\n`,_jsx(Heading,{level:`3`,id:`overdue-versus-expired-boleto`,children:`Overdue versus expired boleto`}),`\n`,_jsx(_components.p,{children:`There is an important difference:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Overdue boleto:`}),` its due date can still be updated.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Expired boleto:`}),` it can no longer be updated.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Best practice:`}),` if your business renegotiates boletos, make the change before the document reaches the expired state.`]}),`\n`,_jsx(Heading,{level:`2`,id:`refunding-a-boleto`,children:`Refunding a boleto`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/pix/refunds/post`,children:_jsx(_components.code,{children:`POST /v2/documents/in/{id}/refund`})}),` applies to transactions that originated through Pix. This includes a boleto that was paid through its Pix QR code.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`http`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`http`,children:_jsxs(_components.code,{language:`http`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /v2/documents/in/{id}/refund`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`{id}`}),` is the identifier of the in document (the payment, returned by `,_jsx(_components.code,{children:`GET /v2/documents/in/{id}`}),`), not the `,_jsx(_components.code,{children:`id`}),` of the boleto. The body carries the amount in cents (BRL 100.00 = `,_jsx(_components.code,{children:`10000`}),`) and a description:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Refund description\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The response returns the identifier of the refund, which is created asynchronously:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"in_refund_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01a12175-3994-6649-4e0b-f645e45459ea\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Read the refund with `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/documents/receivables-refunds/get-receivable-refund`,children:_jsx(_components.code,{children:`GET /v2/documents/in/refunds/{id}`})}),` to follow its details and final state.`]}),`\n`,_jsx(Heading,{level:`3`,id:`examples`,children:`Examples`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Boleto paid through the digitable line`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Boleto`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ↓`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Traditional payment`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ↓`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Do not use /refund as a Pix refund`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Boleto paid through the Pix QR code`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Boleto`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ↓`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Pix QR code`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ↓`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Pix payment (type = pix_boleto)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ↓`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`/refund available`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Best practice:`}),` when you implement a refund routine, identify the origin of the payment first. A boleto paid through Pix is a Pix transaction for refund purposes.`]}),`\n`,_jsx(Heading,{level:`2`,id:`boleto-url`,children:`Boleto URL`}),`\n`,_jsxs(_components.p,{children:[`When you create a boleto, the API returns a `,_jsx(_components.code,{children:`boleto_url`}),`. You can hand this URL directly to the payer. The link:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`is public;`}),`\n`,_jsx(_components.li,{children:`requires no authentication;`}),`\n`,_jsx(_components.li,{children:`suits e-mails, checkout pages and apps.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Example:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`https://receipts.sandbox.trio.com.br/.../boleto/...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Best practice:`}),` store the `,_jsx(_components.code,{children:`boleto_url`}),` with the boleto record in your system, so you can reach it quickly when talking to the customer.`]}),`\n`,_jsx(Heading,{level:`2`,id:`costs`,children:`Costs`}),`\n`,_jsx(_components.p,{children:`Agree the cost per boleto directly with Trio’s commercial team. This matters most for operations that work with:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`installment books (`,_jsx(_components.em,{children:`carnês`}),`, a series of boletos for one order);`]}),`\n`,_jsx(_components.li,{children:`multiple installments;`}),`\n`,_jsx(_components.li,{children:`several boletos issued in advance;`}),`\n`,_jsx(_components.li,{children:`high issuing volumes.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Do not assume the cost from the number of paid or unpaid boletos alone; validate the commercial terms of your project. This cost is separate from the fee you can charge the payer in `,_jsx(_components.code,{children:`options.fee`}),`, described in `,_jsx(_components.a,{href:`/v2/guides/receivables/fees`,children:`Fees`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`rate-limit-and-installment-books`,children:`Rate limit and installment books`}),`\n`,_jsxs(_components.p,{children:[`Boleto creation follows the default rate limit of the create route: 60 requests per second. See `,_jsx(_components.a,{href:`/v2/developers/rate-limit`,children:`Rate limit`}),`.`]}),`\n`,_jsx(_components.p,{children:`Beyond that limit there is no specific cap on how many boletos you can issue. You can, for example, create the installments of an installment book in sequence.`}),`\n`,_jsxs(Heading,{level:`3`,id:`keep-external_id-unique`,children:[`Keep `,_jsx(_components.code,{children:`external_id`}),` unique`]}),`\n`,_jsxs(_components.p,{children:[`Each boleto must have an `,_jsx(_components.code,{children:`external_id`}),` that is unique within your operation. The field takes up to 40 characters.`]}),`\n`,_jsx(_components.p,{children:`Example:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pedido-123-parcela-01\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pedido-123-parcela-02\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"external_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pedido-123-parcela-03\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Avoid reusing the same `,_jsx(_components.code,{children:`external_id`}),` for different boletos.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`In installment books, put the installment number in the `,_jsx(_components.code,{children:`external_id`}),`. It simplifies reconciliation, tracking and finding the right boleto in your system. `,_jsx(_components.a,{href:`/v2/api-reference/banking-api/receivables/boletos/list`,children:_jsx(_components.code,{children:`GET /v2/in/boletos`})}),` accepts an `,_jsx(_components.code,{children:`external_id`}),` filter.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`recommended-practices`,children:`Recommended practices`}),`\n`,_jsx(_components.p,{children:`For a safer and more predictable integration:`}),`\n`,_jsxs(Heading,{level:`3`,id:`use-external_id-for-reconciliation`,children:[`Use `,_jsx(_components.code,{children:`external_id`}),` for reconciliation`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`external_id`}),` should be a reference your system knows, such as an order, an invoice or an installment.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Order 123`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ├── Installment 01 → pedido-123-parcela-01`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` ├── Installment 02 → pedido-123-parcela-02`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:` └── Installment 03 → pedido-123-parcela-03`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`do-not-confuse-due-date-with-expiration-date`,children:`Do not confuse due date with expiration date`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`due_date`}),` says when the boleto is due. `,_jsx(_components.code,{children:`expiration_date`}),` says until when it can be paid. They are different concepts.`]}),`\n`,_jsx(Heading,{level:`3`,id:`do-not-rely-on-webhooks-alone-to-control-expiration`,children:`Do not rely on webhooks alone to control expiration`}),`\n`,_jsx(_components.p,{children:`There is no “boleto expired” webhook. If your application must act when a boleto expires, keep your own control or read the document status.`}),`\n`,_jsx(Heading,{level:`3`,id:`handle-both-payment-methods`,children:`Handle both payment methods`}),`\n`,_jsx(_components.p,{children:`The same boleto can be paid:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`through the digitable line or barcode;`}),`\n`,_jsx(_components.li,{children:`through the embedded Pix QR code.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`Your reconciliation must be ready for both.`}),`\n`,_jsx(Heading,{level:`3`,id:`identify-the-origin-of-the-payment`,children:`Identify the origin of the payment`}),`\n`,_jsx(_components.p,{children:`For payments through the boleto’s Pix QR code, the in document and the webhook carry:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`type: pix_boleto`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(_components.p,{children:`Use it to separate traditional payments from Pix payments.`}),`\n`,_jsx(Heading,{level:`3`,id:`respect-the-rate-limit`,children:`Respect the rate limit`}),`\n`,_jsx(_components.p,{children:`For batch issuing, such as installment books, pace your requests within the limit of 60 requests per second.`}),`\n`,_jsx(Heading,{level:`3`,id:`store-the-important-identifiers`,children:`Store the important identifiers`}),`\n`,_jsx(_components.p,{children:`For each boleto, keep at least:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`the Trio `,_jsx(_components.code,{children:`id`}),`;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`external_id`}),`;`]}),`\n`,_jsxs(_components.li,{children:[`the amount (`,_jsx(_components.code,{children:`amount.amount`}),`, in cents);`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`due_date`}),`;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`expiration_date`}),`;`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`boleto_url`}),`;`]}),`\n`,_jsx(_components.li,{children:`the current status.`}),`\n`]}),`\n`,_jsx(_components.p,{children:`This simplifies support, reconciliation and payment tracking.`}),`\n`,_jsx(Heading,{level:`2`,id:`quick-summary`,children:`Quick summary`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Topic`}),_jsx(_components.th,{children:`Behavior`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Embedded Pix`}),_jsx(_components.td,{children:`Yes, every boleto has a Pix QR code`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`BR code (copy and paste)`}),_jsxs(_components.td,{children:[`Read with `,_jsx(_components.code,{children:`GET /v2/in/pix/qrcodes/{id}`}),`, field `,_jsx(_components.code,{children:`data.hash`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Payment through Pix`}),_jsxs(_components.td,{children:[`In document and `,_jsx(_components.code,{children:`in_document`}),` webhook with `,_jsx(_components.code,{children:`type = pix_boleto`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Paid boleto`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`settled`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Cancelled boleto`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`cancelled`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Expired boleto`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`expired`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Expiration webhook`}),_jsx(_components.td,{children:`No specific event`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`external_id`}),` in the webhook`]}),_jsx(_components.td,{children:`Yes`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Payer address`}),_jsx(_components.td,{children:`Required by the schema, but not validated`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[`Payment after `,_jsx(_components.code,{children:`due_date`})]}),_jsxs(_components.td,{children:[`Possible until the `,_jsx(_components.code,{children:`expiration_date`}),`, with the configured charges when applicable`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Updating an overdue boleto`}),_jsx(_components.td,{children:`Allowed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Updating an expired boleto`}),_jsx(_components.td,{children:`Not allowed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Due-date update response`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`204 No Content`}),`, no body`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Barcode after a due-date update`}),_jsx(_components.td,{children:`Does not change`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Pix QR code after a due-date update`}),_jsx(_components.td,{children:`Does not change`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Changing the amount`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`POST /v2/in/boletos/{id}/recreate`}),`: cancels the boleto and creates a new one`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Refund`}),_jsxs(_components.td,{children:[`Available when the payment originated through Pix, via `,_jsx(_components.code,{children:`POST /v2/documents/in/{id}/refund`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`boleto_url`})}),_jsx(_components.td,{children:`Public, no authentication`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Creation rate limit`}),_jsx(_components.td,{children:`60 requests per second`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Quantity limit`}),_jsx(_components.td,{children:`No additional issuing limit`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Installment books`}),_jsxs(_components.td,{children:[`Allowed, with a unique `,_jsx(_components.code,{children:`external_id`}),` per boleto`]})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/v2/guides/boleto/create-boleto`,children:`Create a boleto`}),`: build the request body.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/v2/guides/boleto/boleto-types`,children:`Boleto types`}),`: choose `,_jsx(_components.code,{children:`invoice_type`}),` and `,_jsx(_components.code,{children:`wallet_type`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/v2/guides/pix/document-lifecycle`,children:`Document lifecycle`}),`: statuses and stages of an in document.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/v2/webhooks/events/overview`,children:`Events`}),`: the webhook events you can receive.`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Boleto best practices","description":"Understand how a boleto behaves after creation, from the embedded Pix QR code and the document lifecycle to webhooks, due dates, refunds and rate limits.","href":"/v2/guides/boleto/best-practices"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Hybrid boleto: boleto and Pix","slug":"hybrid-boleto-boleto-and-pix","depth":2,"children":[{"title":"Getting the Pix code of a boleto","slug":"getting-the-pix-code-of-a-boleto","depth":3,"children":[]},{"title":"Identifying a payment made through Pix","slug":"identifying-a-payment-made-through-pix","depth":3,"children":[]}]},{"title":"Payer data","slug":"payer-data","depth":2,"children":[{"title":"Is the address validated?","slug":"is-the-address-validated","depth":3,"children":[]}]},{"title":"Boleto lifecycle","slug":"boleto-lifecycle","depth":2,"children":[{"title":"Main statuses","slug":"main-statuses","depth":3,"children":[]}]},{"title":"Webhooks","slug":"webhooks","depth":2,"children":[{"title":"Does expiration trigger a webhook?","slug":"does-expiration-trigger-a-webhook","depth":3,"children":[]}]},{"title":"Due date versus expiration date","slug":"due-date-versus-expiration-date","depth":2,"children":[{"title":"Due date","slug":"due-date","depth":3,"children":[]},{"title":"Expiration date","slug":"expiration-date","depth":3,"children":[]},{"title":"Example","slug":"example","depth":3,"children":[]}]},{"title":"Updating the due date","slug":"updating-the-due-date","depth":2,"children":[{"title":"Changing the amount: recreation","slug":"changing-the-amount-recreation","depth":3,"children":[]},{"title":"Cancellation","slug":"cancellation","depth":3,"children":[]},{"title":"Protest","slug":"protest","depth":3,"children":[]},{"title":"Overdue versus expired boleto","slug":"overdue-versus-expired-boleto","depth":3,"children":[]}]},{"title":"Refunding a boleto","slug":"refunding-a-boleto","depth":2,"children":[{"title":"Examples","slug":"examples","depth":3,"children":[]}]},{"title":"Boleto URL","slug":"boleto-url","depth":2,"children":[]},{"title":"Costs","slug":"costs","depth":2,"children":[]},{"title":"Rate limit and installment books","slug":"rate-limit-and-installment-books","depth":2,"children":[{"title":"Keep external_id unique","slug":"keep-external_id-unique","depth":3,"children":[]}]},{"title":"Recommended practices","slug":"recommended-practices","depth":2,"children":[{"title":"Use external_id for reconciliation","slug":"use-external_id-for-reconciliation","depth":3,"children":[]},{"title":"Do not confuse due date with expiration date","slug":"do-not-confuse-due-date-with-expiration-date","depth":3,"children":[]},{"title":"Do not rely on webhooks alone to control expiration","slug":"do-not-rely-on-webhooks-alone-to-control-expiration","depth":3,"children":[]},{"title":"Handle both payment methods","slug":"handle-both-payment-methods","depth":3,"children":[]},{"title":"Identify the origin of the payment","slug":"identify-the-origin-of-the-payment","depth":3,"children":[]},{"title":"Respect the rate limit","slug":"respect-the-rate-limit","depth":3,"children":[]},{"title":"Store the important identifiers","slug":"store-the-important-identifiers","depth":3,"children":[]}]},{"title":"Quick summary","slug":"quick-summary","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"trio-372e8dab","siteName":"Documentation","title":"Boleto best practices - Documentation","navMaps":{"firstHrefInVersion":{"V2":{"href":"/v2/guides/boleto/best-practices","matchLevel":0},"V1":{"href":"/v1","matchLevel":4}},"firstHrefInLanguage":{}},"lastModified":"2026-10-26T14:55:20.611Z","originalFileLocation":"v2/guides/boleto/best-practices.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Understand how a boleto behaves after creation, from the embedded Pix QR code and the document lifecycle to webhooks, due dates, refunds and rate limits.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Boleto best practices - Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Understand how a boleto behaves after creation, from the embedded Pix QR code and the document lifecycle to webhooks, due dates, refunds and rate limits.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.trio.com.br/v2/guides/boleto/best-practices\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://trio-372e8dab.mintlify.app/_mintlify/api/og/v2?division=Boleto\u0026amp;title=Boleto+best+practices\u0026amp;description=Understand+how+a+boleto+behaves+after+creation%2C+from+the+embedded+Pix+QR+code+and+the+document+lifecycle+to+webhooks%2C+due+dates%2C+refunds+and+rate+limits.\u0026amp;theme=a7af139e37e3767434f3134c\u0026amp;signature=127ac94d5ea97514980002a54afe1ef6e1f4070fa8cf916e795a1c8a2f1e919f\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Boleto best practices - Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Understand how a boleto behaves after creation, from the embedded Pix QR code and the document lifecycle to webhooks, due dates, refunds and rate limits.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://trio-372e8dab.mintlify.app/_mintlify/api/og/v2?division=Boleto\u0026amp;title=Boleto+best+practices\u0026amp;description=Understand+how+a+boleto+behaves+after+creation%2C+from+the+embedded+Pix+QR+code+and+the+document+lifecycle+to+webhooks%2C+due+dates%2C+refunds+and+rate+limits.\u0026amp;theme=a7af139e37e3767434f3134c\u0026amp;signature=127ac94d5ea97514980002a54afe1ef6e1f4070fa8cf916e795a1c8a2f1e919f\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/trio-372e8dab/rOBbojnXBM3FDhcZ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.trio.com.br/v2/guides/boleto/best-practices\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v2/guides/boleto/best-practices.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.trio.com.br/#organization\",\"name\":\"Documentation\",\"url\":\"https://docs.trio.com.br\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/trio-372e8dab/93Kz5zeq9leNAs-j/images/LOGO_TRIO-02.png?fit=max\u0026auto=format\u0026n=93Kz5zeq9leNAs-j\u0026q=85\u0026s=1cf0ec2d074438cb2e0a6ac1d66db4f9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.trio.com.br#website\",\"name\":\"Documentation\",\"url\":\"https://docs.trio.com.br\",\"publisher\":{\"@id\":\"https://docs.trio.com.br/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.trio.com.br/v2/guides/boleto/best-practices#webpage\",\"url\":\"https://docs.trio.com.br/v2/guides/boleto/best-practices\",\"name\":\"Boleto best practices\",\"description\":\"Understand how a boleto behaves after creation, from the embedded Pix QR code and the document lifecycle to webhooks, due dates, refunds and rate limits.\",\"dateModified\":\"2026-10-26T14:55:20.611Z\",\"isPartOf\":{\"@id\":\"https://docs.trio.com.br#website\"},\"breadcrumb\":{\"@id\":\"https://docs.trio.com.br/v2/guides/boleto/best-practices#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.trio.com.br/v2/guides/boleto/best-practices#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Receivables\",\"item\":\"https://docs.trio.com.br/v2/guides/receivables/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Boleto\",\"item\":\"https://docs.trio.com.br/v2/guides/boleto/create-boleto\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Boleto best practices\",\"item\":\"https://docs.trio.com.br/v2/guides/boleto/best-practices\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.trio.com.br/v2/guides/boleto/best-practices#article\",\"headline\":\"Boleto best practices\",\"name\":\"Boleto best practices\",\"description\":\"Understand how a boleto behaves after creation, from the embedded Pix QR code and the document lifecycle to webhooks, due dates, refunds and rate limits.\",\"url\":\"https://docs.trio.com.br/v2/guides/boleto/best-practices\",\"mainEntityOfPage\":{\"@id\":\"https://docs.trio.com.br/v2/guides/boleto/best-practices#webpage\"},\"dateModified\":\"2026-10-26T14:55:20.611Z\",\"publisher\":{\"@id\":\"https://docs.trio.com.br/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.trio.com.br#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Documentation","nav":{"global":null,"versions":[{"version":"V2","default":true,"tag":"Current","tabs":[{"tab":"Get Started","pages":[{"title":"Get Started","href":""}]},{"tab":"Guides","pages":[{"group":"Onboarding","pages":[{"title":"Customer onboarding","href":"/v2/guides/onboarding-guide"}]},{"group":"Receivables","pages":[{"title":"Receivables","href":"/v2/guides/receivables/overview"},{"title":"Cash in","href":"/v2/guides/receivables/cash-in"},{"group":"Pix","pages":[{"title":"QR code types","href":"/v2/guides/pix/qr-codes"},{"title":"Pix Automático","href":"/v2/guides/receivables/using-pix-automatic"}]},{"group":"Boleto","pages":[{"title":"Create a boleto","href":"/v2/guides/boleto/create-boleto"},{"title":"Boleto types","description":"Choose the invoice_type and wallet_type values that classify a boleto when you create it.","href":"/v2/guides/boleto/boleto-types"},{"title":"Boleto best practices","href":"/v2/guides/boleto/best-practices"}]},{"title":"Fees","description":"Charge a fee on the payment of a receivable and keep the margin above your Trio cost.","href":"/v2/guides/receivables/fees"},{"title":"Split payments","href":"/v2/guides/receivables/split-payments"},{"title":"Document lifecycle","href":"/v2/guides/pix/document-lifecycle"},{"title":"Simulate a successful deposit","href":"/v2/guides/receivables/simulating-deposit-success"},{"title":"Simulate deposit failures","href":"/v2/guides/receivables/simulating-deposit-failures"}]},{"group":"Payments","pages":[{"title":"Payments","href":"/v2/guides/payments/overview"},{"title":"Cash out","href":"/v2/guides/payments/cash-out"},{"title":"Pix key formats","href":"/v2/guides/pix/using-pix-key"}]},{"group":"Operations","pages":[{"title":"Integration best practices","href":"/v2/operations/best-practices"},{"title":"Closed-loop reconciliation","href":"/v2/operations/closed-loop"}]},{"group":"Trio MCP","pages":[{"title":"What is Trio MCP?","href":"/v2/mcp/what-is-trio-mcp"},{"title":"Connecting Trio MCP","href":"/v2/mcp/connecting"},{"title":"Supported tools","href":"/v2/mcp/tools"}]},{"group":"Trio SDK","pages":[{"title":"Trio SDK","href":"/v2/trio-sdk/introduction"},{"title":"Using the SDK","href":"/v2/trio-sdk/using-the-sdk"},{"title":"Local example","href":"/v2/trio-sdk/local-example"},{"group":"Flows","pages":[{"title":"PayIn flow","href":"/v2/trio-sdk/flows/payin"},{"title":"PayOut flow","href":"/v2/trio-sdk/flows/payout"}]}]}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/v2/api-reference/banking-api/onboarding/create"}]},{"tab":"FAQ","pages":[{"title":"FAQ","href":"/v2/faq/frequently-asked-questions"}]}]},{"version":"V1","tag":"Legacy","pages":[{"title":"V1","href":"/v1"}]}]},"title":"Boleto best practices - Documentation","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":[],"chunks":[]}