Cheqi provides APIs for creating receipts and reading receipts for customers
Cheqi API (v1)
This document number is a unique identifier provided by the seller, you use this number to uniquely identify this value in your system.
This is the document number of the original receipt this credit note refers to.
A list of identifiers for the receipt. For example order number, purchase order number, etc.
The date when the purchase receipt was issued.
The currency in which the purchase receipt is issued.
The subtotal of the invoice, calculated as the sum of all line items before any overall invoice-level adjustments or taxes. This amount represents the total value of goods or services listed on the invoice.
The total amount of the invoice excluding taxes, but including any overall discounts or charges. This amount may differ from the invoiceSubtotal if there are invoice-level adjustments.
The total tax amount for the receipt. This should equal the sum of all tax amounts in the taxes list.
The total amount charged to the customer. Should equal totalBeforeTax + totalTaxAmount.
The list of products included in the purchase receipt. Must contain at least one product.
The identifier or article number (merchant-defined)
The unit of measure code
The taxes applied to this line item
The tax rate as a percentage (e.g. 21.0 for 21%)
The type of tax, e.g. "VAT", "GST", "Sales Tax"
The total taxable amount for this tax rate
The line subtotal, before tax. Typically: quantity * unitPrice - discounts + charges (net).
Overall discounts applied at the receipt level (not product-specific). Examples: "Loyalty discount", "Coupon code", "Volume discount"
Overall charges applied at the receipt level (not product-specific). Examples: "Delivery fee", "Administration free", "Services charge"
Tax breakdown for the receipt. Each Tax entry represents a tax category applied to the receipt (e.g., VAT 21%, VAT 9%). The total tax amount is the sum of all tax amounts in this list.
- Mock serverhttps://docs.cheqi.io/_mock/apis/api-docs/credit-note/template
- Generated server urlhttps://test.api.cheqi.io/credit-note/template
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.cheqi.io/_mock/apis/api-docs/credit-note/template \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"documentNumber": "CREDIT-NOTE-123456",
"originatorDocumentReference": "RECEIPT-123456",
"identifiers": "ORDER-123456, PURCHASE-ORDER-123456s",
"issueDate": "2022-01-01T00:00:00Z",
"currency": "EUR, USD, GBP",
"invoiceSubtotal": 100,
"totalBeforeTax": 100,
"totalTaxAmount": 100,
"totalAmount": 100,
"products": [
{
"name": "Product Name",
"brand": "Brand Name",
"identifier": "123456",
"description": "string",
"quantity": 20,
"baseQuantity": 20,
"unitCode": "C62",
"period": {
"startDate": "string",
"startTime": "string",
"endDate": "string",
"endTime": "string",
"durationMeasure": {
"value": 0,
"unitCode": "string",
"unitCodeListVersionID": "string"
},
"descriptionCode": {
"value": "string",
"languageID": "string",
"listAgencyID": "string",
"listAgencyName": "string",
"listID": "string",
"listName": "string",
"listSchemeURI": "string",
"listURI": "string",
"listVersionID": "string",
"name": "string"
},
"description": "string"
},
"unitPrice": 10,
"discounts": [
{
"amount": 5,
"percentage": 20,
"label": "Black Friday"
}
],
"charges": [
{
"amount": 5,
"percentage": 3,
"label": "Shipping"
}
],
"taxes": [
{
"rate": 21,
"type": "VAT",
"amount": 10,
"taxableAmount": 10,
"label": "VAT 21%"
}
],
"subtotal": 10,
"total": 10
}
],
"discounts": [
{
"amount": 5,
"percentage": 20,
"label": "Black Friday"
}
],
"charges": [
{
"amount": 5,
"percentage": 3,
"label": "Shipping"
}
],
"taxes": [
{
"rate": 21,
"type": "VAT",
"amount": 10,
"taxableAmount": 10,
"label": "VAT 21%"
}
],
"note": "string"
}'The match id that you received during customer matching
The parent Cheqi this credit note refers to
A set of encrypted credit notes
The receiver type of the credit note
The encrypted credit note
Base64-encoded device-specific encrypted symmetric key
Base64-encoded encrypted customer details.
Base64-encoded encrypted customer details AES key
Base64-encoded public key used to encrypt the request
- Mock serverhttps://docs.cheqi.io/_mock/apis/api-docs/credit-note/encrypted
- Generated server urlhttps://test.api.cheqi.io/credit-note/encrypted
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs.cheqi.io/_mock/apis/api-docs/credit-note/encrypted \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"matchId": "match_123456789",
"parentCheqiReceiptId": "CHQ-1234567-123456-123456",
"encryptedCreditNotes": [
{
"recipientId": "afdd332c-8290-47b9-aca2-368bf5f25a9d",
"creditNoteId": "UUID",
"originalReceiptId": "UUID",
"receiverType": "WEBHOOK/DEVICE",
"encryptedCreditNote": "encryptedCreditNote",
"encryptedSymmetricKey": "string",
"encryptedCustomerDetails": "string",
"encryptedCustomerAesKey": "string",
"finalHash": "string",
"publicKey": "string",
"supplierPartyId": "5079fce0-ff67-415d-875a-07499ab62d2b"
}
],
"templateHash": "string"
}'Encrypted credit note queued successfully
The Cheqi receipt ID of the credit note
The Cheqi receipt ID of the parent receipt
The hash of the credit note template
- Mock serverhttps://docs.cheqi.io/_mock/apis/api-docs/credit-note
- Generated server urlhttps://test.api.cheqi.io/credit-note
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://docs.cheqi.io/_mock/apis/api-docs/credit-note \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Mock serverhttps://docs.cheqi.io/_mock/apis/api-docs/credit-note/{cheqiReceiptId}/issuer-key
- Generated server urlhttps://test.api.cheqi.io/credit-note/{cheqiReceiptId}/issuer-key
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://docs.cheqi.io/_mock/apis/api-docs/credit-note/{cheqiReceiptId}/issuer-key' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'X-Device-ID: 497f6eca-6276-4993-bfeb-53cbbbba6f08'