--- title: "Manage payment methods through API" description: "Learn how to manage your payment methods for your marketplace using the Management API." url: "https://docs.adyen.com/marketplaces/payment-methods/manage-payment-methods/api" source_url: "https://docs.adyen.com/marketplaces/payment-methods/manage-payment-methods/api.md" canonical: "https://docs.adyen.com/marketplaces/payment-methods/manage-payment-methods/api" last_modified: "2026-05-27T12:56:26+02:00" language: "en" --- # Manage payment methods through API Learn how to manage your payment methods for your marketplace using the Management API. [View source](/marketplaces/payment-methods/manage-payment-methods/api.md) 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](/online-payments/build-your-integration). | | | **[API credential roles](/development-resources/api-credentials/roles/)** | 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](/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** #### curl ```bash 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 // 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 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); ``` #### C\# ```cs // 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); ``` #### NodeJS (JavaScript) ```js // 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 // 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) ``` #### Python ```py # 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) ``` #### Ruby ```rb # 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) ``` #### NodeJS (TypeScript) ```ts // 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** #### curl ```bash 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 // 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 setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Send the request $service = new PaymentMethodsMerchantLevelApi($client); $response = $service->getPaymentMethodDetails('merchantId', 'paymentMethodId'); ``` #### C\# ```cs // 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"); ``` #### NodeJS (JavaScript) ```js // 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 // 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) ``` #### Python ```py # 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") ``` #### Ruby ```rb # 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') ``` #### NodeJS (TypeScript) ```ts // 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** #### curl ```bash 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 // 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 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); ``` #### C\# ```cs // 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); ``` #### NodeJS (JavaScript) ```js // 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 // 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) ``` #### Python ```py # 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") ``` #### Ruby ```rb # 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') ``` #### NodeJS (TypeScript) ```ts // 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 { "id": "PM00000000000000000000001", "type": "visa", "enabled": true, "countries": [ "NL", "US" ], "currencies": [ "EUR", "USD" ] } ``` ## See also * [Supported payment methods](/marketplaces/payment-methods#supported-payment-methods) * [Add payment methods](/marketplaces/payment-methods/add-payment-methods) * [Manage payment methods in your Customer Area](/marketplaces/payment-methods/manage-payment-methods/customer-area)