Skip to navigation

Create Custom Domain

View as Markdown

Register a new custom domain for the account.

The domain starts in PENDING status; a background job verifies the merchant’s CNAME and flips it to VERIFIED once DNS resolves.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

account_idstringRequired

Headers

Idempotency-Keystring or nullOptional>=8 characters
A unique key for this request. A retry with the same key returns the first response instead of running again, for 24 hours. Keys are per caller.

Request

This endpoint expects an object.
domainstringRequired

The custom domain (hostname) to serve PaymentKit on

Response

Successful Response
idstring
Unique custom domain identifier
domainstring

The custom domain (hostname)

statusenum
Verification lifecycle status
Allowed values:
cname_targetstring
The host the merchant must point a CNAME record at
apple_payobject

Apple Pay configuration state for this domain (configured / assigned processor / failure reason). ‘Not configured’ when no file is stored.

created_atdatetime
When the custom domain was registered
updated_atdatetime
When the custom domain was last updated
last_checked_atdatetime or nullOptional
When the DNS verification was last attempted
verified_atdatetime or nullOptional
When the domain's CNAME was first verified
error_messagestring or nullOptional
Last verification error, if any
dns_auth_cnameobject or nullOptional

Second CNAME record to add for certificate issuance; present once certificate provisioning has started

certificate_provisioningbooleanOptionalDefaults to false

True while the domain is verified and its certificate is being provisioned (derived presentation state)

Errors

422
Unprocessable Entity Error