This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# List payment method domains

GET https://api-sandbox.payabli.com/api/PaymentMethodDomain/list

Get a list of payment method domains that belong to a PSP, organization, or paypoint.

Reference: https://docs.payabli.com/developers/api-reference/paymentmethoddomain/get-list-of-payment-method-domains

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi
  version: 1.0.0
paths:
  /PaymentMethodDomain/list:
    get:
      operationId: list-payment-method-domains
      summary: List payment method domains for an entity
      description: >-
        Get a list of payment method domains that belong to a PSP, organization,
        or paypoint.
      tags:
        - subpackage_paymentMethodDomain
      parameters:
        - name: entityId
          in: query
          description: >-
            Identifier for the organization or paypoint. 

            - For organization, provide the organization ID - For paypoint,
            provide the paypoint ID
          required: false
          schema:
            type: integer
            format: int64
        - name: entityType
          in: query
          description: |-
            The type of entity. Valid values: 
              - organization
              - paypoint
              - psp
          required: false
          schema:
            type: string
        - name: fromRecord
          in: query
          description: Number of records to skip. Defaults to `0`.
          required: false
          schema:
            type: integer
            default: 0
        - name: limitRecord
          in: query
          description: Max number of records for query response. Defaults to `20`.
          required: false
          schema:
            type: integer
            default: 20
        - name: requestToken
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/type_paymentMethodDomain:ListPaymentMethodDomainsResponse
        '400':
          description: Bad request/ invalid data
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal API Error
          content:
            application/json:
              schema:
                description: Any type
        '503':
          description: Database connection error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:PayabliApiResponse'
servers:
  - url: https://api-sandbox.payabli.com/api
  - url: https://api.payabli.com/api
components:
  schemas:
    type_:ApplePayMetadata:
      type: object
      properties:
        isFileAvailable:
          type: boolean
          description: >-
            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:
          type: boolean
          description: >-
            Indicates whether the domain verification file content is valid. If
            the file is invalid, try downloading it and hosting it again.
        redirectDomainName:
          type: string
          description: The domain name if the domain verification URL returns a redirect.
        redirectUrl:
          type: string
          description: >-
            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:
          type: integer
          description: The status code return by the domain verification URL.
      description: >-
        This metadata appears only when the domain verification check fails. It
        gives more information about why the check failed.
      title: ApplePayMetadata
    type_:ApplePayStatusData:
      type: object
      properties:
        errorMessage:
          type: string
          description: Any error message related to Apple Pay's activation status.
        metadata:
          $ref: '#/components/schemas/type_:ApplePayMetadata'
      description: Details about the Apple Pay service status.
      title: ApplePayStatusData
    type_:IsEnabled:
      type: boolean
      description: When `true`, the service is enabled.
      title: IsEnabled
    type_:ApplePayData:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/type_:ApplePayStatusData'
          description: >-
            This object is only returned when the domain verification check
            fails. If a domain has failed validation, this object contains
            information about the failure.
        isEnabled:
          $ref: '#/components/schemas/type_:IsEnabled'
          description: When `true`, Apple Pay is enabled.
      description: Details about the status of the Apple Pay service.
      title: ApplePayData
    type_:GooglePayMetadata:
      type: object
      properties:
        statusCode:
          type: integer
          description: The status code return by the domain verification URL.
        redirectUrl:
          type: string
          description: >-
            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.
        redirectDomainName:
          type: string
          description: The domain name if the domain verification URL returns a redirect.
      description: >-
        This metadata appears only when the domain verification check fails. It
        gives more information about why the check failed.
      title: GooglePayMetadata
    type_:GooglePayStatusData:
      type: object
      properties:
        errorMessage:
          type: string
          description: Any error message related to Google Pay's activation status.
        metadata:
          $ref: '#/components/schemas/type_:GooglePayMetadata'
      description: Details about the Google Pay service status.
      title: GooglePayStatusData
    type_:GooglePayData:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/type_:GooglePayStatusData'
          description: >-
            This object is only returned when the domain verification check
            fails. If a domain has failed validation, this object contains
            information about the failure.
        isEnabled:
          $ref: '#/components/schemas/type_:IsEnabled'
          description: When `true`, Google Pay is enabled.
      description: Details about the status of the Google Pay service.
      title: GooglePayData
    type_:CreatedAt:
      type: string
      format: date-time
      description: Timestamp of when record was created, in UTC.
      title: CreatedAt
    type_:JobId:
      type: string
      description: The cascade process ID.
      title: JobId
    type_:JobStatus:
      type: string
      description: |-
        The cascade process status. Available values: 
          - `in_progress`
          - `completed`
          - `failed`
      title: JobStatus
    type_:LastModified:
      type: string
      format: date-time
      description: Timestamp of when record was last updated, in UTC.
      title: LastModified
    type_:CascadeJobDetails:
      type: object
      properties:
        createdAt:
          $ref: '#/components/schemas/type_:CreatedAt'
        jobErrorMessage:
          type: string
          description: Error message for a failed cascade process.
        jobId:
          $ref: '#/components/schemas/type_:JobId'
        jobStatus:
          $ref: '#/components/schemas/type_:JobStatus'
        updatedAt:
          $ref: '#/components/schemas/type_:LastModified'
      description: Details about the cascade process.
      title: CascadeJobDetails
    type_:DomainName:
      type: string
      description: >-
        The domain. For example: `subdomain.domain.com` or `domain.com`. Must
        be  public. Can't be `localhost`, hidden by a VPN, or protected by a
        password.
      title: DomainName
    type_:EntityId:
      type: integer
      format: int64
      description: |-
        The entity's ID in Payabli. If the entity is a paypoint, this is the
        paypoint ID. If the entity is an organization, this is the organization
        ID.
      title: EntityId
    type_:EntityType:
      type: string
      description: |-
        The entity type. Available values:
          - paypoint
          - organization
          - psp (payment service provider)
      title: EntityType
    type_:PaymentMethodDomainId:
      type: string
      description: The payment method domain's ID in Payabli.
      title: PaymentMethodDomainId
    type_:OwnerEntityId:
      type: integer
      format: int64
      description: >-
        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.`
      title: OwnerEntityId
    type_:OwnerEntityType:
      type: string
      description: |-
        The domain's owner's entity type. Available values:
          - paypoint
          - organization
          - psp (payment service provider).
      title: OwnerEntityType
    type_:PaymentMethodDomainApiResponse:
      type: object
      properties:
        type:
          type:
            - string
            - 'null'
          description: >-
            The record type. For payment method domains, this is always
            `PaymentMethodDomain`.
        applePay:
          $ref: '#/components/schemas/type_:ApplePayData'
        googlePay:
          $ref: '#/components/schemas/type_:GooglePayData'
        cascades:
          type: array
          items:
            $ref: '#/components/schemas/type_:CascadeJobDetails'
          description: Data about the domain's cascade status.
        createdAt:
          $ref: '#/components/schemas/type_:CreatedAt'
        domainName:
          $ref: '#/components/schemas/type_:DomainName'
        entityId:
          $ref: '#/components/schemas/type_:EntityId'
        entityType:
          $ref: '#/components/schemas/type_:EntityType'
        id:
          $ref: '#/components/schemas/type_:PaymentMethodDomainId'
        ownerEntityId:
          $ref: '#/components/schemas/type_:OwnerEntityId'
        ownerEntityType:
          $ref: '#/components/schemas/type_:OwnerEntityType'
        updatedAt:
          $ref: '#/components/schemas/type_:LastModified'
      required:
        - type
        - applePay
        - googlePay
        - createdAt
        - domainName
        - entityId
        - entityType
        - id
        - ownerEntityId
        - ownerEntityType
      description: Data related to the payment method domain.
      title: PaymentMethodDomainApiResponse
    type_:PageIdentifier:
      type: string
      description: Auxiliary validation used internally by payment pages and components.
      title: PageIdentifier
    type_:Pagesize:
      type: integer
      description: Number of records on each response page.
      title: Pagesize
    type_:Totalrecords:
      type: integer
      description: Total number of records in response.
      title: Totalrecords
    type_:QuerySummaryNoAmt:
      type: object
      properties:
        pageIdentifier:
          $ref: '#/components/schemas/type_:PageIdentifier'
        pageSize:
          $ref: '#/components/schemas/type_:Pagesize'
        totalPages:
          $ref: '#/components/schemas/type_:Totalrecords'
        totalRecords:
          $ref: '#/components/schemas/type_:Totalrecords'
      title: QuerySummaryNoAmt
    type_paymentMethodDomain:ListPaymentMethodDomainsResponse:
      type: object
      properties:
        records:
          type: array
          items:
            $ref: '#/components/schemas/type_:PaymentMethodDomainApiResponse'
        summary:
          $ref: '#/components/schemas/type_:QuerySummaryNoAmt'
      required:
        - records
        - summary
      title: ListPaymentMethodDomainsResponse
    type_:IsSuccess:
      type: boolean
      description: >-
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    type_:Responsedata:
      type: object
      additionalProperties:
        description: Any type
      description: The object containing the response data.
      title: Responsedata
    type_:ResponseText:
      type: string
      description: 'Response text for operation: ''Success'' or ''Declined''.'
      title: ResponseText
    type_:PayabliApiResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseData:
          $ref: '#/components/schemas/type_:Responsedata'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: PayabliApiResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: requestToken

```

## SDK Code Examples

```typescript PaypointDomains
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.paymentMethodDomain.listPaymentMethodDomains({
        entityId: 1147,
        entityType: "paypoint",
    });
}
main();

```

```python PaypointDomains
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.payment_method_domain.list_payment_method_domains(
    entity_id=1147,
    entity_type="paypoint",
)

```

```csharp PaypointDomains
using PayabliPayabliApi;
using System.Threading.Tasks;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.PaymentMethodDomain.ListPaymentMethodDomainsAsync(
            new ListPaymentMethodDomainsRequest {
                EntityId = 1147L,
                EntityType = "paypoint"
            }
        );
    }

}

```

```go PaypointDomains
package main

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

func main() {

	url := "https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=1147&entityType=paypoint"

	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 PaypointDomains
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=1147&entityType=paypoint")

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 PaypointDomains
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=1147&entityType=paypoint")
  .header("requestToken", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=1147&entityType=paypoint', [
  'headers' => [
    'requestToken' => '<apiKey>',
  ],
]);

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

```swift PaypointDomains
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=1147&entityType=paypoint")! 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()
```

```typescript OrgDomains
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.paymentMethodDomain.listPaymentMethodDomains({
        entityId: 39,
        entityType: "organization",
    });
}
main();

```

```python OrgDomains
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.payment_method_domain.list_payment_method_domains(
    entity_id=39,
    entity_type="organization",
)

```

```csharp OrgDomains
using PayabliPayabliApi;
using System.Threading.Tasks;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.PaymentMethodDomain.ListPaymentMethodDomainsAsync(
            new ListPaymentMethodDomainsRequest {
                EntityId = 39L,
                EntityType = "organization"
            }
        );
    }

}

```

```go OrgDomains
package main

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

func main() {

	url := "https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=39&entityType=organization"

	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 OrgDomains
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=39&entityType=organization")

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 OrgDomains
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=39&entityType=organization")
  .header("requestToken", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=39&entityType=organization', [
  'headers' => [
    'requestToken' => '<apiKey>',
  ],
]);

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

```swift OrgDomains
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/PaymentMethodDomain/list?entityId=39&entityType=organization")! 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()
```