# List Payment Methods

get ` https://app.mk.io/api/v1/organization/paymentMethods`

## Listing, Sorting and Filtering Payment Methods

This endpoint returns the list of payment methods.

### Sorting

The results from this endpoint can be ordered using the `$orderby` query parameter. Specify a list of field names, separated by commas
where each one can optionally specify `asc` or `desc`.

Sorting is valid on the following fields: `aws/awsAccountId`, `azure/azureSaasSubscriptionId`, `azure/azureSaasSubscriptionName`, `created`, `createdBy`, `displayName`, `id`, `type`

### Filtering

The `$filter` query parameter allows for payment methods to be filtered on the basis of fields in the schema using OData query syntax.
See [this document](https://learn.microsoft.com/en-us/odata/concepts/queryoptions-overview#filter) for more details on the syntax used.

Filters are valid on the following fields: `aws/awsAccountId`, `azure/azureSaasSubscriptionId`, `azure/azureSaasSubscriptionName`, `created`, `createdBy`, `createdByEmail`, `createdByName`, `displayName`, `id`, `type`

### Examples:

`?$top=10` \- Returns only the first 10 payment methods from the list.

`?$orderby=created desc` \- Sorts payment methods by creation date in descending order.

`?$filter=created ge 2021-01-01T00:00:00Z` \- Returns payment methods created after January 1, 2021.

RBAC Capability Required: `core.subscription.get`

## Authentication

Authorization Bearer

Bearer authentication of the form `Bearer <token>`, where token is your
auth token.

## Query parameters

- `$orderby` string Optional
  
  Specifies the key by which the result collection should be ordered.

- `$filter` string Optional
  
  Restricts the set of items returned.

- `$top` string Optional
  
  Specifies a non-negative integer `n` that limits the number of items returned from a collection.
  The service returns the number of available items up to but not greater than the specified value `n`.

- `$skiptoken` string Optional
  
  Specifies a start offset to support paginated results.
  Use `@odata.nextLink` in the result object to enumerate the collection -
it will be present only if there's more than one page of entities.

## Response

200 A list of all payment methods

- `@odata.nextLink` string Optional
  
  `@odata.nextLink` URL if the page length and number of items match.

- supplemental object [ListResponseSupplementalSchema](https://docs.mediakind.com/api-reference/management-api/schemas/listresponsesupplementalschema) Required
  
  Supplemental info
  
  - count integer Required
  - kind string Required
  - operation string Required
  - pagination object [PaginationInfoSchema](https://docs.mediakind.com/api-reference/management-api/schemas/paginationinfoschema) Required

- subscription object [ProjectInfoSchema](https://docs.mediakind.com/api-reference/management-api/schemas/projectinfoschema) Optional

- value list of objects [PaymentMethodSummarySchema](https://docs.mediakind.com/api-reference/management-api/schemas/paymentmethodsummaryschema) Required

## Errors

- 400 Bad Request
  error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

- 401 Unauthorized
  error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

- 403 Forbidden
  error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

- 404 Not Found
  error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

- 429 Too Many Requests
  error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required

- 500 Internal Server Error
  error object [ErrorDetail](https://docs.mediakind.com/api-reference/management-api/schemas/errordetail) Required
