connect_custom_hostname
Connect an existing hostname via CNAME to sites.sornkan.com (no registrar). One-time $1 USDC, same claiming wallet (or editToken for a card-paid site), while lease is live. If the bind is refused after a card payment, the payment stays as a credit: retry with HTTP POST https://publish.sornkan.com/custom-hostname {slug, hostname} plus header X-Edit-Token — no new payment. If the hostname is already on Cloudflare, keep the CNAME proxied. Not a monthly fee. If you have no wallet, get payment_url from the 402 response and show it to the human — they pay by card or Thai PromptPay in THB (no crypto needed); after they pay, poll preview_status/retry until live.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | Live site slug to attach the hostname to | |
| hostname | Yes | Your own domain to point at the site (e.g. www.example.com); CNAME it to sites.sornkan.com | |
| editToken | No | Edit token of a site paid by card/PromptPay (shown once at claim and emailed to the payer). Required to edit/renew/connect a domain on such a site. |