import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs"; import * as core from "../../../../core/index.mjs"; import * as Whop from "../../../index.mjs"; export declare namespace PaymentMethodDomainsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * The Payment Method Domains API is deprecated. Add, check, and remove Apple Pay domains with the `apple_pay` capability of the [Domains API](/api-reference/beta/domains/domain) instead. These endpoints keep working and return `Deprecation` and successor `Link` headers. A domain keeps its ID, so `/domains/{id}` takes the `dom_` or `pmd_` ID these endpoints return. * * A Payment Method Domain registers a hostname with a wallet provider so its payment methods can appear at a checkout served from that domain. The domain proves ownership by hosting the provider's association file — for Apple Pay, at `/.well-known/apple-developer-merchantid-domain-association` — and `status` reports whether verification has completed. Embedded surfaces like the [Express Checkout element](/elements/beta/checkout/expressCheckout) only render Apple Pay, Google Pay and PayPal express on a `verified` domain (first-party whop.com pages are pre-approved). * * | Payment Method Domains API | Domains API | * | --- | --- | * | `GET /payment_method_domains?status=verified` | `GET /domains?apple_pay=ready`, or `apple_pay=any` for every Apple Pay domain | * | `?hostname=` | `?domain=` | * | `GET /payment_method_domains/{id}` | `GET /domains/{id}` | * | `POST /payment_method_domains` with `hostname` and `account_id` | `POST /domains` with `domain`, `account_id`, and `apple_pay: {}`. If the account already has the domain, `PATCH /domains/{id}` with `apple_pay: {}` | * | `POST /payment_method_domains/{id}/verify` | `POST /domains/{id}/check` | * | `DELETE /payment_method_domains/{id}` | `PATCH /domains/{id}` with `apple_pay: null` | * | `hostname` | `domain` | * | `status: verified` | `apple_pay.state: ready` | * | `status: pending` | `apple_pay.state: pending` while Whop registers the domain, or `action_required` until you host the association file and check the domain | * | `provider` | No field: every Apple Pay domain is registered with Apple | * * Registration runs in the background, so creating or checking a domain returns `pending`: retrieve the domain until `apple_pay.state` is `ready` or `action_required`. The Domains API needs the `domain:read` and `domain:manage` permissions instead of `company:manage_checkout`, so give API keys those scopes. `DELETE /domains/{id}` removes the whole domain, including any website on it, so use `PATCH` to remove only Apple Pay. */ export declare class PaymentMethodDomainsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: PaymentMethodDomainsClient.Options); /** * @deprecated * * Lists the payment method domains registered for your account and its connected accounts. Deprecated: list domains with `GET /domains` and the `apple_pay` filter instead. * * @param {Whop.ListPaymentMethodDomainsRequest} request * @param {PaymentMethodDomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.paymentMethodDomains.list() */ list(request?: Whop.ListPaymentMethodDomainsRequest, requestOptions?: PaymentMethodDomainsClient.RequestOptions): Promise>; /** * @deprecated * * Registers a hostname with the wallet provider and attempts verification inline. Returns `verified` when the provider fetched the domain-association file (for Apple Pay, `/.well-known/apple-developer-merchantid-domain-association`), or `pending` when it could not: host the file, then retry with `POST /payment_method_domains/:id/verify`. Deprecated: add Apple Pay with `POST /domains` and `apple_pay: {}` instead. * * @param {Whop.CreatePaymentMethodDomainsRequest} request * @param {PaymentMethodDomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.paymentMethodDomains.create({ * hostname: "pending.shinetime.com" * }) */ create(request: Whop.CreatePaymentMethodDomainsRequest, requestOptions?: PaymentMethodDomainsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * @deprecated * * Retrieves a payment method domain to check its verification status. Deprecated: retrieve the domain with `GET /domains/{id}` instead, using the same ID. * * @param {Whop.RetrievePaymentMethodDomainsRequest} request * @param {PaymentMethodDomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.paymentMethodDomains.retrieve({ * id: "id" * }) */ retrieve(request: Whop.RetrievePaymentMethodDomainsRequest, requestOptions?: PaymentMethodDomainsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * @deprecated * * Unregisters a payment method domain so its wallet payment methods stop rendering there. Deprecated: remove Apple Pay with `PATCH /domains/{id}` and `apple_pay: null` instead. `DELETE /domains/{id}` removes the whole domain, including any website on it. * * @param {Whop.DeletePaymentMethodDomainsRequest} request * @param {PaymentMethodDomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.paymentMethodDomains.delete({ * id: "id" * }) */ delete(request: Whop.DeletePaymentMethodDomainsRequest, requestOptions?: PaymentMethodDomainsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * @deprecated * * Re-attempts provider verification of a pending domain once the association file is hosted. Fails with a `bad_request` explaining what to fix; verifying an already `verified` domain is a no-op. Deprecated: check the domain with `POST /domains/{id}/check` instead. * * @param {Whop.VerifyPaymentMethodDomainsRequest} request * @param {PaymentMethodDomainsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.paymentMethodDomains.verify({ * id: "id" * }) */ verify(request: Whop.VerifyPaymentMethodDomainsRequest, requestOptions?: PaymentMethodDomainsClient.RequestOptions): core.HttpResponsePromise; private __verify; }