Skip to main content

TurkTicaret

TurkTicaret is a CA connector vendor. Its SSL API places an order for a Sectigo DV certificate, hands back one DNS validation record, and returns the certificate once the CA has validated the domain. CertAutoPilot writes the record, waits, stores the certificate and removes the record.

An order buys a subscription (one year or longer) and the certificate it issues is valid for a shorter time (at most 200 days). CertAutoPilot renews inside the subscription by reissuing the same order — no credit — and places a new order, which uses a credit, only when the subscription ends. See Renewal.

What you need from TurkTicaret​

  • The API address. The vendor's test environment is https://sandbox.turkticaret.net/api/; the production address is the one TurkTicaret gives you with your account.
  • An API key, used as a Bearer token. TurkTicaret does not filter connections by address at the network level; a key can, however, carry an IP list in the vendor panel — then a call from any other address is answered with NOT_ALLOWED_IP, so every CertAutoPilot node that runs a worker must be on that list.
  • Your product codes. CertAutoPilot pre-fills 183 Positive SSL (the default), 185 SSL and 187 Positive SSL Wildcard — the same codes in the sandbox and in production. Remove the ones your account has no credit for; a code the account does not have fails an order with SSL_TYPE_WRONG.
  • Credits on the account. Every new order — first issuance, and a Renew or Reissue once the order's subscription has ended — consumes one. While the subscription lasts, a renewal and a Reissue reissue the existing order and consume none. Outside the subscription, Reissue is refused while the certificate is active (it would be a new paid order for a valid certificate — renew it instead); it is the recovery path once an order failed or the certificate expired.

Add the connection​

Settings → Certificate Authorities → CA Connectors → Add. Choose TurkTicaret, paste the base URL and the API key, adjust the product list, save, then Test: the connector asks the vendor about an order id that cannot exist, so an accepted key answers SSL_NOT_FOUND (reported as credential accepted) without placing an order or spending a credit; a wrong or inactive key, or a node missing from the key's IP list, is reported with the vendor's code.

Order rules​

CertAutoPilot checks these before it calls the vendor, so a doomed request never spends a credit:

  • One domain per certificate (max_sans: 1) — additional names are refused at submit with CA_CONNECTOR_SAN_LIMIT.
  • The domain must not start with www. — order the base name; the certificate covers www automatically.
  • A domain starting with *. needs a product marked wildcard, and a wildcard product needs a *. domain.
  • The CSR common name equals the order domain (CertAutoPilot builds the CSR that way).
  • Key type: RSA-3072 is the default. RSA-2048, RSA-4096, ECDSA P-256 and P-384 are accepted as well. Certificates whose subscription runs into 2030 or later need an RSA key of at least 3072 bits, which is why RSA-2048 is not the default.
  • The zone the domain belongs to must have a DNS credential (as for every connector).

Domain validation​

The vendor answers a new order with one DNS record — a CNAME or a TXT; which one depends on the certificate authority behind the product (Sectigo DV products hand back a CNAME; a product backed by another CA may use TXT) — for a name such as _61966AC4….example.com. CertAutoPilot recognises the three parts of the dns answer by content (the type is the element that reads CNAME/TXT, the name is the element under the ordered domain, the value is the remainder), so a differently ordered array or an object form is handled the same way; a record whose name is not under the ordered domain is refused before anything is written. CertAutoPilot writes it into the zone through the zone's DNS credential (every DNS provider supports both record types), waits until it is visible on the configured resolvers, then polls the vendor until the certificate is issued — 5 minutes after the record became visible, then 10, 20, 40 and at most every hour (the vendor asks for no more than one check per 5 minutes). The record is removed when the order closes. If the record cannot be written, complete the validation in the vendor panel or add the record to DNS by hand — do not Reissue, that places a second order.

The wait is bounded by the CA Order Deadline (Settings → General, default 72 hours). Past it the order is dropped, the record removed, and the certificate reports CA_ORDER_DEADLINE_EXCEEDED.

Credits and failures​

CertAutoPilot does not track credits. A refusal that comes before an order exists — a key, CSR, domain or product problem, or NOT_ENOUGH_CREDIT — says no order was placed at the vendor in Last error. An order refused with NOT_ENOUGH_CREDIT is a terminal failure: the certificate returns to pending (or the renewal ladder for a renewal), Last error shows the vendor code and explanation, and a cert.issuance_failed (or cert.renewal_failed) notification fires. Top up at the vendor and click Reissue — nothing re-orders on its own, because an unattended retry could spend a credit you did not intend to spend. For a renewal the rule depends on whether an order was placed: a refusal before or at ordering (NOT_ENOUGH_CREDIT, an unreachable API, a configuration error) is a free failure and follows the normal renewal ladder (retried with growing delays, up to the attempt limit); a failure after an order exists (the vendor refused it at check, the deadline passed, the certificate did not validate) ends the ladder at once — the certificate goes to renewal_failed with the code, a notification fires, and nothing re-orders automatically, because every automatic retry would be another paid order. Renew or Reissue it by hand once the cause is fixed; both state the credit cost.

The certificate's subscription end reported by the vendor (order_end) is the end of the subscription the order bought, not the certificate's own expiry; the certificate's validity is read from the certificate itself. CertAutoPilot records it when the certificate is issued (or reads it from the vendor at the first renewal of an older certificate).

Renewal: a reissue on the same order​

While the subscription lasts, a renewal does not buy a new certificate. CertAutoPilot asks TurkTicaret to reissue the existing order: no credit is spent, the vendor hands out a new DCV record (written and removed exactly like an order's), and the new certificate is read from the same order. TurkTicaret extends the validity only when the reissue happens within 30 days of the certificate's expiry; earlier, it would replace the certificate with the same end date. So a renewal that becomes due earlier (a renewal threshold above 30 days, or Renew clicked early) is deferred: nothing is sent, the job completes, and the certificate's next renewal moves to 30 days before expiry (a certificate without auto-renew then needs Renew clicked again inside that window). The previous certificate stays valid until it expires, so the new one can be distributed before then. If TurkTicaret refuses the reissue itself (it no longer knows the order, or refuses the request), nothing is bought, the renewal fails, and CertAutoPilot forgets the recorded subscription end: the next Renew asks TurkTicaret about the order again and places a new order when the order is gone, while Reissue places a new order at once. The one exception is a reissue refused because another reissue of the order is still running (SSL_NOT_ACTIVE): that proves the order lives, so the subscription end is kept (see the table below).

A renewal places a new order (one credit) when the subscription ends together with the current certificate (there is no later certificate period to reissue into) or has already ended, when the vendor reports no subscription end, or when the vendor no longer knows the order. A reissue that fails costs nothing and never falls back to a paid order: a vendor that cannot be reached or answers from its infrastructure is retried by the normal renewal ladder, a vendor refusal (REISSUE_DOMAIN_NOT_MATCH, NOT_DEFINED_REISSUE_*) ends the renewal with the code. A reissue-based renewal is not picked up by the 24-hour rescue of exhausted renewals — fix the cause and renew by hand. While a reissue is running the vendor may still answer with the certificate being replaced; CertAutoPilot recognises it and keeps waiting (Last code PREVIOUS_CERTIFICATE).

A reissue keeps the certificate's key. TurkTicaret reissues an order with the key the order was placed with, whatever key a reissue request carries, so CertAutoPilot reissues with the certificate's current key — a renewal and a Reissue inside the subscription never change the key, whatever the certificate's key rotation setting. The key changes with the next new order (the rotation counter keeps counting until then).

A reissue whose answer was lost. If the answer to a reissue request never arrives (a proxy error, a broken connection), TurkTicaret may already be running that reissue with a DNS record CertAutoPilot never saw, and every later reissue of the order is refused with SSL_NOT_ACTIVE. CertAutoPilot then sends the order's original request again with its request id: TurkTicaret answers with the same order and the DNS record of the running reissue — nothing is bought — and CertAutoPilot writes that record and finishes the reissue. This needs the request id of the order, which CertAutoPilot keeps on the certificate for orders it places with one; for an older order without it the renewal ends with SSL_NOT_ACTIVE — ask TurkTicaret to finish or cancel the running reissue.

The API offers no revoke or cancel call. Revoke is hidden for a TurkTicaret certificate (API: 422 ISSUER_UNSUPPORTED_OPERATION); to revoke, contact TurkTicaret.

Reissue while the subscription of the order that issued the certificate runs more than 8 days — active certificates included — reissues that order with the certificate's current key (see above): no credit, a new DCV record, and the new certificate keeps the current end date unless the reissue falls within 30 days of it (TurkTicaret extends only then). The certificate in use stays valid until it expires. If TurkTicaret refuses the reissue, the certificate returns to the status it had and nothing is bought — Reissue never turns into a paid order on its own. Outside the subscription, Reissue places a new order; the confirmation dialog says which one it will be.

Vendor error codes​

The vendor's application always answers HTTP 200 with status: true|false, an error code and sometimes an info text. CertAutoPilot classifies the code and writes <CODE>: <explanation> into the certificate's Last error; the info text, when present, is appended.

CodeClassWhat CertAutoPilot does
NO_AUTH_HEADER, API_KEY_WRONG, API_KEY_INACTIVE, NOT_ALLOWED_IPauthenticationOrder fails terminally; the connection's status becomes error with the code. Fix at the vendor, Test, Reissue.
REQUEST_INVALID, SSL_FIELD_REQUIRED, SSL_TYPE_WRONG, CSR_FIELD_REQUIRED, DOMAIN_FIELD_REQUIRED, DOMAIN_NOT_START_WWW, DOMAIN_MUST_START_WILDCARD, DOMAIN_MUST_NOT_START_WILDCARD, DOMAIN_NOT_MATCH_WITH_CSRinvalid requestOrder fails terminally. SSL_TYPE_WRONG means the product code is not defined for the account — fix the connection's product list. The domain rules are also enforced locally before the call.
NOT_ENOUGH_CREDITterminalOrder fails terminally; notification; top up and Reissue.
VENDOR_UNREACHABLE (CertAutoPilot code)transientThe API could not be reached at all (DNS, connect timeout / refused, TLS, outbound policy) — nothing was sent, no credit spent. A first issuance retries three times over about two minutes and then fails with this code; a renewal follows the renewal ladder; a poll keeps retrying with backoff until the order deadline. TurkTicaret does not filter by IP at the network level (an API key restricted to certain IPs answers NOT_ALLOWED_IP instead), so a connection that cannot be made is on this side: check this server's outbound firewall, DNS and any HTTP(S) proxy, then Test connection and Reissue. If it persists, send TurkTicaret this server's public IP and whether it was a timeout, a refusal or a reset.
VENDOR_NO_RESPONSE (CertAutoPilot code)ambiguous, resumedThe order request was sent and no usable answer came back — no answer within 60 seconds (TurkTicaret answers an order in a few seconds; status checks keep a 30-second limit), an HTTP error status (for example a 502 or 504 from the vendor's infrastructure) or an HTML error page. The order may have been created. Every order request carries its own request id (uid), so CertAutoPilot asks again with the same id: TurkTicaret answers with the order that request created (or creates it), never a second one. A first issuance retries in the same job; after the last attempt the certificate returns to pending with this code, and Reissue (or the next renewal step) asks again with the same id. The request is kept for 90 days. A request id that would have to be sent with a different key (the key was deleted) is not sent again — check the TurkTicaret panel. During polling the same conditions are simply retried.
DCV_WRITE_FAILED (CertAutoPilot code)dependsThe order exists but the DCV record could not be written into the zone. A transient DNS-provider failure is retried by the poll job until the deadline; a permanent one (no write permission, record type refused) fails the order — the vendor order stays open. Fix the DNS credential (test it with the DCV option) and Reissue.
VENDOR_CERT_MISMATCH (CertAutoPilot code)terminalThe vendor returned a certificate that does not name every domain of the order (a vendor-side order mix-up). Nothing is stored or distributed; the order is closed and the DCV record removed. Contact TurkTicaret with the order id, then Reissue.
VENDOR_KEY_MISMATCH (CertAutoPilot code)terminalThe vendor returned a certificate that does not carry this certificate's key. It is refused at once, never stored or distributed; the order is closed and the DCV record removed. Contact TurkTicaret with the order id.
VENDOR_CERT_INVALID (CertAutoPilot code)terminalThe vendor returned a certificate that is already expired, valid for less than a day, not yet valid, or — on a renewal — one that does not outlast the current certificate (a duplicate). It is refused and never stored, so a renewal cannot loop into another paid order every cycle. Contact TurkTicaret with the order id.
VENDOR_REDIRECT (CertAutoPilot code)configurationThe base URL answered with an HTTP redirect (for example http:// → https://, or a missing trailing slash). Redirects are never followed — a redirected order request would lose its body — so set the connection's base URL to the address named in the message and run Test connection again.
UID_VALUE_EXISTresumedThe request id was used before: TurkTicaret names the order it created and its current DCV record, and CertAutoPilot continues with that order. Without an order id in the answer it is terminal — check the TurkTicaret panel.
UID_VALUE_EXIST_DIFFERENT_DOMAINterminalThe request id was used before for another domain; TurkTicaret refused the request and no order was placed. CertAutoPilot gives every request its own id, so this points at a vendor-side problem — contact TurkTicaret.
UID_VALUE_NOT_SUITABLEterminalThe request id is not 10–40 characters; no order was placed.
CONTACT_CUSTOMER_SUPPORTterminalThe order was created (its id is recorded on the certificate) but TurkTicaret needs a manual step with the certificate authority. Contact TurkTicaret customer support about that order before Reissue — a Reissue places a new paid order.
SSL_NOT_ACTIVEreissue refusedThe order's certificate is not issued yet, or a reissue of it is still running. On a renewal or a Re-issue inside the subscription CertAutoPilot finishes the running reissue through the order's request id (above) — nothing is bought. Without a stored request id it ends with the code — ask TurkTicaret to finish or cancel the running reissue. TurkTicaret checks the product and the credit before it reads the request id, so an account out of credit refuses that read with NOT_ENOUGH_CREDIT: the subscription is kept and nothing is bought; add credit and Renew again (or Reissue while more than 8 days of the subscription remain — the same free reissue).
SSL_ALREADY_EXPIREDreissue refusedThe order's subscription has ended or has no end date; nothing was bought. The next Renew checks the order again and places a new order.
REISSUE_DOMAIN_NOT_MATCH, NOT_DEFINED_REISSUE_VALUE, NOT_DEFINED_REISSUE_VALUE_2, NOT_DEFINED_REISSUE_ID, NOT_DEFINED_REISSUE_ID_2request rejectedA reissue request the vendor refused; nothing was bought. The renewal ends in renewal_failed with the code; contact TurkTicaret if it repeats.
SSL_REGISTRY_ERRORterminalThe order was created at the vendor but the certificate authority refused it; the vendor's info text carries the reason and is shown in Last error. Check the vendor panel and contact TurkTicaret before Reissue — a Reissue places a new paid order.
SSL_NOT_FOUNDterminalThe vendor has no order with that id for the account (while polling). From Test this is the credential accepted answer.
CERT_IS_NOT_READYnot readyKeep polling.
any other codeterminalTreated as a terminal failure on purpose — an undocumented answer; contact TurkTicaret before Reissue, an order may exist.

On an order request (new), a non-200 HTTP answer or an unparsable body is VENDOR_NO_RESPONSE (above). While polling, the same answers are transient and polled again at the next tick. The certificate chain is accepted in either shape the vendor uses (the leaf alone plus intermediates and root, or one file holding all of them) and from the ca_cert field (a list or a single value); the root is never served.

Testing without a live account​

Point a connection at the vendor's sandbox address with a sandbox key. Orders placed there return real-shaped answers (including a real DNS record to write) without touching production credits, and answer CERT_IS_NOT_READY for about the first five minutes. The certificates the sandbox issues carry your key and your domain as the common name, but no subject alternative name, so CertAutoPilot refuses them (VENDOR_CERT_MISMATCH) — the sandbox proves ordering, reissue, validation and error handling, not issuance end to end.

See also​