# Cheqi API Cheqi provides APIs for creating receipts and reading receipts for customers Version: v1 ## Servers Generated server url ``` https://test.api.cheqi.io ``` ## Security ### cheqi_oauth Type: oauth2 Authorization URL: https://test.api.cheqi.io/oauth/authorize Scopes: - `write_receipts`: Write receipts - `read_receipts`: Read receipts - `manage_client_applications`: Manage client applications - `read_client_applications`: Read client applications ## Download OpenAPI description [Cheqi API](https://cheqi.redocly.app/_bundle/apis/api-docs.yaml) ## Client Application Management Endpoints for managing OAuth2 client applications, including registration, secret management, and public key configuration ### Get client application public key - [GET /client-application/{clientApplicationId}/public-key](https://cheqi.redocly.app/apis/api-docs/client-application-management/getclientapplicationpublickey.md): Retrieves the public key information for a client application, including the key data, algorithm, and upload timestamp. This key is used to verify signatures from the client application. Accessible for: Company, User ### Upload client application public key - [POST /client-application/{clientApplicationId}/public-key](https://cheqi.redocly.app/apis/api-docs/client-application-management/uploadclientapplicationpublickey.md): Uploads a public key for the client application. This key is used to verify signatures from the client application when it signs receipts or other data. Can be called by company admins or using company API key authentication. Accessible for: Company, User ## Credit Note Management Endpoints for creating, managing, and retrieving credit notes (refund receipts) ### Generate credit note template - [POST /credit-note/template](https://cheqi.redocly.app/apis/api-docs/credit-note-management/createreceipttemplate_1.md): Generates a UBL-compliant credit note template without customer personal data. The template can be used by the SDK to inject customer information and encrypt the credit note. Requires write_receipts OAuth scope. Accessible for: Company, Client Application ### Submit encrypted credit note - [POST /credit-note/encrypted](https://cheqi.redocly.app/apis/api-docs/credit-note-management/submitencryptedreceipt_1.md): Submits an encrypted credit note to the queue for delivery to customer devices. The credit note is encrypted with customer device keys for end-to-end privacy. Accessible for: Company, Client Application ### Get all outstanding credit note initiation requests - [GET /credit-note](https://cheqi.redocly.app/apis/api-docs/credit-note-management/getallcreditnotes.md): Retrieves all outstanding credit note initiation requests for the authenticated company or client application. These are customer-initiated refund requests that are pending processing. Accessible for: Company, Client Application ### Get issuer public key - [GET /credit-note/{cheqiReceiptId}/issuer-key](https://cheqi.redocly.app/apis/api-docs/credit-note-management/getissuerkey.md): Returns the issuer's public key for verifying the credit note signature. The device must be a valid recipient of this credit note to access the key. ## Recipient Management Endpoints for resolving and matching receipt recipients ### Resolve receipt recipient - [POST /recipient/resolve](https://cheqi.redocly.app/apis/api-docs/recipient-management/matchcustomer.md): Resolves and matches a receipt recipient based on the provided identification details (email, phone number, IBAN, or card number). Returns the matched recipient's details if found, enabling receipt delivery to the correct user. Accessible for: Company, Client Application ## Receipt Management Endpoints for creating and managing purchase receipts with end-to-end encryption ### Generate receipt template - [POST /receipt/template](https://cheqi.redocly.app/apis/api-docs/receipt-management/createreceipttemplate.md): Generates a UBL-compliant purchase receipt template without customer personal data. The template can be used by the SDK to inject customer information and encrypt the receipt. Requires write_receipts OAuth scope. Accessible for: Company, Client Application ### Submit encrypted receipt - [POST /receipt/encrypted](https://cheqi.redocly.app/apis/api-docs/receipt-management/submitencryptedreceipt.md): Submits an encrypted purchase receipt to the queue for delivery to customer devices. The receipt is encrypted with customer device keys for end-to-end privacy. Requires write_receipts OAuth scope. Accessible for: Company, Client Application ### Send receipt via email - [POST /receipt/email](https://cheqi.redocly.app/apis/api-docs/receipt-management/submitreceiptwithemail.md): Sends a purchase receipt directly to a customer via email. The receipt is delivered as a PDF attachment. Requires write_receipts OAuth scope. Accessible for: Company, Client Application ## Webhook Management Endpoints for managing webhook subscriptions to receive real-time event notifications ### Create webhook subscription - [POST /webhook/subscription](https://cheqi.redocly.app/apis/api-docs/webhook-management/handlewebhook.md): Creates a webhook subscription to receive real-time notifications for receipt and credit note events. The webhook URL will be called when events occur for the authenticated company or client application. Accessible for: Company, Client Application