> ## Documentation Index
> Fetch the complete documentation index at: https://adyen-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Payment Methods Through API

> Learn how to manage your payment methods for your marketplace using the Management API.

By using the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview), you can:

* Get a list of all payment methods configured for your merchant account.
* Get the details of a payment method.
* Enable or disable a payment method.
* Change the country/region or currency of a payment method.

## Requirements

Before you begin, take into account the following requirements, limitations, and preparations.

| Requirement | Description | |
| - | - | - |
| **Integration type** | You must have an Adyen [online payments integration and a checkout UI](https://adyen-preview.mintlify.site/online-payments/build-your-integration). | |
| **[API credential roles](https://adyen-preview.mintlify.site/development-resources/api-credentials/roles.md)** | Your [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview) credential must have the following role: **Management API—Payment methods read and write** | |
| **Limitations** | You can only configure payment methods that are [supported for your currency and integration](https://adyen-preview.mintlify.site/marketplaces/payment-methods#supported-payment-methods). It may take some time for the payment method to become available due to external factors. Payment methods typically appear within a day. To avoid delays, we recommend requesting payment methods at least one day before the business opens. | |

## Get a list of all payment methods

To get the details of all payment methods configured on your merchant account, make a GET [/merchants/\{merchantId}/paymentMethodSettings](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/paymentMethodSettings) request with the ID of your merchant account in the path.

**Get a list of payment methods**

```bash curl theme={null}
curl https://management-test.adyen.com/v3/merchants/{merchantId}/paymentMethodSettings \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X GET \
-d
```

```java Java theme={null}
// Adyen Java API Library v37.0.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.management.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.service.management.*;

Client client = new Client("ADYEN_API_KEY", Environment.TEST);
// Send the request
PaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client);
PaymentMethodResponse response = service.getAllPaymentMethods("merchantId", "String", "String", 1, 1, null);
```

```php PHP theme={null}
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Service\Management\PaymentMethodsMerchantLevelApi;

$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);

$requestOptions['queryParams'] = array('storeId' => 'string', 'businessLineId' => 'string', 'pageSize' => 'integer', 'pageNumber' => 'integer');

// Send the request
$service = new PaymentMethodsMerchantLevelApi($client);
$response = $service->getAllPaymentMethods('merchantId', $requestOptions);
```

```cs C# theme={null}
// Adyen .net API Library v31.0.0
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.Management;
using Adyen.Service.Management;

var config = new Config()
{
    XApiKey = "ADYEN_API_KEY",
    Environment = Environment.Test
};
var client = new Client(config);

// Send the request
var service = new PaymentMethodsMerchantLevelService(client);
var response = service.GetAllPaymentMethods("merchantId", storeId: "string", businessLineId: "string", pageSize: 1, pageNumber: 1);
```

```js NodeJS (JavaScript) theme={null}
// Adyen Node API Library v26.1.0
const { Client, ManagementAPI } = require('@adyen/api-library');

const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.PaymentMethodsMerchantLevelApi.getAllPaymentMethods("merchantId", "string", "string", 1, 1);
```

```go Go theme={null}
// Adyen Go API Library v20.0.0
import (
  "context"
  "github.com/adyen/adyen-go-api-library/v20/src/common"
  "github.com/adyen/adyen-go-api-library/v20/src/adyen"
  "github.com/adyen/adyen-go-api-library/v20/src/management"
)
client := adyen.NewClient(&common.Config{
  ApiKey:      "ADYEN_API_KEY",
  Environment: common.TestEnv,
})

// Send the request
service := client.Management()
req := service.PaymentMethodsMerchantLevelApi.GetAllPaymentMethodsInput("merchantId")
req = req.StoreId("string").BusinessLineId("string").PageSize(1).PageNumber(1)
res, httpRes, err := service.PaymentMethodsMerchantLevelApi.GetAllPaymentMethods(context.Background(), req)
```

```py Python theme={null}
# Adyen Python API Library v13.4.0
import Adyen

adyen = Adyen.Adyen()
adyen.client.xapikey = "ADYEN_API_KEY"
adyen.client.platform = "test" # The environment to use library in.

query_parameters = {
  "storeId" : "string",
  "businessLineId" : "string",
  "pageSize" : "integer",
  "pageNumber" : "integer"
}

# Send the request
result = adyen.management.payment_methods_merchant_level_api.get_all_payment_methods(merchantId="merchantId", query_parameters=query_parameters)
```

```rb Ruby theme={null}
# Adyen Ruby API Library v10.2.0
require "adyen-ruby-api-library"

adyen = Adyen::Client.new
adyen.api_key = 'ADYEN_API_KEY'
adyen.env = :test # Set to "live" for live environment

# Create the request object(s)
query_params = {
  :storeId => 'string',
  :businessLineId => 'string',
  :pageSize => 'integer',
  :pageNumber => 'integer'
}

# Send the request
result = adyen.management.payment_methods_merchant_level_api.get_all_payment_methods('merchantId', query_params: query_params)
```

```ts NodeJS (TypeScript) theme={null}
// Adyen Node API Library v26.1.0
import { Client, ManagementAPI, Types } from "@adyen/api-library";

const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.PaymentMethodsMerchantLevelApi.getAllPaymentMethods("merchantId", "string", "string", 1, 1);
```

## Get the details of a specific payment method

To get the details of a specific payment method, make a GET [/merchants/\{merchantId}/paymentMethodSettings/\{paymentMethodId}](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/paymentMethodSettings/\(paymentMethodId\)) request with the ID of your merchant account and the payment method in the path.

**Get the details of a payment method**

```bash curl theme={null}
curl https://management-test.adyen.com/v3/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId} \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X GET \
-d
```

```java Java theme={null}
// Adyen Java API Library v37.0.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.management.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.service.management.*;

Client client = new Client("ADYEN_API_KEY", Environment.TEST);
// Send the request
PaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client);
PaymentMethod response = service.getPaymentMethodDetails("merchantId", "paymentMethodId", null);
```

```php PHP theme={null}
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Service\Management\PaymentMethodsMerchantLevelApi;

$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);

// Send the request
$service = new PaymentMethodsMerchantLevelApi($client);
$response = $service->getPaymentMethodDetails('merchantId', 'paymentMethodId');
```

```cs C# theme={null}
// Adyen .net API Library v31.0.0
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.Management;
using Adyen.Service.Management;

var config = new Config()
{
    XApiKey = "ADYEN_API_KEY",
    Environment = Environment.Test
};
var client = new Client(config);

// Send the request
var service = new PaymentMethodsMerchantLevelService(client);
var response = service.GetPaymentMethodDetails("merchantId", "paymentMethodId");
```

```js NodeJS (JavaScript) theme={null}
// Adyen Node API Library v26.1.0
const { Client, ManagementAPI } = require('@adyen/api-library');

const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.PaymentMethodsMerchantLevelApi.getPaymentMethodDetails("merchantId", "paymentMethodId");
```

```go Go theme={null}
// Adyen Go API Library v20.0.0
import (
  "context"
  "github.com/adyen/adyen-go-api-library/v20/src/common"
  "github.com/adyen/adyen-go-api-library/v20/src/adyen"
  "github.com/adyen/adyen-go-api-library/v20/src/management"
)
client := adyen.NewClient(&common.Config{
  ApiKey:      "ADYEN_API_KEY",
  Environment: common.TestEnv,
})

// Send the request
service := client.Management()
req := service.PaymentMethodsMerchantLevelApi.GetPaymentMethodDetailsInput("merchantId","paymentMethodId")
res, httpRes, err := service.PaymentMethodsMerchantLevelApi.GetPaymentMethodDetails(context.Background(), req)
```

```py Python theme={null}
# Adyen Python API Library v13.4.0
import Adyen

adyen = Adyen.Adyen()
adyen.client.xapikey = "ADYEN_API_KEY"
adyen.client.platform = "test" # The environment to use library in.

# Send the request
result = adyen.management.payment_methods_merchant_level_api.get_payment_method_details(merchantId="merchantId", paymentMethodId="paymentMethodId")
```

```rb Ruby theme={null}
# Adyen Ruby API Library v10.2.0
require "adyen-ruby-api-library"

adyen = Adyen::Client.new
adyen.api_key = 'ADYEN_API_KEY'
adyen.env = :test # Set to "live" for live environment

# Send the request
result = adyen.management.payment_methods_merchant_level_api.get_payment_method_details('merchantId', 'paymentMethodId')
```

```ts NodeJS (TypeScript) theme={null}
// Adyen Node API Library v26.1.0
import { Client, ManagementAPI, Types } from "@adyen/api-library";

const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.PaymentMethodsMerchantLevelApi.getPaymentMethodDetails("merchantId", "paymentMethodId");
```

## Update a payment method

To change the settings of a payment method, make a PATCH [/merchants/\{merchantId}/paymentMethodSettings/\{paymentMethodId}](https://docs.adyen.com/api-explorer/Management/latest/patch/merchants/\(merchantId\)/paymentMethodSettings/\(paymentMethodId\)) request with the ID of your merchant account and the payment method in the path.

In the body, you can specify the following parameters:

| Parameter | Required | Description |
| - | - | - |
| [countries](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/paymentMethodSettings#request-countries) | | The list of countries to enable with the payment method. If sent empty, then all countries are supported by the payment method. |
| [currencies](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/paymentMethodSettings#request-currencies) | | The list of currencies to enable with the payment method. If sent empty, then all currencies are supported by the payment method. |
| [enabled](https://docs.adyen.com/api-explorer/Management/latest/patch/merchants/\(merchantId\)/paymentMethodSettings/\(paymentMethodId\)#request-enabled) | | Indicates whether the payment method is enabled (**true**) or disabled (**false**). |

**Disabled** payment methods are automatically deleted after **90 days**.

Here's an example of requesting to update **Visa** payment method by adding support for cards issued in the **United States**:

**Update payment method settings**

```bash curl theme={null}
curl https://management-test.adyen.com/v3/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId} \
-H 'x-api-key: ADYEN_API_KEY' \
-H 'content-type: application/json' \
-X PATCH \
-d '{
    "countries": [
        "NL",
        "US"
    ],
    "currencies": [
        "EUR",
        "USD"
    ]
}'
```

```java Java theme={null}
// Adyen Java API Library v37.0.0
import com.adyen.Client;
import com.adyen.enums.Environment;
import com.adyen.model.management.*;
import java.time.OffsetDateTime;
import java.util.*;
import com.adyen.service.management.*;

Client client = new Client("ADYEN_API_KEY", Environment.TEST);

// Create the request object(s)
UpdatePaymentMethodInfo updatePaymentMethodInfo = new UpdatePaymentMethodInfo()
  .countries(Arrays.asList("NL", "US"))
  .currencies(Arrays.asList("EUR", "USD"));

// Send the request
PaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client);
PaymentMethod response = service.updatePaymentMethod("merchantId", "paymentMethodId", updatePaymentMethodInfo, null);
```

```php PHP theme={null}
<?php
// Adyen PHP API Library v27.0.0
use Adyen\Client;
use Adyen\Environment;
use Adyen\Model\Management\UpdatePaymentMethodInfo;
use Adyen\Service\Management\PaymentMethodsMerchantLevelApi;

$client = new Client();
$client->setXApiKey("ADYEN_API_KEY");
$client->setEnvironment(Environment::TEST);


// Create the request object(s)
$updatePaymentMethodInfo = new UpdatePaymentMethodInfo();
$updatePaymentMethodInfo
  ->setCountries(array("NL", "US"))
  ->setCurrencies(array("EUR", "USD"));

// Send the request
$service = new PaymentMethodsMerchantLevelApi($client);
$response = $service->updatePaymentMethod('merchantId', 'paymentMethodId', $updatePaymentMethodInfo);
```

```cs C# theme={null}
// Adyen .net API Library v31.0.0
using Adyen;
using Environment = Adyen.Model.Environment;
using Adyen.Model;
using Adyen.Model.Management;
using Adyen.Service.Management;

var config = new Config()
{
    XApiKey = "ADYEN_API_KEY",
    Environment = Environment.Test
};
var client = new Client(config);

// Create the request object(s)
UpdatePaymentMethodInfo updatePaymentMethodInfo = new UpdatePaymentMethodInfo
{
  Countries = { "NL", "US" },
  Currencies = { "EUR", "USD" }
};

// Send the request
var service = new PaymentMethodsMerchantLevelService(client);
var response = service.UpdatePaymentMethod("merchantId", "paymentMethodId", updatePaymentMethodInfo);
```

```js NodeJS (JavaScript) theme={null}
// Adyen Node API Library v26.1.0
const { Client, ManagementAPI } = require('@adyen/api-library');

const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Create the request object(s)
const updatePaymentMethodInfo = {
  countries: [ "NL", "US" ],
  currencies: [ "EUR", "USD" ]
}

// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.PaymentMethodsMerchantLevelApi.updatePaymentMethod("merchantId", "paymentMethodId", updatePaymentMethodInfo);
```

```go Go theme={null}
// Adyen Go API Library v20.0.0
import (
  "context"
  "github.com/adyen/adyen-go-api-library/v20/src/common"
  "github.com/adyen/adyen-go-api-library/v20/src/adyen"
  "github.com/adyen/adyen-go-api-library/v20/src/management"
)
client := adyen.NewClient(&common.Config{
  ApiKey:      "ADYEN_API_KEY",
  Environment: common.TestEnv,
})

// Create the request object(s)
updatePaymentMethodInfo := management.UpdatePaymentMethodInfo{
  Countries: []string{
    "NL", "US",
  },
  Currencies: []string{
    "EUR", "USD",
  },
}

// Send the request
service := client.Management()
req := service.PaymentMethodsMerchantLevelApi.UpdatePaymentMethodInput("merchantId","paymentMethodId").UpdatePaymentMethodInfo(updatePaymentMethodInfo)
res, httpRes, err := service.PaymentMethodsMerchantLevelApi.UpdatePaymentMethod(context.Background(), req)
```

```py Python theme={null}
# Adyen Python API Library v13.4.0
import Adyen

adyen = Adyen.Adyen()
adyen.client.xapikey = "ADYEN_API_KEY"
adyen.client.platform = "test" # The environment to use library in.

# Create the request object(s)
json_request = {
  "countries": [ "NL", "US" ],
  "currencies": [ "EUR", "USD" ]
}

# Send the request
result = adyen.management.payment_methods_merchant_level_api.update_payment_method(request=json_request, merchantId="merchantId", paymentMethodId="paymentMethodId")
```

```rb Ruby theme={null}
# Adyen Ruby API Library v10.2.0
require "adyen-ruby-api-library"

adyen = Adyen::Client.new
adyen.api_key = 'ADYEN_API_KEY'
adyen.env = :test # Set to "live" for live environment

# Create the request object(s)
request_body = {
  :countries => [ 'NL', 'US' ],
  :currencies => [ 'EUR', 'USD' ]
}

# Send the request
result = adyen.management.payment_methods_merchant_level_api.update_payment_method(request_body, 'merchantId', 'paymentMethodId')
```

```ts NodeJS (TypeScript) theme={null}
// Adyen Node API Library v26.1.0
import { Client, ManagementAPI, Types } from "@adyen/api-library";

const client = new Client({ apiKey: "ADYEN_API_KEY", environment: "TEST" });

// Create the request object(s)
const updatePaymentMethodInfo: Types.management.UpdatePaymentMethodInfo = {
  countries: ["NL", "US"],
  currencies: ["EUR", "USD"]
};

// Send the request
const managementAPI = new ManagementAPI(client);
const response = managementAPI.PaymentMethodsMerchantLevelApi.updatePaymentMethod("merchantId", "paymentMethodId", updatePaymentMethodInfo);
```

The response contains the `id` of the payment method and the updated list of payment method settings.

**Response**

```json theme={null}
{
    "id": "PM00000000000000000000001",
    "type": "visa",
    "enabled": true,
    "countries": [
        "NL",
        "US"
    ],
    "currencies": [
        "EUR",
        "USD"
    ]
}
```

## See also

* [Supported payment methods](https://adyen-preview.mintlify.site/marketplaces/payment-methods#supported-payment-methods)
* [Add payment methods](https://adyen-preview.mintlify.site/marketplaces/payment-methods/add-payment-methods.md)
* [Manage payment methods in your Customer Area](https://adyen-preview.mintlify.site/marketplaces/payment-methods/manage-payment-methods/customer-area.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.