> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://beta-docs.payabli.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://beta-docs.payabli.com/_mcp/server.

# Get payment method domain

GET https://api-sandbox.payabli.com/api/PaymentMethodDomain/{domainId}

Get the details for a payment method domain.

Reference: https://beta-docs.payabli.com/api-reference/paymentmethoddomain/paymentmethoddomain-get

## Authentication

- `requestToken` header (required) — API Key authentication via header

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Path parameters

- `domainId` (string, required) — The payment method domain's ID in Payabli.

## Response

### 200

Success response that includes a payment method domain's details.

- `applePay` (ApplePayData, optional) — Details about the status of the Apple Pay service.
- `cascades` (list of CascadeJobDetails, optional) — Data about the domain's cascade status.
- `createdAt` (datetime, optional) — Timestamp of when record was created, in UTC.
- `domainName` (string, optional) — The domain. For example: `subdomain.domain.com` or `domain.com`
- `entityId` (long, optional) — The entity's ID in Payabli.
- `entityType` (string, optional) — The entity type. Available values: - paypoint - organization - psp (payment service provider).
- `id` (string, optional) — The payment method domain's ID in Payabli.
- `ownerEntityId` (long, optional) — The domain's owning entity's ID in Payabli. This value might be different than the `entityId`, depending on whether the domain is cascaded and whether it's inherited.`
- `ownerEntityType` (string, optional) — The domain's owner's entity type. Available values: - paypoint - organization - psp (payment service provider).
- `updatedAt` (datetime, optional) — Timestamp of when record was last updated, in UTC.

## Errors

### 400 Bad Request Error

Bad request/ invalid data

- `any`

### 400 Bad Request Error

Bad request/ invalid data

- `any`

### 401 Unauthorized Error

Unauthorized request.

- `any`

### 500 Internal Server Error

Internal API Error

- `any`

### 503 Service Unavailable Error

Database connection error

- `isSuccess` (boolean, optional) — Boolean indicating whether the operation was successful. A `true` value indicates success. A `false` value indicates failure.
- `responseData` (map from string to any, optional) — The object containing the response data.
- `responseText` (string, optional) — Response text for operation: 'Success' or 'Declined'.

## Types

### ApplePayData

Details about the status of the Apple Pay service.

- `data` (ApplePayStatusData, optional) — Details about the Apple Pay service status.
- `isEnabled` (boolean, optional) — When `true`, Apple Pay is enabled.

### CascadeJobDetails

Details about the cascade process.

- `createdAt` (datetime, optional) — Timestamp of when record was created, in UTC.
- `jobErrorMessage` (string, optional) — Error message for a failed cascade process.
- `jobId` (string, optional) — The cascade process ID.
- `jobStatus` (string, optional) — The cascade process status. Available valudes: - in_progress - completed - failed
- `updatedAt` (datetime, optional) — Timestamp of when record was last updated, in UTC.

### ApplePayStatusData

Details about the Apple Pay service status.

- `errorMessage` (string, optional) — Any error message related to Apple Pay's activation status.
- `metadata` (ApplePayMetadata, optional) — This metadata appears only when the domain verification check fails. It gives more information about why the check failed.

### ApplePayMetadata

This metadata appears only when the domain verification check fails. It gives more information about why the check failed.

- `isFileAvailable` (boolean, optional) — When `true`, indicates whether the domain verification file is available at the expected path. When `false`, Payabli was unable to find the file at the expected path. If the file is missing, make sure it's hosted at the correct path: `/.well-known/apple-developer-merchantid-domain-association`
- `isFileContentValid` (boolean, optional) — Indicates whether the domain verification file content is valid. If the file is invalid, try downloading it and hosting it again.
- `redirectDomainName` (string, optional) — The domain name if the domain verification URL returns a redirect.
- `redirectUrl` (string, optional) — If the domain verification URL is redirected, this is the URL it's redirected to. For example, www.partner.com could redirect to www.partners-new-home-page.com. In this case, you should add www.partners-new-home-page.com as a domain instead of www.partner.com.
- `statusCode` (integer, optional) — The status code return by the domain verification URL.

## Examples

**Response**

```json
{
  "applePay": {
    "data": {
      "errorMessage": "null"
    },
    "isEnabled": true
  },
  "cascades": [
    {
      "createdAt": "2022-07-01T15:00:01Z",
      "jobErrorMessage": "jobErrorMessage",
      "jobId": "445865",
      "jobStatus": "completed",
      "updatedAt": "2022-07-01T15:00:01Z"
    }
  ],
  "createdAt": "2022-07-01T15:00:01Z",
  "domainName": "subdomain.domain.com",
  "entityId": 109,
  "entityType": "paypoint",
  "id": "pmd_12AB",
  "ownerEntityId": 109,
  "ownerEntityType": "organization",
  "updatedAt": "2022-07-01T15:00:01Z"
}
```

**SDK Code**

```python
import requests

url = "https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_12AB"

headers = {"requestToken": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_12AB';
const options = {method: 'GET', headers: {requestToken: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_12AB"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("requestToken", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_12AB")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["requestToken"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_12AB")
  .header("requestToken", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_12AB', [
  'headers' => [
    'requestToken' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_12AB");
var request = new RestRequest(Method.GET);
request.AddHeader("requestToken", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["requestToken": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/PaymentMethodDomain/pmd_12AB")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```