/** * @example * { * domain: "store.example.com" * } */ export interface CreateDomainsRequest { /** Account ID, prefixed biz_. Required for user credentials; otherwise defaults to the credential's account. */ account_id?: string; /** Accept Apple Pay at checkout on the domain. It needs no other capability. Whop registers the domain with Apple: it stays `pending` until Apple answers, then turns `ready`, or `action_required` when Apple couldn't fetch the domain association file. Serve the file, then check the domain to register it again. Pass `null` to turn Apple Pay off: Whop removes the domain from Apple, and the domain stays, like releasing any other capability. */ apple_pay?: CreateDomainsRequest.ApplePay | null; /** Bare hostname, such as example.com or checkout.example.com. A bought domain must be a root domain. Wildcards, paths, schemes, and ports are not accepted. */ domain: string; /** Send and receive email on the domain. Only a domain bought through Whop, or a subdomain of one in the same account, can have it. Whop publishes the DNS records and stays `pending` until its email provider verifies them, then turns `ready`. Pass `null` to remove email. */ email?: CreateDomainsRequest.Email | null; /** Custom string keys and values. */ metadata?: Record; /** Track page views on the domain with the Whop pixel. It needs no other capability: it stays `pending` until the pixel records a page view, and turns `action_required` if it goes 7 days without one. Pass `null` to stop tracking. */ pixel?: CreateDomainsRequest.Pixel | null; /** Buy the domain through Whop, or transfer in a domain you own elsewhere with `auth_code`, then renew it every year and let Whop run its DNS. Pass `null` to release an unpaid or failed purchase, or to cancel a transfer while its current registrar can still stop it. */ registration?: CreateDomainsRequest.Registration | null; /** Move a domain registered through Whop to another Whop account. Turning it on returns a code in `transfer.code`; the receiving account enters it as `registration.auth_code` on its own copy of the domain. Whop then removes the domain's email, email addresses and Apple Pay from this account, moves the registration with its expiry, stops charging this account to renew it, and removes the domain from this account. Pass `null` to turn it off and invalidate the code, until another account has entered it. */ transfer?: CreateDomainsRequest.Transfer | null; /** Prove you control the domain's DNS: Whop returns a TXT record to publish in `issues`, and whoever publishes it owns the domain on Whop. Pass `null` to release it. Can't be combined with `registration`. */ verification?: CreateDomainsRequest.Verification | null; /** Serve a Whop website on the domain. Pass `null` to stop serving it; the domain keeps its other capabilities. */ website?: CreateDomainsRequest.Website | null; } export declare namespace CreateDomainsRequest { /** * Accept Apple Pay at checkout on the domain. It needs no other capability. Whop registers the domain with Apple: it stays `pending` until Apple answers, then turns `ready`, or `action_required` when Apple couldn't fetch the domain association file. Serve the file, then check the domain to register it again. Pass `null` to turn Apple Pay off: Whop removes the domain from Apple, and the domain stays, like releasing any other capability. */ type ApplePay = {}; /** * Send and receive email on the domain. Only a domain bought through Whop, or a subdomain of one in the same account, can have it. Whop publishes the DNS records and stays `pending` until its email provider verifies them, then turns `ready`. Pass `null` to remove email. */ type Email = {}; /** * Track page views on the domain with the Whop pixel. It needs no other capability: it stays `pending` until the pixel records a page view, and turns `action_required` if it goes 7 days without one. Pass `null` to stop tracking. */ type Pixel = {}; /** * Buy the domain through Whop, or transfer in a domain you own elsewhere with `auth_code`, then renew it every year and let Whop run its DNS. Pass `null` to release an unpaid or failed purchase, or to cancel a transfer while its current registrar can still stop it. */ interface Registration { /** Transfer the domain to Whop instead of buying it. This is the transfer authorization code (also called an EPP code) from the domain's current registrar, which you usually find in its domain settings after unlocking the domain. Whop becomes the domain's registrant, and the domain moves to Whop DNS once the transfer completes, so its current DNS records, including email, stop working. After the transfer, the registry may lock the domain against another transfer for 60 days. While it's `transferring`, pass the same or a new code again to resubmit. Whop never returns the code. To take a domain from another Whop account instead, pass the `whop_dt_` code from its `transfer`: the domain moves without a payment, keeps its expiry and Whop DNS, and can't be cancelled once entered. */ auth_code?: string | undefined; /** Whether Whop charges the saved card to renew the domain before it expires. */ auto_renew?: boolean | undefined; /** Saved card to charge, prefixed `payt_`. It must belong to the signed-in user. Pass `null` to remove it. */ payment_method_id?: (string | null) | undefined; } /** * Move a domain registered through Whop to another Whop account. Turning it on returns a code in `transfer.code`; the receiving account enters it as `registration.auth_code` on its own copy of the domain. Whop then removes the domain's email, email addresses and Apple Pay from this account, moves the registration with its expiry, stops charging this account to renew it, and removes the domain from this account. Pass `null` to turn it off and invalidate the code, until another account has entered it. */ interface Transfer { /** Where the domain moves. `internal` moves it to another Whop account. */ destination?: Transfer.Destination | undefined; } namespace Transfer { /** Where the domain moves. `internal` moves it to another Whop account. */ const Destination: { readonly Internal: "internal"; }; type Destination = (typeof Destination)[keyof typeof Destination]; } /** * Prove you control the domain's DNS: Whop returns a TXT record to publish in `issues`, and whoever publishes it owns the domain on Whop. Pass `null` to release it. Can't be combined with `registration`. */ type Verification = {}; /** * Serve a Whop website on the domain. Pass `null` to stop serving it; the domain keeps its other capabilities. */ interface Website { /** App ID, prefixed app_, of the website to serve. The app must belong to the account. Leave it out to point the domain at Whop before the website exists; it shows a placeholder until you choose one. Pass `null` to detach the app and keep the domain pointed at Whop. */ app_id?: (string | null) | undefined; } }