> For the complete documentation index, see [llms.txt](https://docs.loomgate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.loomgate.io/en/integrations/apple-pay-google-pay.md).

# Apple Pay and Google Pay

Register your domains so the card form shows Apple Pay and Google Pay.

Apple Pay and Google Pay appear in the card form on domains that are activated for your account. One registration covers both wallets; fees are the same as for card payments. No code changes needed: `loomgate.js` shows the wallets automatically once the domain is activated (remember to call `confirm()` directly in the click handler).

## Steps

{% stepper %}
{% step %}

### Add your domain

In the dashboard, [**Apple Pay & Google Pay**](https://app.loomgate.io/wallet-domains) section, add the domain that hosts your checkout page, for example `shop.example.com` (the domain only: no `https://`, no path, no port). Up to 20 domains.
{% endstep %}

{% step %}

### Host the verification file

Download the verification file from the dashboard (or with your publishable key):

```bash
curl -o apple-developer-merchantid-domain-association \
  -H "Authorization: Bearer pk_live_…" \
  https://api.loomgate.io/partner/v1/client/apple-pay/domain-association
```

Serve that file, unchanged, at:

```
https://<domain>/.well-known/apple-developer-merchantid-domain-association
```

The file must return a direct `200` over valid HTTPS: no redirect, no login, no file extension.
{% endstep %}

{% step %}

### Add the DNS record

Add the TXT record the dashboard shows for that domain:

| Name                              | Value                                      |
| --------------------------------- | ------------------------------------------ |
| `_loomgate-verification.<domain>` | `loomgate-domain-verification=<your code>` |
| {% endstep %}                     |                                            |

{% step %}

### Verify

Click **Xác minh** (Verify). Loomgate checks the TXT record first, then downloads the file from your domain. Once both checks pass, the domain moves to awaiting activation. Loomgate activates the domain, and the wallets then appear in the card form on that domain.
{% endstep %}
{% endstepper %}

## Domain statuses

| Status            | Meaning                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| `unverified`      | Just added, not verified yet                                                                      |
| `pending`         | Verified, awaiting activation by Loomgate                                                         |
| `active`          | Activated: Apple Pay and Google Pay appear on this domain                                         |
| `rejected`        | Rejected with a reason, or the domain belongs to another account. You can fix it and verify again |
| `removal_pending` | An active domain was removed, awaiting deregistration                                             |

## When verification fails

The dashboard shows the reason as a code:

| Code                                   | What to check                                                                           |
| -------------------------------------- | --------------------------------------------------------------------------------------- |
| `txt_missing`, `txt_mismatch`          | The TXT record is missing or has the wrong value (DNS may take a few minutes to update) |
| `dns_failed`                           | The domain's DNS could not be looked up                                                 |
| `file_unreachable`, `file_tls_invalid` | Could not connect over HTTPS, or the certificate is invalid                             |
| `file_redirect`                        | The file path redirects                                                                 |
| `file_http_status`                     | The file does not return 200                                                            |
| `file_mismatch`, `file_too_large`      | The file content differs from the file downloaded from the dashboard                    |

Each account can verify up to 10 times per minute. If the dashboard says the domain needs a new file, download the file again, replace it on your server, then verify again.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.loomgate.io/en/integrations/apple-pay-google-pay.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
