# Get domains Apple Pay

Get domains registered with Apple Pay.

Read our [Apple Pay tutorial](https://docs.moov.io/guides/sources/cards/apple-pay/#register-your-domains) to learn more.

To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
you'll need to specify the `/accounts/{accountID}/apple-pay.read` scope.

GET

/accounts/{accountID}/apple-pay/domains

Ask

```shell
curl -X GET "https://api.moov.io/accounts/{accountID}/apple-pay/domains" \
  -H "Authorization: Bearer {token}" \
  -H "X-Moov-Version: v2026.07.00"
```

Ask

```go
mc, _ := moov.NewClient()

var accountID string

mc.GetApplePayDomain(ctx, accountID)
```

Ask

```typescript
import { Moov } from "@moovio/sdk";

const moov = new Moov({
  security: {
    username: "",
    password: "",
  },
});

async function run() {
  const result = await moov.applePay.getMerchantDomains({
    accountID: "28704d00-d07b-47db-9e54-016a9713d697",
  });

console.log(result);
}

run();
```

Ask

```php
declare(strict_types=1);

require 'vendor/autoload.php';

use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;

$sdk = MoovPhp\Moov::builder()
    ->setSecurity(
        new Components\Security(
            username: '',
            password: '',
        )
    )
    ->build();

$response = $sdk->applePay->getDomains(
    accountID: '28704d00-d07b-47db-9e54-016a9713d697'
);

if ($response->applePayMerchantDomains !== null) {
    // handle response
}
```

Ask

```java
package hello.world;

import io.moov.sdk.Moov;
import io.moov.sdk.models.components.Security;
import io.moov.sdk.models.operations.GetApplePayMerchantDomainsResponse;
import java.lang.Exception;

public class Application {

public static void main(String[] args) throws Exception {

Moov sdk = Moov.builder()
                .security(Security.builder()
                    .username("")
                    .password("")
                    .build())
            .build();

GetApplePayMerchantDomainsResponse res = sdk.applePay().getMerchantDomains()
                .accountID("28704d00-d07b-47db-9e54-016a9713d697")
                .call();

if (res.applePayMerchantDomains().isPresent()) {
            System.out.println(res.applePayMerchantDomains().get());
        }
    }
}
```

Ask

```python
from moovio_sdk import Moov
from moovio_sdk.models import components

with Moov(
    security=components.Security(
        username="",
        password="",
    ),
) as moov:

res = moov.apple_pay.get_merchant_domains(account_id="28704d00-d07b-47db-9e54-016a9713d697")

# Handle response
    print(res)
```

Ask

```ruby
require 'moov_ruby'

Models = ::Moov::Models
s = ::Moov::Client.new(
  security: Models::Components::Security.new(
    username: '',
    password: ''
  )
)
res = s.apple_pay.get_merchant_domains(account_id: '28704d00-d07b-47db-9e54-016a9713d697')

unless res.apple_pay_merchant_domains.nil?
  # handle response
end
```

Ask

```csharp
using Moov.Sdk;
using Moov.Sdk.Models.Components;

var sdk = new MoovClient(security: new Security() {
    Username = "",
    Password = "",
});

var res = await sdk.ApplePay.GetMerchantDomainsAsync(accountID: "28704d00-d07b-47db-9e54-016a9713d697");

// handle response
```

The request completed successfully.

Ask

Example

```json
{
  "accountID": "string",
  "displayName": "string",
  "domains": [
    "checkout.classbooker.dev"
  ],
  "createdOn": "2019-08-24T14:15:22Z",
  "updatedOn": "2019-08-24T14:15:22Z"
}
```

### Response headers

A unique identifier used to trace requests.

The request contained missing or expired authentication.

### Response headers

A unique identifier used to trace requests.

The user is not authorized to make the request.

### Response headers

A unique identifier used to trace requests.

The requested resource was not found.

### Response headers

A unique identifier used to trace requests.

Request was refused due to rate limiting.

### Response headers

A unique identifier used to trace requests.

The request failed due to an unexpected error.

### Response headers

A unique identifier used to trace requests.

The request failed because a downstream service failed to respond.

### Response headers

A unique identifier used to trace requests.

Set this header to v2026.07.00 to use the API described in this specification. When omitted, the server defaults to v2024.01.00, which may not match the behavior documented here.

Possible values:

`v2026.07.00`

ID of the Moov account representing the merchant.

A UTF-8 string to display in the Buy button.

A unique list of fully-qualified, top-level or sub-domain names where you will accept Apple Pay.
