Go-live checklist
Go through this list with the test key before you switch to the live key.
Keys
- The key is kept on your server only, never in a mobile app, a browser or a code repository.
- The live key has only the permissions your system uses, and only the branches it works in.
- Your system reads the key from configuration, so replacing it needs no new release.
- You know who at the merchant revokes and reissues the key, and you handle
401 revoked_api_keyand401 expired_api_keyby alerting someone, not by retrying. - If the key has an expiry date, someone owns renewing it before that day.
Requests
- Every
POSTandPATCHsends anIdempotency-Key, one per logical operation, and a retry sends the same key. - You retry only timeouts, dropped connections,
409 idempotency_in_progressand5xx, with the same key. See Retries and idempotency. - Your code branches on
code, never onmessage. - You log the
Request-Idof every call, so you can quote it to support. - Branch, item and payment method ids come from
GET /v1/branches,GET /v1/itemsandGET /v1/payment-methods, not from constants. - Each sales invoice, payment and credit note carries your own
referenceId, and your system handles409 reference_id_takenby readingexistingId. - A phone in a query string is encoded:
%2B966..., not+966....
Money
- You read
total,lines[].unitDiscount,amountPaidandamountDuefrom the reply, not from your request. - To pay an invoice in full, you send
paymentwithoutamount. - Sales to a person are paid at issue; only company customers buy on account.
ZATCA
- Your system shows or stores
zatca.statusfor every invoice and credit note, and treatspendingas issued, not failed. - A
rejecteddocument reaches a person at the merchant who can correct it. - You handle
422 zatca_rejectedand422 customer_address_incompleteon standard invoices; you tested both with the sandbox fixtures. - You fetch a standard invoice's PDF only once it is
cleared.
Switching to live
- The merchant issued a live key with the same permissions and branches as the test key.
- Your system checks the
Kosoor-Modeheader: present astestin the sandbox, absent on live data. - You made one real call and the merchant found it in Settings → Developers → Request log, under Live.
- Customers you created in the sandbox are created again, or found, on live data: the sandbox's customers are its own.
Support
Kosoor support answers on WhatsApp only: +966 12 606 1770. There is no phone line and no email. Send the Request-Id of the call and what you expected.