> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ionicfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a web domain by origin

> Removes an authorized origin. The operation is idempotent: deleting an
origin that is not present succeeds. If it is registered for Apple Pay,
Ionic deregisters it before removal.




## OpenAPI

````yaml /openapi/web_domains.yaml delete /web_domains
openapi: 3.0.3
info:
  title: Ionic Web Domains API
  version: '2026-09-02'
  description: |
    Manage the website origins allowed to embed Ionic Checkout and register
    eligible domains for Apple Pay.

    Domains are scoped to the Account and to the secret key's test or live
    mode. Use a direct Account secret key; these endpoints do not accept the
    `Ionic-Account` header. A domain is an origin—scheme, host, and optional
    non-default port—not a full page URL. Public domains must use HTTPS; HTTP
    is accepted only for loopback development origins.
servers:
  - url: '{baseUrl}/v1'
    variables:
      baseUrl:
        default: https://api.ionicfi.com
        description: API base URL for your environment.
security:
  - secretKey: []
tags:
  - name: Web Domains
    description: Origins authorized for embedded checkout and browser SDK calls.
  - name: Apple Pay Domains
    description: Apple Pay registration state for an authorized web domain.
paths:
  /web_domains:
    delete:
      tags:
        - Web Domains
      summary: Delete a web domain by origin
      description: |
        Removes an authorized origin. The operation is idempotent: deleting an
        origin that is not present succeeds. If it is registered for Apple Pay,
        Ionic deregisters it before removal.
      operationId: deleteWebDomainByOrigin
      parameters:
        - name: domain
          in: query
          required: true
          description: Origin to remove, such as `https://shop.example.com`.
          schema:
            type: string
            minLength: 1
      responses:
        '204':
          description: The origin is no longer authorized.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/WriteForbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/Unavailable'
      security:
        - secretKey:
            - web_domains:write
components:
  responses:
    BadRequest:
      description: The domain, identifier, or request body is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    WriteForbidden:
      description: A direct Account key with `web_domains:write` is required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Too many requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unavailable:
      description: Apple Pay domain registration is temporarily unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
            message:
              type: string
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: 'An Account secret key (`sk_…`) sent as `Authorization: Bearer <key>`.'

````