Skip to content

Credit notes let merchants document returns and refunds for previously issued receipts. A customer can submit an encrypted return request from the Cheqi app; the merchant validates it, handles the monetary refund, and issues a credit note linked to the original Cheqi receipt.

Refund responsibility

Cheqi delivers the credit note. Your payment system remains responsible for moving money.

The return-request flow is optional

You can handle returns entirely in your own system. For example, include a merchant-controlled barcode or QR code on the receipt or its product lines and use that identifier in your return process.

Flow

  1. The customer submits a return request from the Cheqi app.
  2. Cheqi routes the encrypted request to the original receipt issuer by webhook or polling.
  3. The merchant decrypts the request, validates eligibility and quantities, and chooses an outcome.
  4. The merchant processes the monetary refund and issues the definitive credit-note payload.
  5. Cheqi queues the encrypted payload for the customer's owner devices, which generate the requested CHEQI JSON and UBL CreditNote documents.

The merchant submission links the new document to its parent using parentCheqiReceiptId. That value is delivery metadata; it is not a property of the generated CHEQI JSON document.

Customer return-request model

The decrypted CreditNoteInitiationRequest has these properties:

PropertyTypeRequiredDescription
cheqiReceiptIdstringYesCheqi identifier of the original receipt.
receiptIdstringYesMerchant-supplied identifier of the original receipt.
customerNotestringNoCustomer note, up to 1,000 characters.
lineItemsReturnLineItem[]YesAt least one requested return line.
refundPreferenceenumYesORIGINAL_PAYMENT_METHOD, BANK_TRANSFER, or STORE_CREDIT.
refundBankAccountobjectConditionalRequired only for BANK_TRANSFER; otherwise it must be absent.

Each ReturnLineItem contains:

PropertyTypeRequiredDescription
productIdstringYesThe merchant-supplied identifier of the original receipt product. Maximum 255 characters.
quantitynumberYesRequested return quantity; must be greater than zero.
reasonCodeenumYesDEFECTIVE, DAMAGED, WRONG_ITEM, NOT_AS_DESCRIBED, UNWANTED, EXPIRED, or INCOMPLETE.
reasonDescriptionstringNoOptional explanation, up to 1,000 characters.

RefundBankAccount contains required iban and accountHolder strings plus an optional bic.

See Receiving Return Requests for the encrypted polling and webhook shapes.

Merchant credit-note input

The encrypted issuance payload contains a creditNoteTemplateRequest and taxesApplied. Cheqi does not calculate these values; the merchant supplies the definitive amounts and tax data.

PropertyTypeRequiredDescription
documentNumberstringYesMerchant's unique credit-note number.
originatorDocumentReferencestringYesMerchant document number of the original receipt.
identifiersobject[]NoAdditional { type, value } document identifiers.
issueDateISO 8601 date-timeYesCredit-note issue timestamp.
currencystringYesISO 4217 currency code.
creditNoteSubtotaldecimalYesSum of line amounts before document-level adjustments and tax.
totalBeforeTaxdecimalYesTotal after document-level discounts and charges, excluding tax.
totalTaxAmountdecimalYesTotal tax amount.
totalAmountdecimalYesTax-inclusive credit amount.
productsproduct[]YesAt least one credited product; every product needs name and identifier.
discountsdiscount[]NoDocument-level discounts.
chargescharge[]NoDocument-level charges.
taxestax[]ConditionalRequired when taxesApplied is true; may be empty otherwise.
periodobjectNoService or billing period.
jurisdictionalDataobjectNoCountry-specific fiscal and legal data.

Use positive quantities and credit amounts. The document type communicates that these values are credits; do not negate the lines or totals.

The legacy note input is accepted for compatibility but is not used to generate the document note. The generated note comes from the issuer's configured company receipt text.

Generated CHEQI JSON

Owner devices combine the merchant input with trusted company, store, recipient, and document context. The generated JSON contains:

PropertyRequiredSource
documentNumberYesMerchant input.
originatorDocumentReferenceYesMerchant input.
identifiersNoMerchant input; omitted when empty.
issueDateYesMerchant input.
currencyYesMerchant input.
creditNoteSubtotalYesMerchant input.
totalBeforeTaxYesMerchant input.
totalTaxAmountYesMerchant input.
totalAmountYesMerchant input.
productsYesMerchant input.
discountsNoMerchant input; omitted when empty.
chargesNoMerchant input; omitted when empty.
taxesYesMerchant input; can be an empty array when tax does not apply.
periodNoMerchant input.
noteNoIssuer's configured company receipt text.
sellingPartyYesTrusted issuer context.
storeNoTrusted store context.
receivingPartyNoResolved customer context.
jurisdictionalDataNoMerchant input.
receiptUuidYesDevice-generation context; also written as the UBL cbc:UUID.

cheqiCreditNoteId, parentCheqiReceiptId, and supplierPartyId are delivery or persistence metadata and are not properties of the generated CHEQI JSON document. verificationNonce is not part of the current model; use receiptUuid as the shared document identifier.

Formats and verification

The generated formats are:

  • CHEQI JSON, hashed after RFC 8785 canonicalization with SHA-256.
  • UBL CreditNote XML, hashed after exclusive XML canonicalization with SHA-256.

See UBL XML Credit Note Format and Receipt & Credit Note Verification.

Next steps