Renegociation Flow
This guide explains how renegotiation works in the BNPL White-Label API: how a past-due customer settles all overdue installments in one PIX, with a discount, and how your app integrates with it — endpoints, webhooks, statuses, rules and error handling.
Overview
Renegotiation is a settlement with discount for customers who have overdue installments:
- The customer pays all overdue amounts in a single PIX.
- The discount is defined by Open Co on the overdue amount.
- When the PIX is paid, the overdue invoices are settled.
Key points:
| Topic | How it works |
|---|---|
| Who creates offers | Open Co. An offer can come from our Collections team (after talking to the customer) or from a campaign to past-due customers. Your app does not create offers: it shows them and lets the customer pay. |
| Scope of one agreement | Every past-due installment of the customer, across all orders (up to 50 contracts per agreement). An invoice is never included partially. |
| Contracts | No new contract. The original CCBs do not change. Installment, payment plan and application IDs stay the same. |
| Two issuance flows | Flow A, PIX at issuance: the renegotiation is created already in PENDING_PAYMENT, with the PIX generated and valid for 5 days; there is no accept step. Flow B, offer first: it is created in OFFERED, without a PIX, and the offer is valid for 5 days; the PIX is generated when the customer accepts. |
| Amount | Calculated on the day the renegotiation is created and fixed for its whole validity (5 days), in both flows. Late charges on the following days do not change it. |
| Time to pay | In both flows the PIX expires at the end of the 5 days from issuance. In flow B, accepting does not extend or shorten it: the PIX expires together with the offer. The customer can come back and get the same PIX until it expires. Always use expires_at. |
| Concurrency | A customer has at most one renegotiation in OFFERED or PENDING_PAYMENT at a time. |
Endpoints at a glance
| Method | Path | Purpose |
|---|---|---|
GET | /renegotiation | List a customer's renegotiations (filter by status, paginated) |
GET | /renegotiation/{renegotiation_id} | Get the offer or agreement, including the PIX while PENDING_PAYMENT |
POST | /renegotiation/{renegotiation_id}/accept | Customer accepts the offer (flow B); returns the PIX |
Webhooks sent to your webhook_url:
| Event | Purpose |
|---|---|
renegotiation.status_change | Every status change. The first one is the renegotiation created notification: OFFERED (flow B) or PENDING_PAYMENT (flow A) |
renegotiation.offer_updated | Variation, not in the standard flow: Open Co deliberately changed the amount and/or validity of an OFFERED offer |
payment.status_change | The agreement's PIX was paid (now carries renegotiation_id) |
invoice.status_change | Each included invoice was settled (carries the discount) |
Authentication is the same as the rest of the API (Authorization: Bearer <token>), and webhooks use the same X-Webhook-Signature. No new credentials are needed.
Renegotiation statuses
| Status | Meaning | Next statuses |
|---|---|---|
OFFERED | Flow B: Open Co created an offer, without a PIX, valid for 5 days. The customer has not accepted it yet. The amount is fixed from creation; Open Co only changes the offer in a variation of the flow (renegotiation.offer_updated). | PENDING_PAYMENT, RENEGOTIATION_OFFER_EXPIRED, CANCELLED |
PENDING_PAYMENT | The PIX exists and the amount is fixed. Flow A: created already in this status, PIX valid for 5 days. Flow B: the customer accepted, and the PIX expires together with the offer, after the 5 days. | PAID, RENEGOTIATION_PAYMENT_EXPIRED, CANCELLED |
PAID | The PIX was paid. The included invoices are settled. | Final |
RENEGOTIATION_OFFER_EXPIRED | (Flow B) The offer reached its 5-day validity without being accepted. Invoices are unchanged. | Final |
RENEGOTIATION_PAYMENT_EXPIRED | The PIX reached its validity without being paid. Invoices are unchanged. | Final |
CANCELLED | Cancelled by Open Co, for example because an installment was paid outside the agreement or a refund changed the amount due. | Final |
stateDiagram-v2
[*] --> PENDING_PAYMENT: Flow A, created with the PIX
[*] --> OFFERED: Flow B, Open Co creates the offer
OFFERED --> OFFERED: variation, offer changed by Open Co (amount / validity)
OFFERED --> PENDING_PAYMENT: customer accepts
OFFERED --> RENEGOTIATION_OFFER_EXPIRED: 5 days reached without acceptance
OFFERED --> CANCELLED: cancelled by Open Co
PENDING_PAYMENT --> PAID: PIX paid
PENDING_PAYMENT --> RENEGOTIATION_PAYMENT_EXPIRED: PIX not paid before it expires
PENDING_PAYMENT --> CANCELLED: cancelled by Open Co
PAID --> [*]
RENEGOTIATION_OFFER_EXPIRED --> [*]
RENEGOTIATION_PAYMENT_EXPIRED --> [*]
CANCELLED --> [*]
After RENEGOTIATION_OFFER_EXPIRED, RENEGOTIATION_PAYMENT_EXPIRED or CANCELLED, the installments go back to being regular overdue installments, and Open Co may create a new offer, with a new renegotiation_id.
Flow
Open Co can issue a renegotiation in two ways. Both end the same way: payment or expiry.
Flow A: PIX at issuance
sequenceDiagram
autonumber
participant OC as Open Co
participant APP as Your app
Note over OC: Collections or a campaign issues a renegotiation with the PIX
OC-->>APP: Webhook renegotiation.status_change (PENDING_PAYMENT)
APP->>OC: GET /renegotiation/{renegotiation_id}
OC-->>APP: Details + PIX + expires_at (5 days)
APP->>APP: Show the card with the PIX (no accept step)
Note over APP: Customer leaves and comes back
APP->>OC: GET /renegotiation?person_id=…&status=OFFERED,PENDING_PAYMENT
OC-->>APP: Same PIX + expires_at
alt Paid before the PIX expires
OC-->>APP: Webhook payment.status_change (PAID)
OC-->>APP: Webhook invoice.status_change (per invoice)
OC-->>APP: Webhook renegotiation.status_change (PAID)
else Not paid
OC-->>APP: Webhook renegotiation.status_change (RENEGOTIATION_PAYMENT_EXPIRED)
end
Step by step:
- Renegotiation created with the PIX. Open Co sends
renegotiation.status_changewithstatus: PENDING_PAYMENT. There is no separate "created" event: this is it. - Details and PIX. Your app calls
GET /renegotiation/{renegotiation_id}, which returns invoices, amounts, the discount, the PIX (pix) and its validity (expires_at, 5 days). - Pay. The customer pays the PIX. You do not call accept in this flow. If you do, you get 200 with the same PIX.
- Come back.
GET /renegotiation?person_id=…&status=OFFERED,PENDING_PAYMENTreturns the same renegotiation and the same PIX until it expires. - Result. Paid:
payment.status_change, oneinvoice.status_changeper invoice andrenegotiation.status_change(PAID). Not paid before the PIX expires:renegotiation.status_change(RENEGOTIATION_PAYMENT_EXPIRED).
Flow B: offer first
sequenceDiagram
autonumber
participant OC as Open Co
participant APP as Your app
Note over OC: Collections or a campaign creates an offer, without a PIX
OC-->>APP: Webhook renegotiation.status_change (OFFERED)
APP->>APP: Show the offer card
opt Variation: offer changed by Open Co
OC-->>APP: Webhook renegotiation.offer_updated
APP->>APP: Refresh the card
end
APP->>OC: GET /renegotiation/{renegotiation_id}
APP->>APP: Show offer details
APP->>OC: POST /renegotiation/{renegotiation_id}/accept
OC-->>APP: PIX + expires_at (same as the offer), status PENDING_PAYMENT
OC-->>APP: Webhook renegotiation.status_change (PENDING_PAYMENT)
Note over APP: Customer leaves and comes back
APP->>OC: GET /renegotiation?person_id=…&status=OFFERED,PENDING_PAYMENT
OC-->>APP: Same PIX + expires_at
alt Paid before the PIX expires
OC-->>APP: Webhook payment.status_change (PAID)
OC-->>APP: Webhook invoice.status_change (per invoice)
OC-->>APP: Webhook renegotiation.status_change (PAID)
else Not paid
OC-->>APP: Webhook renegotiation.status_change (RENEGOTIATION_PAYMENT_EXPIRED)
end
Step by step:
- Offer created. Open Co creates the offer (valid for 5 days) and sends
renegotiation.status_changewithstatus: OFFERED. There is no separate "created" event: this is it. - Show the card. Your app shows an offer card on the customer's installment page.
- Offer changed (optional, not in the standard flow). The amount is fixed from creation. In a possible variation, Open Co deliberately changes an
OFFEREDoffer (amount or validity) and you receiverenegotiation.offer_updated. Refresh the card, and the details if they are open. - Details.
GET /renegotiation/{renegotiation_id}returns invoices, orders, amounts and the discount. - Accept. The customer taps "pay with PIX" and your app calls
POST /renegotiation/{renegotiation_id}/accept. The PIX is generated and returned. - Come back. If the customer leaves and returns, call
GET /renegotiation?person_id=…&status=OFFERED,PENDING_PAYMENTto know which card to show. InPENDING_PAYMENTyou get the same PIX. - Payment. When the PIX is paid you receive
payment.status_change, oneinvoice.status_changeper settled invoice, andrenegotiation.status_change(PAID). - No acceptance or no payment. If the offer reaches its 5-day validity without being accepted, you receive
renegotiation.status_change(RENEGOTIATION_OFFER_EXPIRED). If the customer accepted but the PIX is not paid before it expires (together with the offer, at the end of the 5 days), you receiverenegotiation.status_change(RENEGOTIATION_PAYMENT_EXPIRED). To continue, Open Co sends a new renegotiation (newrenegotiation_id).
How amounts work
Late charges (fine and late interest) are calculated per installment, and items[].amount already includes them. The discount is defined by Open Co.
original_amount = sum of items[].amount (already includes fine_amount and interest_amount)
final_amount = original_amount − discount_amount (what the customer pays)
The same breakdown exists per installment (invoices[].items[]): amount, fine_amount, interest_amount and discount_amount.
Example 1, discount equal to all the late charges. Two overdue invoices, three installments:
| Installment | amount | fine_amount | interest_amount | discount_amount |
|---|---|---|---|---|
| Order …0001, installment 2/3 | 96.30 | 1.83 | 1.67 | 3.50 |
| Order …0002, installment 1/3 | 74.35 | 1.42 | 1.13 | 2.55 |
| Order …0003, installment 1/4 | 74.35 | 1.42 | 1.13 | 2.55 |
| Total | 245.00 | 4.67 | 3.93 | 8.60 |
final_amount = 245.00 − 8.60 = 236.40
Example 2, partial discount. The same installments, with 40% of the late charges discounted:
| Installment | amount | fine_amount | interest_amount | discount_amount |
|---|---|---|---|---|
| Order …0001, installment 2/3 | 96.30 | 1.83 | 1.67 | 1.40 |
| Order …0002, installment 1/3 | 74.35 | 1.42 | 1.13 | 1.02 |
| Order …0003, installment 1/4 | 74.35 | 1.42 | 1.13 | 1.02 |
| Total | 245.00 | 4.67 | 3.93 | 3.44 |
final_amount = 245.00 − 3.44 = 241.56
The discount_amount values per installment in these examples are illustrative.
The amount is the one calculated on the day the renegotiation is created and stays fixed for its whole validity (5 days), in both flows. Late charges that accrue on the following days do not change it. In the standard flow the offer is not changed. In a possible variation, Open Co deliberately changes an
OFFEREDoffer and tells you throughrenegotiation.offer_updated.
Endpoints
List renegotiations — GET /renegotiation
GET /renegotiationUse it when the customer opens the installment page, to know whether to show the offer card and in which state.
| Query param | Required | Description |
|---|---|---|
person_id | yes | Customer ID. |
status | no, recommended | One or more statuses, comma separated: OFFERED, PENDING_PAYMENT, PAID, RENEGOTIATION_OFFER_EXPIRED, RENEGOTIATION_PAYMENT_EXPIRED, CANCELLED. Example: OFFERED,PENDING_PAYMENT. |
page | no | Page number. Minimum 1, default 1. |
page_size | no | Items per page. 1 to 100, default 20. |
Always send
statuswhen you only want the active renegotiation. A customer can accumulate manyPAID,RENEGOTIATION_OFFER_EXPIRED,RENEGOTIATION_PAYMENT_EXPIREDorCANCELLEDrenegotiations over time. Usestatus=OFFERED,PENDING_PAYMENTto get the current one (at most one result). Without the filter you get the whole history, newest first.
Response 200
{
"data": [
{
"renegotiation_id": "10000000-0000-4000-8000-000000000001",
"status": "PENDING_PAYMENT",
"original_amount": 245.00,
"fine_amount": 4.67,
"interest_amount": 3.93,
"discount_amount": 8.60,
"final_amount": 236.40,
"expires_at": "2026-12-06T00:00:00-03:00",
"created_at": "2026-12-01T09:12:00-03:00"
}
],
"pagination": {
"page": 1,
"page_size": 20,
"total_items": 1,
"total_pages": 1
}
}Each item has the same amounts as the detail (original_amount, fine_amount, interest_amount, discount_amount, final_amount). The per-installment breakdown (invoices[]) is only in GET /renegotiation/{renegotiation_id}.
Errors: 400 (missing person_id, invalid status, invalid page or page_size).
Get a renegotiation — GET /renegotiation/{renegotiation_id}
GET /renegotiation/{renegotiation_id}Returns the offer or agreement, including the PIX while the status is PENDING_PAYMENT.
Response 200
{
"renegotiation_id": "10000000-0000-4000-8000-000000000001",
"person_id": "A000000-0-0-0",
"renegotiation_type": "OVERDUE_SETTLEMENT",
"status": "OFFERED",
"invoices": [
{
"invoice_id": "20000000-0000-4000-8000-000000000001",
"reference_month": "2026-09",
"due_date": "2026-10-10",
"amount": 96.30,
"items": [
{
"application_id": "40000000-0000-4000-8000-000000000001",
"order_reference": "N000000000000000001",
"installment_id": "30000000-0000-4000-8000-000000000001",
"installment_number": 2,
"total_installments": 3,
"amount": 96.30,
"fine_amount": 1.83,
"interest_amount": 1.67,
"discount_amount": 3.50
}
]
},
{
"invoice_id": "20000000-0000-4000-8000-000000000002",
"reference_month": "2026-10",
"due_date": "2026-11-10",
"amount": 148.70,
"items": [
{
"application_id": "40000000-0000-4000-8000-000000000002",
"order_reference": "N000000000000000002",
"installment_id": "30000000-0000-4000-8000-000000000002",
"installment_number": 1,
"total_installments": 3,
"amount": 74.35,
"fine_amount": 1.42,
"interest_amount": 1.13,
"discount_amount": 2.55
},
{
"application_id": "40000000-0000-4000-8000-000000000003",
"order_reference": "N000000000000000003",
"installment_id": "30000000-0000-4000-8000-000000000003",
"installment_number": 1,
"total_installments": 4,
"amount": 74.35,
"fine_amount": 1.42,
"interest_amount": 1.13,
"discount_amount": 2.55
}
]
}
],
"original_amount": 245.00,
"fine_amount": 4.67,
"interest_amount": 3.93,
"discount_amount": 8.60,
"final_amount": 236.40,
"expires_at": "2026-12-06T00:00:00-03:00",
"pix": null,
"created_at": "2026-12-01T09:12:00-03:00",
"updated_at": "2026-12-01T09:12:00-03:00"
}When status is PENDING_PAYMENT, pix is filled and expires_at is the PIX validity:
"pix": {
"payment_method": "PIX",
"pix_qr_code": "00020126930014br.gov.bcb.pix2571qrcode…",
"pix_qr_code_base64": "iVBORw0KGgoAAAANSUhEUgAA…",
"pix_copy_paste": "00020126930014br.gov.bcb.pix2571qrcode…",
"qr_code_key": "60000000-0000-4000-8000-000000000001",
"provider_reference_id": "60000000-0000-4000-8000-000000000001",
"expires_at": "2026-12-06T00:00:00-03:00"
}| Field | Type | Description |
|---|---|---|
renegotiation_id | string (UUID) | Agreement ID. |
person_id | string | Customer ID, the same used in the other APIs. |
renegotiation_type | string | Always OVERDUE_SETTLEMENT in this release. |
status | string | See statuses. |
invoices[] | array | Overdue invoices included. An invoice always comes with all its overdue installments. |
invoices[].items[] | array | Installments included, with order, amounts and discount per installment. |
original_amount | number | Total overdue amount, including late charges. |
fine_amount | number | Fine included in original_amount. |
interest_amount | number | Late interest included in original_amount. |
discount_amount | number | Discount granted, defined by Open Co. |
final_amount | number | Amount to pay (original_amount − discount_amount). |
expires_at | string (ISO 8601) | Offer validity while OFFERED and PIX validity while PENDING_PAYMENT. In both flows it ends 5 days after issuance and does not change on accept. |
pix | object or null | Filled only when status is PENDING_PAYMENT. |
Errors: 404 RENEGOTIATION_NOT_FOUND.
Accept an offer — POST /renegotiation/{renegotiation_id}/accept
POST /renegotiation/{renegotiation_id}/acceptThe customer accepts the offer. Open Co issues and returns the PIX for the offer's amount. This applies to offers in OFFERED (flow B). A renegotiation created already in PENDING_PAYMENT (flow A) already has its PIX and needs no accept.
Request
{
"person_id": "A000000-0-0-0",
"partner_reference_id": "RP00000000000000001"
}| Field | Required | Description |
|---|---|---|
person_id | yes | Must match the renegotiation's customer. |
partner_reference_id | no | Your own reference for this payment. If sent, it comes back in payment.status_change. If not, Open Co generates one. |
Response 201 — the renegotiation object (same as GET) with status: "PENDING_PAYMENT" and pix filled.
Idempotency. Calling it again for a renegotiation already in PENDING_PAYMENT returns 200 with the same PIX. No new PIX is issued. It is safe to retry after a timeout. The same applies to a flow A renegotiation: calling accept on it returns 200 with the PIX it already has.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | VALIDATION_ERROR | Missing or invalid fields (for example, a missing person_id, an invalid status or an invalid page_size). details.fields lists each field and its message. |
| 403 | PERSON_MISMATCH | person_id does not match the renegotiation. |
| 404 | RENEGOTIATION_NOT_FOUND | The renegotiation_id does not exist for this partner. |
| 409 | RENEGOTIATION_NOT_AVAILABLE | The renegotiation is PAID, RENEGOTIATION_OFFER_EXPIRED, RENEGOTIATION_PAYMENT_EXPIRED or CANCELLED. |
| 503 | PAYMENT_PROVIDER_UNAVAILABLE | The PIX could not be issued. Retry later; the offer stays OFFERED. |
Error bodies follow the standard format: error (a code), message and timestamp. Validation errors also carry details.fields.
{
"error": "VALIDATION_ERROR",
"message": "person_id is required",
"details": { "fields": [ { "field": "person_id", "message": "person_id is required" } ] },
"timestamp": "2026-12-01T10:00:00Z"
}Webhooks
Sent to your webhook_url, with the same signature (X-Webhook-Signature) as the other outbound webhooks. Your endpoint must return HTTP 2xx within 10 seconds and be idempotent.
renegotiation.status_change
renegotiation.status_changeSent on every status change: OFFERED, PENDING_PAYMENT, PAID, RENEGOTIATION_OFFER_EXPIRED, RENEGOTIATION_PAYMENT_EXPIRED, CANCELLED. The first event of every renegotiation means it was created: status: OFFERED (flow B, offer without a PIX) or status: PENDING_PAYMENT (flow A, created already with the PIX).
{
"webhook_type": "renegotiation.status_change",
"renegotiation_id": "10000000-0000-4000-8000-000000000001",
"person_id": "A000000-0-0-0",
"status": "OFFERED",
"final_amount": 236.40,
"expires_at": "2026-12-06T00:00:00-03:00",
"changed_at": "2026-12-01T09:12:00-03:00"
}For flow A, the first event is PENDING_PAYMENT:
{
"webhook_type": "renegotiation.status_change",
"renegotiation_id": "10000000-0000-4000-8000-000000000001",
"person_id": "A000000-0-0-0",
"status": "PENDING_PAYMENT",
"final_amount": 236.40,
"expires_at": "2026-12-06T00:00:00-03:00",
"changed_at": "2026-12-01T09:12:00-03:00"
}renegotiation.offer_updated
renegotiation.offer_updatedThis event is not part of the standard flow; it covers a possible variation. It is sent when Open Co deliberately changes an offer still in OFFERED (for example, a different discount or a new validity). The amount of a renegotiation is fixed from creation and does not change with the late charges of the following days. The renegotiation_id stays the same.
{
"webhook_type": "renegotiation.offer_updated",
"renegotiation_id": "10000000-0000-4000-8000-000000000001",
"person_id": "A000000-0-0-0",
"status": "OFFERED",
"final_amount": 230.00,
"expires_at": "2026-12-06T00:00:00-03:00",
"changed_at": "2026-12-02T10:05:00-03:00"
}The webhook carries only the summary. To get the full offer after an update, call GET /renegotiation/{renegotiation_id}.
payment.status_change (existing event)
payment.status_change (existing event)When the agreement's PIX is paid, you receive the same event used for payments today, with the installments and orders paid. One PIX covers many installments and orders, so order_references and breakdown list all of them.
{
"webhook_type": "payment.status_change",
"payment_id": "batch-pay-50000000-0000-4000-8000-000000000001",
"partner_reference_id": "RP00000000000000001",
"alternate_partner_reference_ids": [],
"renegotiation_id": "10000000-0000-4000-8000-000000000001",
"status": "PAID",
"amount": 236.40,
"payment_method": "PIX",
"installment_ids": [
"30000000-0000-4000-8000-000000000001",
"30000000-0000-4000-8000-000000000002",
"30000000-0000-4000-8000-000000000003"
],
"order_references": [
{ "application_id": "40000000-0000-4000-8000-000000000001", "order_reference": "000000000000000001" },
{ "application_id": "40000000-0000-4000-8000-000000000002", "order_reference": "000000000000000002" },
{ "application_id": "40000000-0000-4000-8000-000000000003", "order_reference": "000000000000000003" }
],
"breakdown": [
{ "invoice_id": "20000000-0000-4000-8000-000000000001", "installment_id": "30000000-0000-4000-8000-000000000001", "installment_number": 2, "application_id": "40000000-0000-4000-8000-000000000001", "order_reference": "000000000000000001", "amount": 92.80 },
{ "invoice_id": "20000000-0000-4000-8000-000000000002", "installment_id": "30000000-0000-4000-8000-000000000002", "installment_number": 1, "application_id": "40000000-0000-4000-8000-000000000002", "order_reference": "000000000000000002", "amount": 71.80 },
{ "invoice_id": "20000000-0000-4000-8000-000000000002", "installment_id": "30000000-0000-4000-8000-000000000003", "installment_number": 1, "application_id": "40000000-0000-4000-8000-000000000003", "order_reference": "000000000000000003", "amount": 71.80 }
],
"processed_at": "2026-12-01T16:21:07-03:00"
}partner_reference_idis the value you sent when accepting the offer, or one generated by Open Co.installment_idslists the installments paid by the PIX (the same IDs asbreakdown[].installment_id).renegotiation_idis filled only for renegotiation payments and isnullin all other payments. Use it to tell them apart.
invoice.status_change (existing event)
invoice.status_change (existing event)After payment, each included invoice moves to PAID, with the discount in discount_amount. One event is sent per invoice. The customer's limit is restored by the principal settled.
{
"webhook_type": "invoice.status_change",
"person_id": "A000000-0-0-0",
"invoice_id": "20000000-0000-4000-8000-000000000002",
"status": "PAID",
"reference_month": "2026-10",
"due_date": "2026-11-10",
"total_amount": 148.70,
"paid_amount": 143.60,
"remaining_amount": 0.0,
"discount_amount": 5.10,
"fine_amount": 2.84,
"interest_amount": 2.26,
"changed_at": "2026-12-01T16:21:08-03:00"
}Order of events when the PIX is paid
You receive payment.status_change (PAID), then one invoice.status_change per invoice, then renegotiation.status_change (PAID). Do not rely on the order between different event types: handle each event on its own and by its IDs.
What your app should do
| Situation | What the app shows |
|---|---|
Renegotiation OFFERED | A card below the invoice on the installment page: "offer available", validity, and a button to see the offer. The card does not show the discount. |
renegotiation.offer_updated | Refresh the card and, if open, the offer details. |
| Offer details | Invoices and orders included, overdue amount, discount, amount to pay, validity and a button to pay with PIX. |
Renegotiation PENDING_PAYMENT | Same card in the "pending payment" state: amount, validity, and a button to open the same PIX. In flow A this is the first state: show the card with the PIX right away and do not call accept. |
OFFERED or PENDING_PAYMENT | Do not show the regular invoice payment. Paying any installment outside the agreement cancels the agreement's PIX. Show a pointer to the offer instead. |
PAID | Invoices paid. Remove the card. |
RENEGOTIATION_OFFER_EXPIRED, RENEGOTIATION_PAYMENT_EXPIRED or CANCELLED | Remove the card. Regular invoice payment is available again. A new offer may arrive later. |
Rules and limits
- One renegotiation in
OFFEREDorPENDING_PAYMENTper customer at a time. - One agreement covers up to 50 contracts. All overdue installments of the customer are included; an invoice is never included partially.
- The amount is fixed at creation, for the whole validity (5 days). In the standard flow the offer does not change; a variation may change an
OFFEREDoffer (renegotiation.offer_updated). - During the validity the offer is frozen: new late charges do not change it. It stops being valid if the customer does not pay (the offer or the PIX expires, and the installments go back to being regular overdue installments) or if it is cancelled (for example, an installment paid outside the agreement, or a refund that changes the amount due).
- The PIX amount is fixed. Partial payments are not accepted.
- An offer in
OFFERED(flow B) is valid for 5 days from issuance. After that it becomesRENEGOTIATION_OFFER_EXPIRED. - The PIX expires at the end of the 5 days from issuance, in both flows. In flow B, accepting does not extend or shorten it. If it expires, the renegotiation becomes
RENEGOTIATION_PAYMENT_EXPIRED. To continue, Open Co sends a new offer with a newrenegotiation_id. - Accepting close to the end of the 5 days leaves little time to pay. Show
expires_atto the customer before they pay. - The payment provider allows only one active PIX per customer. While the renegotiation PIX is active (
PENDING_PAYMENT), no other PIX (for example, a regular invoice payment) can be generated for that customer. If the customer already has another active PIX when the renegotiation PIX is generated (at issuance or on accept), Open Co cancels that PIX automatically and notifies it throughpayment.status_changewithstatus: CANCELLED. A request to generate another PIX in the meantime (for example,POST /invoices/batch-payment) is rejected with a409and the codeNS_ACTIVE_INSTRUMENT_EXISTS. This is one more reason to keep the regular invoice payment hidden. - If an installment included in the agreement is paid outside it, or a refund changes the amount due, the agreement is cancelled (
CANCELLED). Open Co may create a new offer.
Integration checklist
- Handle
renegotiation.status_changeandrenegotiation.offer_updated, and verifyX-Webhook-Signature. - Make webhook handlers idempotent (events can be delivered more than once).
- On the installment page, call
GET /renegotiation?person_id=…&status=OFFERED,PENDING_PAYMENTto decide which card to show. - Hide the regular invoice payment while a renegotiation is
OFFEREDorPENDING_PAYMENT. - Handle both first events:
OFFERED(flow B, no PIX yet) andPENDING_PAYMENT(flow A, the PIX is already available). - In flow B, accept with
POST …/accept, and treat a200on repeat calls as success (same PIX). In flow A there is nothing to accept. - Optionally send
partner_reference_idon accept, to match thepayment.status_changeto your own payment. - Use
renegotiation_idinpayment.status_changeto tell renegotiation payments apart. - Remove the card on
PAID,RENEGOTIATION_OFFER_EXPIRED,RENEGOTIATION_PAYMENT_EXPIREDandCANCELLED.
Suggested test scenarios
- Flow B: offer created → card shown → accept → PIX → paid.
- Accept → leave → come back (
GET /renegotiation?person_id=…) → same PIX → paid. - Variation, flow B: Open Co changes an
OFFEREDoffer (renegotiation.offer_updated) → card refreshed → accept → paid. - Flow B: offer not accepted within 5 days →
RENEGOTIATION_OFFER_EXPIRED. - Flow B: accepted, not paid by the end of the 5 days →
RENEGOTIATION_PAYMENT_EXPIRED. - Installment paid outside the agreement →
CANCELLED. - Refund during an offer or a pending payment →
CANCELLED. - Customer with overdue installments in several orders → one PIX for all.
- New offer after
RENEGOTIATION_OFFER_EXPIREDorRENEGOTIATION_PAYMENT_EXPIRED→ newrenegotiation_id. - Flow A: renegotiation created already in
PENDING_PAYMENTwith the PIX → card with the PIX shown (no accept) → paid. - Flow A: PIX not paid within 5 days →
RENEGOTIATION_PAYMENT_EXPIRED.
Out of scope for this release
- Self-service renegotiation started by the customer in the app.
- New installment plan with a new CCB.
- Settlement of installments not yet due.
See also
- Collection Flow — loans, invoices, payments and webhooks
- API reference:
RenegotiationandWebhooktags in the OpenAPI spec
Updated 29 minutes ago
