Report up to 200 payments taken back
Report several payment reversals in one request. Each item names the payment and exactly one of invoiceId and externalReference. An invoice may appear several times. Each item is handled on its own, in the order sent, exactly as the single route handles it. A refused item changes nothing for the others, and its result carries the status and problem the single route answers, with the same code. The request itself answers 200 unless the token, the integration configuration or the body is refused, which happens before any item is handled. On a 429, wait as long as Retry-After says, then send the same batch again.
/v1/billing/batch/report-payments-reversedAuthorizationOAuth2 access token · headerrequiredAn access token for an Application, from the client_credentials grant. An integration of your own uses the same grant. A connector from Hydda gets its token from the installation-token grant instead. Send it as Authorization: Bearer <token>.
application/jsonitemsobject[]requiredFrom 1 to 200 items. They are handled in this order.
Show propertiesHide properties
objectplatformPaymentIdstringrequiredThe id the payment was reported under. Reversing the same payment twice changes nothing.
invoiceIdstring<uuid>The id of the invoice. Send this or externalReference, never both.
externalReferencestringYour own id for the invoice, as attached when it was passed or reported sent. Send this or invoiceId, never both.
One result per item, in the order sent.
resultsobject[]requiredOne result per item, in the order the items were sent.
Show propertiesHide properties
objectstatusnumberrequiredAlways 200: the item was handled.
200resultInvoicerequiredAn invoice or a credit note. Amounts are in minor units of currency.
Show propertiesHide properties
idstring<uuid>requiredThe invoice id. Report outcomes against it.
invoiceRunIdstring<uuid>requiredThe invoice run that created the invoice.
organizationIdstring<uuid>requiredThe organization the invoice belongs to.
operationalContextIdstring<uuid>requiredThe operational context the invoice was created in.
contractIdstring<uuid>requiredThe contract the invoice bills.
recipientAgentIdstring<uuid>requiredThe customer the invoice bills.
recipientAgentNamestringrequiredThe customer's name as written on the invoice.
billingAccountIdstring<uuid>requiredThe billing account the invoice is sent to.
documentKindstringrequiredWhether the document is an invoice or a credit note. A credit note names the invoice it credits.
invoicecredit-notecreditedInvoiceIdstring<uuid>On a credit note, the invoice it credits. Absent on an invoice.
billingStreamstringrequiredWhere the charges come from: contractual for the contract's own products, running for purchases beside it, such as bookings.
contractualrunningrequestedInvoiceDatestring<date>requiredThe invoice date to issue with, as an ISO date (YYYY-MM-DD).
requestedDueDatestring<date>The due date to issue with, as an ISO date. Absent on a credit note.
paymentTermsDaysintegerThe payment terms in days that give the requested due date. Absent on a credit note.
invoiceNumberintegerrequiredHydda One's own number for the invoice. The legal number is issuedInvoiceNumber.
statusstringrequiredWhere the invoice is in its life. failed is reached only by a failure report, and written-off is settled like paid with at least one write-off.
createdapprovedsentpaidwritten-offfailedcurrencystringrequiredAn ISO 4217 currency code, for example SEK.
SEKNOKDKKEURUSDGBPtotalNetMinorUnitsintegerrequiredThe total excluding VAT, in minor units. Negative on a credit note.
totalVatMinorUnitsintegerrequiredThe total VAT, in minor units.
totalGrossMinorUnitsintegerrequiredThe total including VAT as Hydda One computed it, in minor units.
externalReferencestringYour own id for the invoice. Absent until you attach one, by passing its proposal or reporting it sent.
issuedInvoiceNumberstringThe legal invoice number your ERP issued. Absent until the invoice is reported sent.
issuedInvoiceDatestring<date>The date your ERP issued the invoice, as an ISO date. Absent until reported sent.
dueDatestring<date>The due date the invoice was issued with, as an ISO date. Absent until reported sent.
issuedTotalGrossMinorUnitsintegerThe total including VAT your ERP issued, in minor units. Payments are measured against it. Absent until reported sent.
paymentReferencestringThe reference the payer quotes, as reported with the send.
paymentReferenceTypestringThe system the payment reference belongs to: ocr for a Swedish OCR number, kid for a Norwegian KID number, reference for a free reference.
ocrkidreferencedocumentUrlstringThe link to the issued document, as reported with the send.
balanceMinorUnitsintegerWhat is left to pay, in minor units: the issued total less payments and write-offs. Below zero after an overpayment. Absent until reported sent.
overduebooleanrequiredTrue when the invoice is sent and its due date has passed.
approvedAtstring<date-time>When the invoice was approved, as an ISO 8601 timestamp in UTC.
sentAtstring<date-time>When the invoice was reported sent, as an ISO 8601 timestamp in UTC.
paidAtstring<date-time>When the invoice was settled as paid, as an ISO 8601 timestamp in UTC.
writtenOffAtstring<date-time>When the invoice was settled as written off, as an ISO 8601 timestamp in UTC.
failedAtstring<date-time>When the invoice was reported failed, as an ISO 8601 timestamp in UTC.
failureReasonstringWhy sending failed, as it was reported.
createdAtstring<date-time>requiredWhen the invoice was created, as an ISO 8601 timestamp in UTC.
updatedAtstring<date-time>requiredWhen the invoice last changed, as an ISO 8601 timestamp in UTC.
statusintegerrequiredThe HTTP status the single route answers this refusal with, such as 400, 403, 404 or 409. 500 when the item failed unexpectedly.
problemProblemrequiredAn RFC 9457 problem details body. Every failed request returns one.
Show propertiesHide properties
typestringrequiredAlways about:blank.
titlestringrequiredThe HTTP status phrase, for example Not Found.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong, for a person to read. Do not parse it.
codestringNames the rule that refused the request. Match on this, not on detail.
parametersobjectValues the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.
issuesobject[]With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.
The request is not valid, or a business rule refused it. code names the rule.
typestringrequiredAlways about:blank.
titlestringrequiredThe HTTP status phrase, for example Not Found.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong, for a person to read. Do not parse it.
codestringNames the rule that refused the request, when the failure has one. Match on this, not on detail.
VALIDATION_FAILEDBILLING_INTEGRATION_NOT_CONFIGUREDparametersobjectValues the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.
issuesobject[]With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.
The access token is missing, expired or not valid.
typestringrequiredAlways about:blank.
titlestringrequiredThe HTTP status phrase, for example Not Found.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong, for a person to read. Do not parse it.
codestringNames the rule that refused the request. Match on this, not on detail.
parametersobjectValues the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.
issuesobject[]With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.
The token does not allow this request.
typestringrequiredAlways about:blank.
titlestringrequiredThe HTTP status phrase, for example Not Found.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong, for a person to read. Do not parse it.
codestringNames the rule that refused the request. Match on this, not on detail.
parametersobjectValues the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.
issuesobject[]With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.
Too many requests. Wait and try again.
typestringrequiredAlways about:blank.
titlestringrequiredThe HTTP status phrase, for example Not Found.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong, for a person to read. Do not parse it.
codestringNames the rule that refused the request, when the failure has one. Match on this, not on detail.
BILLING_BATCH_THROTTLEDparametersobjectValues the refusal names, keyed by what they are, for example occurrenceDate with BOOKING_SERIES_CONFLICT.
issuesobject[]With VALIDATION_FAILED: one entry per field that failed validation, each with its path and message.