Create Certificate Order API
Purchase a new certificate via the API.
Endpoint
POST /api/v1/certificate/create
Host:
...
Full URL
/api/v1/certificate/create
Request
Content-Type: application/json
Content-Length: 1201
{
"unique_id": "azgZqJGX", // Unique identifier, required, must not be duplicated. Prevents a reseller from submitting the same order twice; pass your order ID when the user clicks, to avoid duplicate charges
"product_id": "sslcom_dv_flex", // Product ID, required. See the `id` field returned by the product list for details
"period": "annually", // Subscription period, required. See the `support_periods` field returned by the product list for supported period options
"domain_dcv": { // Domains + validation info, required. Each domain maps to one validation type
// Notes:
// 1. Wildcards do not support http or https validation
// 2. IP addresses do not support dns or email validation
// 3. For multi-domain orders, www and non-www versions of a domain are charged as two entries
// 4. Email addresses used for domain validation cannot be arbitrary mailboxes;
// the username must be admin@, administrator@, postmaster@, webmaster@ or hostmaster@,
// and the hostname must be a subdomain or the base domain
"*.example.com": "dns", //⚠️Note: wildcards only support dns or email validation
"example2.com": "http", //⚠️Note: http/https use file validation on the subdomain; the file must be uploaded to the subdomain's own server. The base domain or other domains are not accepted
"example3.com": "https",
"sub.example4.com": "admin@example4.com" // ⚠️Note: email validation does not support whois mailboxes; only admin@, administrator@, postmaster@, webmaster@, hostmaster@ + <subdomain or base domain> combinations are supported
},
"csr": "---------BEGIN RSA CERTIFICATE REQUEST---------...", // CSR, required. ⚠️Note: this is a CSR, not a private key or public key! RSA must be 2048 or 4096 bits; ECDSA must be P-256 or P-384; for SM2 products (see "SM2 Certificates" below) the CSR must use the SM2 curve + SM3 signature
"contact_email": "subscriber@company.email", // Contact email, required, used to receive certificate validation notifications
"renew": 0, // Whether this is a renewal order; some CAs offer a bonus 30 days
"organization": "Wudang Mountain Scenic Area", // Company name; required for `OV`, `EV`, `IV` certificate types
"organization_unit": "IT", // Company department; required for `OV`, `EV`, `IV` certificate types
"registered_address_line1": "123 Main Street", // Company registered address; required for `OV`, `EV`, `IV` certificate types
"serial_no": "31041485234546", // Company registration number; required for `OV`, `EV`, `IV` certificate types
"country": "CN", // Country of company registration; required for `OV`, `EV`, `IV` certificate types
"state": "Shanghai", // State/province of company registration; required for `OV`, `EV`, `IV` certificate types
"city": "Shanghai", // City of company registration; required for `OV`, `EV`, `IV` certificate types
"postal_code": "200100", // Company postal code; required for `OV`, `EV`, `IV` certificate types
"organization_phone": "021-10000001", // Company phone number; required for `OV`, `EV`, `IV` certificate types
"date_of_incorporation": "2019-01-01", // Company incorporation date; required for `OV`, `EV`, `IV` certificate types
"contact_name": "John Smith", // Contact name; required for `OV`, `EV`, `IV` certificate types
"contact_title": "CEO", // Contact job title; required for `OV`, `EV`, `IV` certificate types
"contact_phone": "13800138000", // Contact phone number; required for `OV`, `EV`, `IV` certificate types
"notify_url": "https://system.com/order/6163/callback", // Order callback URL, used to receive order status change notifications. This URL must be reachable; see `Callback Notifications` for the notification parameters
"subscriber_identifier": "user_42-A", // Channel + end user identifier, up to 32 characters. Required for some products; see "Channel + End User Identifier" below
"auto_include_www": true, // Whether to auto-include www. + @, optional, included by default. Supported by some products only; see "Auto-include www. + @" below
"dcv_scope": "base_domain" // DCV scope, optional. Supports base_domain (base domain) or apply_domain (subdomain/applied domain). Supported by some products only; see "DCV Scope" below
}
subscriber_identifier carries the identity of the channel and the end users downstream of that channel. It is optional at the API level, but some products require it; contact support for the list of such products.
- If your downstream is a channel, make sure the channel passes through its end user identifier, and combine the channel identifier + channel end user identifier on your side, e.g.
partnerID + '|' + endUserID. - Maximum 32 characters; letters, digits, underscores, hyphens and commas are allowed (use commas to separate multiple identifiers).
- We recommend hashing the concatenated result, e.g.
md5(partnerID + '|' + endUserID): the hash is a fixed 32 characters of hexadecimal only, satisfying both the length and character set limits. - ⚠️ The separator
|itself is not in the allowed character set; if you do not hash, join the two identifiers with,,_or-instead.
The domain keys in domain_dcv accept both punycode and the original Unicode form, e.g. xn--bcher-kva and bücher are equivalent; either form works.
Please note: domains in the API response (such as the keys of dcv and topleveldomain) are always returned in punycode; match against punycode.
auto_include_www controls whether a single-domain certificate automatically includes both www. and the base domain (@). Only some products (such as the AutoCert and Keymatic series) support this; unsupported products ignore the parameter.
- It only takes effect when
domain_dcvcontains exactly 1 domain and that domain is the base domain or awww.subdomain; it does not apply to wildcards, IP addresses or other subdomains. - If the field is omitted, the extra domain is included by default; explicitly passing
falsedisables it. - For example, submitting
example.com(orwww.example.com) with auto-include enabled makes the certificate cover bothexample.comandwww.example.com.
dcv_scope controls whether the DNS validation host record is added under the base domain (root domain) or under the applied subdomain (full FQDN). Only some products (such as the AutoCert and Keymatic series) support this; unsupported products ignore the parameter.
- Allowed values:
base_domain: base domain scope (default). The validation record is added under the root domain (e.g. when applying fora.b.example.com, the DNS record resolves at_dnsauth.example.com).apply_domain: subdomain scope (applied domain scope). The validation record is added directly under the specific subdomain being applied for (e.g. when applying fora.b.example.com, the DNS record resolves at_dnsauth.a.b.example.com). The aliasfqdnis also accepted.
- Default: if the parameter is omitted,
base_domainis used.
The platform offers SM2 (Chinese national cryptography) SSL certificates. Products whose id in the product list contains gm (such as keymatic_gm_dv_flex / keymatic_gm_ov_flex / keymatic_gm_ev_flex) are all SM2 products.
- CSR requirements: the CSR must use the SM2 curve + SM3 signature (not RSA/ECDSA). For example:
Submitting an RSA/ECDSA CSR returnsopenssl ecparam -name SM2 -genkey -noout -out gm.keyopenssl req -new -key gm.key -sm3 -subj "/CN=example.com" -out gm.csr
The csr is invalid. This product only supports SM2 format keys. - SM2 dual certificates: after an SM2 certificate is issued, in addition to the signing certificate there is also an encryption certificate generated by the CA together with its matching private key (the SM2 dual-certificate model). Once issuance completes, the Query Certificate API additionally returns three fields:
cert_pem_sm2_enc(encryption certificate),private_key_sm2_enc(the encryption certificate's private key, already decrypted by the platform, PKCS#8 PEM) andhas_sm2_enc_key; see the "Query Certificate API" for details. - DCV notes: DNS validation for SM2 products is ordinary DNS (a TXT record at
_dnsauth.<base domain>), returned normally in thedcvfield.
Response
- response
- errors
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1015
{
"success": true,
"message": "OK",
"data": {
"cost": 4208.01, // Amount charged for the order
"service_id": "o91bZ", // Certificate ID. Integrators should store this value in their business database (the status query, domain validation attempt and validation method change APIs all need this parameter to identify which certificate the request refers to)
"caid": "358174513", // CA order number
"status": "pending", // Order status: `pending` (application in progress), `issued`, `revoked`, `refunded`
"cert_pem": null, // PEM of the most recently issued certificate
"ca_pem": null, // Certificate chain of the most recently issued certificate
"cert_pem_sm2_enc": null, // SM2 dual certificates: PEM of the encryption certificate generated by the CA; returned only for SM2 products after issuance
"private_key_sm2_enc": null, // SM2 dual certificates: decrypted private key of the encryption certificate (PKCS#8 PEM); returned only for SM2 products after issuance; used together with the encryption certificate
"has_sm2_enc_key": false, // SM2 dual certificates: whether the encryption certificate's private key has been decrypted and is ready
"not_before": null, // Not before
"not_after": null, // Not after
"has_dcv": true, // Some vendors' products (e.g. SHECA) do not return DCV information at order time; listen for the "status"="dcv_generated" event described in "Callback Notifications" to get the latest DCV information in real time
"service_expires_at": "2025-12-31 23:59:59", // Order service expiration time
"dcv": {
// DCV validation information
"*.example.com": {
"type": "dns", // Validation type: `dns`, `http`, `https` or `email`
"subdomain": "*", // Subdomain
"topleveldomain": "example.com", // Base domain
"status": "valid", // Domain validation status: `pending` (validation in progress; the user must complete the DNS record, file upload or email check), `valid` (validated), `caa-failure` (CAA check failed), `dnssec-failure` (DNSSEC security validation failed)
"dns": {
// DNS validation info. If the validation type is `dns`, a `dns` block appears here; if it is `email`, an `email` block appears; if it is `http` or `https`, an `http` or `https` block appears.
"type": "cname", // DNS record type
"hostname": "_310dcbbf4cce62f762a2aaa148d556bd", // DNS hostname
"fullname": "_310dcbbf4cce62f762a2aaa148d556bd.example.com", // Full domain name to add the DNS record for
"value": "698d51a19d8a121ce581499d7b701668.bcbe3365e6ac95ea2c0343a2395834dd.20221122.comodoca.com" // DNS record value
}
},
"example2.com": {
"type": "http",
"subdomain": "",
"topleveldomain": "example2.com",
"status": "pending",
"http": {
// HTTP validation info. If the validation type is `http`, an `http` block appears here.
"filename": "310dcbbf4cce62f762a2aaa148d556bd.txt", // HTTP file name
"filecontent": "698d51a19d8a121ce581499d7b70166820221122\n20221122\ncomodoca.com", // HTTP file content
"filepath": ".well-known/pki-validation/", // HTTP file path
"filefullpath": ".well-known/pki-validation/310dcbbf4cce62f762a2aaa148d556bd.txt", // HTTP file full path
"url": "http://example2.com/.well-known/pki-validation/310dcbbf4cce62f762a2aaa148d556bd.txt" // HTTP file URL
}
},
"example3.com": {
"type": "https",
"subdomain": "",
"topleveldomain": "example3.com",
"status": "pending",
"http": {
// HTTPS validation info. If the validation type is `https`, an `https` block appears here.
"filename": "310dcbbf4cce62f762a2aaa148d556bd.txt", // HTTPS file name
"filecontent": "698d51a19d8a121ce581499d7b70166820221122\n20221122\ncomodoca.com", // HTTPS file content
"filepath": ".well-known/pki-validation/", // HTTPS file path
"filefullpath": ".well-known/pki-validation/310dcbbf4cce62f762a2aaa148d556bd.txt", // HTTPS file full path
"url": "https://example3.com/.well-known/pki-validation/310dcbbf4cce62f762a2aaa148d556bd.txt" // HTTPS file URL
}
},
"sub.example4.com": {
"type": "email",
"subdomain": "email",
"topleveldomain": "example4.com",
"status": "pending",
"email": {
// Email validation info. If the validation type is `email`, an `email` block appears here.
"address": "admin@example4.com", // Email address
"available": [
// Available email addresses
"admin@example4.com",
"administrator@example4.com",
"webmaster@example4.com",
"postmaster@example4.com",
"hostmaster@example4.com",
"admin@email.example4.com",
"administrator@sub.example4.com",
"webmaster@sub.example4.com",
"postmaster@sub.example4.com",
"hostmaster@sub.example4.com"
]
}
}
}
}
}
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 50
{"success": false, "message": "Insufficient balance"}
HTTP/1.1 404 Not Found
Content-Type: application/json
Content-Length: 50
{"success": false, "message": "Product not found"}
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 55
{"success": false, "message": "unique_id conflict"}
HTTP/1.1 400 Bad Request
Content-Type: application/json
Content-Length: 67
{"success": false, "message": "period not supported; this product only supports annually, biennially"}