Skip to main content
POST
Cancel a deal
The body is optional: send {}, or no body and no Content-Type. With cancelAllInvoices: true, every invoice of the deal that is not paid or canceled yet is canceled. Otherwise the open invoice is closed — it stays payable — and only the closed invoices due more than a month from now are canceled. Paid invoices are never touched. The rules and the response are those of the Billing API’s Cancel a deal, which this route calls: its errors (such as DEAL_NOT_FOUND, DEAL_NOT_ACTIVE or INSUFFICIENT_PERMISSIONS) reach you unchanged, with origin: BILLING. Answers the canceled deal.

Path Parameters

realmId
string
required
organizationId
string
required
dealId
string
required

Body

application/json
cancelAllInvoices
boolean

Response

Successful response

id
string
required
realm
string
required
organization
string
required
chargeType
enum<string>
required
Available options:
SINGLE,
RECURRENT,
SUBSCRIPTION
status
enum<string>
required
Available options:
OPEN,
CANCELED,
TERMINATED,
EXPIRED,
REVOKED
startAt
string<date-time>
required
products
object[]
required
paymentMethods
enum<string>[]
required
Available options:
BANK_SLIP,
PIX_INITIATION,
PIX_AUTOMATIC,
PIX,
P2P
creditParties
object[]
required
debitParties
object[]
required
closingAt
string
required
firstChargeDate
string<date-time>
required
numberOfInstallments
number
required
dueAt
string
required
createdBy
string
required
updatedBy
string
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
description
string
contract
string
endAt
string<date-time> | null
secondaryPaymentMethods
enum<string>[]
Available options:
BANK_SLIP,
PIX_INITIATION,
PIX_AUTOMATIC,
PIX,
P2P
fine
object
interest
object
discount
object
paymentUrl
string
settings
object
externalCard
object