{"title":"Manage payment methods through API","category":"default","creationDate":1776961627,"content":"<p>By using the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Management\/latest\/overview\" class=\" external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Management API<\/a>, you can:<\/p>\n<ul>\n<li>Get a list of all payment methods configured for your merchant account.<\/li>\n<li>Get the details of a payment method.<\/li>\n<li>Enable or disable a payment method.<\/li>\n<li>Change the country\/region or currency of a payment method.<\/li>\n<\/ul>\n<h2>Requirements<\/h2>\n<p>Before you begin, take into account the following requirements, limitations, and preparations.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">You must have an Adyen <a href=\"\/pt\/online-payments\/build-your-integration\">online payments integration and a checkout UI<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/development-resources\/api-credentials\/roles\/\">API credential roles<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Management\/latest\/overview\" class=\" external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Management API<\/a> credential must have the following role:<ul><li markdown=\"1\"><strong>Management API\u2014Payment methods read and write<\/strong><\/li><\/ul><\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Limitations<\/strong><\/td>\n<td style=\"text-align: left;\"><ul><li markdown=\"1\">You can only configure payment methods that are <a href=\"\/pt\/marketplaces\/payment-methods#supported-payment-methods\">supported for your currency and integration<\/a>.<\/li><li markdown=\"1\">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.<\/li><\/ul><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Get a list of all payment methods<\/h2>\n<p>To get the details of all payment methods configured on your merchant account, make a GET  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Management\/latest\/get\/merchants\/(merchantId)\/paymentMethodSettings\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/merchants\/{merchantId}\/paymentMethodSettings<\/a> request with the ID of your merchant account in the path.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Get a list of payment methods'\" :id=\"'get-list-pms'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/management-test.adyen.com\\\/v3\\\/merchants\\\/{merchantId}\\\/paymentMethodSettings \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X GET \\\\\\n-d&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v37.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.management.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.service.management.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\\/\\\/ Send the request\\nPaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client);\\nPaymentMethodResponse response = service.getAllPaymentMethods(\\&quot;merchantId\\&quot;, \\&quot;String\\&quot;, \\&quot;String\\&quot;, 1, 1, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v27.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Service\\\\Management\\\\PaymentMethodsMerchantLevelApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n$requestOptions['queryParams'] = array('storeId' =&gt; 'string', 'businessLineId' =&gt; 'string', 'pageSize' =&gt; 'integer', 'pageNumber' =&gt; 'integer');\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentMethodsMerchantLevelApi($client);\\n$response = $service-&gt;getAllPaymentMethods('merchantId', $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v31.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Management;\\nusing Adyen.Service.Management;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentMethodsMerchantLevelService(client);\\nvar response = service.GetAllPaymentMethods(\\&quot;merchantId\\&quot;, storeId: \\&quot;string\\&quot;, businessLineId: \\&quot;string\\&quot;, pageSize: 1, pageNumber: 1);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v26.1.0\\nconst { Client, ManagementAPI } = require('@adyen\\\/api-library');\\n\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Send the request\\nconst managementAPI = new ManagementAPI(client);\\nconst response = managementAPI.PaymentMethodsMerchantLevelApi.getAllPaymentMethods(\\&quot;merchantId\\&quot;, \\&quot;string\\&quot;, \\&quot;string\\&quot;, 1, 1);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v20.0.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v20\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v20\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v20\\\/src\\\/management\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Send the request\\nservice := client.Management()\\nreq := service.PaymentMethodsMerchantLevelApi.GetAllPaymentMethodsInput(\\&quot;merchantId\\&quot;)\\nreq = req.StoreId(\\&quot;string\\&quot;).BusinessLineId(\\&quot;string\\&quot;).PageSize(1).PageNumber(1)\\nres, httpRes, err := service.PaymentMethodsMerchantLevelApi.GetAllPaymentMethods(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v13.4.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\nquery_parameters = {\\n  \\&quot;storeId\\&quot; : \\&quot;string\\&quot;,\\n  \\&quot;businessLineId\\&quot; : \\&quot;string\\&quot;,\\n  \\&quot;pageSize\\&quot; : \\&quot;integer\\&quot;,\\n  \\&quot;pageNumber\\&quot; : \\&quot;integer\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.management.payment_methods_merchant_level_api.get_all_payment_methods(merchantId=\\&quot;merchantId\\&quot;, query_parameters=query_parameters)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v10.2.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nquery_params = {\\n  :storeId =&gt; 'string',\\n  :businessLineId =&gt; 'string',\\n  :pageSize =&gt; 'integer',\\n  :pageNumber =&gt; 'integer'\\n}\\n\\n# Send the request\\nresult = adyen.management.payment_methods_merchant_level_api.get_all_payment_methods('merchantId', query_params: query_params)&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v26.1.0\\nimport { Client, ManagementAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Send the request\\nconst managementAPI = new ManagementAPI(client);\\nconst response = managementAPI.PaymentMethodsMerchantLevelApi.getAllPaymentMethods(\\&quot;merchantId\\&quot;, \\&quot;string\\&quot;, \\&quot;string\\&quot;, 1, 1);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<!--\n<div data-component-wrapper=\"code-sample\">\n    <code-sample\n        :title=\"'List of payment methods'\"\n        :id=\"'pm-list'\"\n        :code-data=\"[{&quot;language&quot;:&quot;&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;&quot;}]\"\n        :enable-copy-link-to-code-block=\"true\"\n        :code-sample-card-size=\"'fullsize'\"\n    ><\/code-sample>\n<\/div>\n-->\n<h2>Get the details of a specific payment method<\/h2>\n<p>To get the details of a specific payment method, make a GET  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Management\/latest\/get\/merchants\/(merchantId)\/paymentMethodSettings\/(paymentMethodId)\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/merchants\/{merchantId}\/paymentMethodSettings\/{paymentMethodId}<\/a> request with the ID of your merchant account and the payment method in the path.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Get the details of a payment method'\" :id=\"'get-a-pm'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/management-test.adyen.com\\\/v3\\\/merchants\\\/{merchantId}\\\/paymentMethodSettings\\\/{paymentMethodId} \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X GET \\\\\\n-d&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v37.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.management.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.service.management.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\\/\\\/ Send the request\\nPaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client);\\nPaymentMethod response = service.getPaymentMethodDetails(\\&quot;merchantId\\&quot;, \\&quot;paymentMethodId\\&quot;, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v27.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Service\\\\Management\\\\PaymentMethodsMerchantLevelApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentMethodsMerchantLevelApi($client);\\n$response = $service-&gt;getPaymentMethodDetails('merchantId', 'paymentMethodId');&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v31.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Management;\\nusing Adyen.Service.Management;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentMethodsMerchantLevelService(client);\\nvar response = service.GetPaymentMethodDetails(\\&quot;merchantId\\&quot;, \\&quot;paymentMethodId\\&quot;);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v26.1.0\\nconst { Client, ManagementAPI } = require('@adyen\\\/api-library');\\n\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Send the request\\nconst managementAPI = new ManagementAPI(client);\\nconst response = managementAPI.PaymentMethodsMerchantLevelApi.getPaymentMethodDetails(\\&quot;merchantId\\&quot;, \\&quot;paymentMethodId\\&quot;);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v20.0.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v20\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v20\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v20\\\/src\\\/management\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Send the request\\nservice := client.Management()\\nreq := service.PaymentMethodsMerchantLevelApi.GetPaymentMethodDetailsInput(\\&quot;merchantId\\&quot;,\\&quot;paymentMethodId\\&quot;)\\nres, httpRes, err := service.PaymentMethodsMerchantLevelApi.GetPaymentMethodDetails(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v13.4.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Send the request\\nresult = adyen.management.payment_methods_merchant_level_api.get_payment_method_details(merchantId=\\&quot;merchantId\\&quot;, paymentMethodId=\\&quot;paymentMethodId\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v10.2.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Send the request\\nresult = adyen.management.payment_methods_merchant_level_api.get_payment_method_details('merchantId', 'paymentMethodId')&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v26.1.0\\nimport { Client, ManagementAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Send the request\\nconst managementAPI = new ManagementAPI(client);\\nconst response = managementAPI.PaymentMethodsMerchantLevelApi.getPaymentMethodDetails(\\&quot;merchantId\\&quot;, \\&quot;paymentMethodId\\&quot;);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"update-payment-method\">Update a payment method<\/h2>\n<p>To change the settings of a payment method, make a PATCH  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Management\/latest\/patch\/merchants\/(merchantId)\/paymentMethodSettings\/(paymentMethodId)\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/merchants\/{merchantId}\/paymentMethodSettings\/{paymentMethodId}<\/a> request with the ID of your merchant account and the payment method in the path.<\/p>\n<p>In the body, you can specify the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Management\/latest\/post\/merchants\/(merchantId)\/paymentMethodSettings#request-countries\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countries<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>The list of countries to enable with the payment method. If sent empty, then all countries are supported by the payment method.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Management\/latest\/post\/merchants\/(merchantId)\/paymentMethodSettings#request-currencies\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">currencies<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>The list of currencies to enable with the payment method. If sent empty, then all currencies are supported by the payment method.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Management\/latest\/patch\/merchants\/(merchantId)\/paymentMethodSettings\/(paymentMethodId)#request-enabled\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">enabled<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>Indicates whether the payment method is enabled (<strong>true<\/strong>) or disabled (<strong>false<\/strong>).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"notices green\">\n<p><strong>Disabled<\/strong> payment methods are automatically deleted after <strong>90 days<\/strong>. <\/p>\n<\/div>\n<p>Here's an example of requesting to update <strong>Visa<\/strong> payment method by adding support for cards issued in the <strong>United States<\/strong>:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Update payment method settings'\" :id=\"'update-pm'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/management-test.adyen.com\\\/v3\\\/merchants\\\/{merchantId}\\\/paymentMethodSettings\\\/{paymentMethodId} \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X PATCH \\\\\\n-d '{\\n    \\&quot;countries\\&quot;: [\\n        \\&quot;NL\\&quot;,\\n        \\&quot;US\\&quot;\\n    ],\\n    \\&quot;currencies\\&quot;: [\\n        \\&quot;EUR\\&quot;,\\n        \\&quot;USD\\&quot;\\n    ]\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v37.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.management.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.service.management.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nUpdatePaymentMethodInfo updatePaymentMethodInfo = new UpdatePaymentMethodInfo()\\n  .countries(Arrays.asList(\\&quot;NL\\&quot;, \\&quot;US\\&quot;))\\n  .currencies(Arrays.asList(\\&quot;EUR\\&quot;, \\&quot;USD\\&quot;));\\n\\n\\\/\\\/ Send the request\\nPaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client);\\nPaymentMethod response = service.updatePaymentMethod(\\&quot;merchantId\\&quot;, \\&quot;paymentMethodId\\&quot;, updatePaymentMethodInfo, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v27.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Management\\\\UpdatePaymentMethodInfo;\\nuse Adyen\\\\Service\\\\Management\\\\PaymentMethodsMerchantLevelApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$updatePaymentMethodInfo = new UpdatePaymentMethodInfo();\\n$updatePaymentMethodInfo\\n  -&gt;setCountries(array(\\&quot;NL\\&quot;, \\&quot;US\\&quot;))\\n  -&gt;setCurrencies(array(\\&quot;EUR\\&quot;, \\&quot;USD\\&quot;));\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentMethodsMerchantLevelApi($client);\\n$response = $service-&gt;updatePaymentMethod('merchantId', 'paymentMethodId', $updatePaymentMethodInfo);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v31.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Management;\\nusing Adyen.Service.Management;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nUpdatePaymentMethodInfo updatePaymentMethodInfo = new UpdatePaymentMethodInfo\\n{\\n  Countries = { \\&quot;NL\\&quot;, \\&quot;US\\&quot; },\\n  Currencies = { \\&quot;EUR\\&quot;, \\&quot;USD\\&quot; }\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentMethodsMerchantLevelService(client);\\nvar response = service.UpdatePaymentMethod(\\&quot;merchantId\\&quot;, \\&quot;paymentMethodId\\&quot;, updatePaymentMethodInfo);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v26.1.0\\nconst { Client, ManagementAPI } = require('@adyen\\\/api-library');\\n\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Create the request object(s)\\nconst updatePaymentMethodInfo = {\\n  countries: [ \\&quot;NL\\&quot;, \\&quot;US\\&quot; ],\\n  currencies: [ \\&quot;EUR\\&quot;, \\&quot;USD\\&quot; ]\\n}\\n\\n\\\/\\\/ Send the request\\nconst managementAPI = new ManagementAPI(client);\\nconst response = managementAPI.PaymentMethodsMerchantLevelApi.updatePaymentMethod(\\&quot;merchantId\\&quot;, \\&quot;paymentMethodId\\&quot;, updatePaymentMethodInfo);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v20.0.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v20\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v20\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v20\\\/src\\\/management\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\nupdatePaymentMethodInfo := management.UpdatePaymentMethodInfo{\\n  Countries: []string{\\n    \\&quot;NL\\&quot;, \\&quot;US\\&quot;,\\n  },\\n  Currencies: []string{\\n    \\&quot;EUR\\&quot;, \\&quot;USD\\&quot;,\\n  },\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Management()\\nreq := service.PaymentMethodsMerchantLevelApi.UpdatePaymentMethodInput(\\&quot;merchantId\\&quot;,\\&quot;paymentMethodId\\&quot;).UpdatePaymentMethodInfo(updatePaymentMethodInfo)\\nres, httpRes, err := service.PaymentMethodsMerchantLevelApi.UpdatePaymentMethod(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v13.4.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;countries\\&quot;: [ \\&quot;NL\\&quot;, \\&quot;US\\&quot; ],\\n  \\&quot;currencies\\&quot;: [ \\&quot;EUR\\&quot;, \\&quot;USD\\&quot; ]\\n}\\n\\n# Send the request\\nresult = adyen.management.payment_methods_merchant_level_api.update_payment_method(request=json_request, merchantId=\\&quot;merchantId\\&quot;, paymentMethodId=\\&quot;paymentMethodId\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v10.2.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :countries =&gt; [ 'NL', 'US' ],\\n  :currencies =&gt; [ 'EUR', 'USD' ]\\n}\\n\\n# Send the request\\nresult = adyen.management.payment_methods_merchant_level_api.update_payment_method(request_body, 'merchantId', 'paymentMethodId')&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v26.1.0\\nimport { Client, ManagementAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Create the request object(s)\\nconst updatePaymentMethodInfo: Types.management.UpdatePaymentMethodInfo = {\\n  countries: [\\&quot;NL\\&quot;, \\&quot;US\\&quot;],\\n  currencies: [\\&quot;EUR\\&quot;, \\&quot;USD\\&quot;]\\n};\\n\\n\\\/\\\/ Send the request\\nconst managementAPI = new ManagementAPI(client);\\nconst response = managementAPI.PaymentMethodsMerchantLevelApi.updatePaymentMethod(\\&quot;merchantId\\&quot;, \\&quot;paymentMethodId\\&quot;, updatePaymentMethodInfo);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The response contains the <code>id<\/code> of the payment method and the updated list of payment method settings.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Response'\" :id=\"'update-pm-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"id\\\": \\\"PM00000000000000000000001\\\",\\n    \\\"type\\\": \\\"visa\\\",\\n    \\\"enabled\\\": true,\\n    \\\"countries\\\": [\\n        \\\"NL\\\",\\n        \\\"US\\\"\\n    ],\\n    \\\"currencies\\\": [\\n        \\\"EUR\\\",\\n        \\\"USD\\\"\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/marketplaces\/payment-methods#supported-payment-methods\"\n                        target=\"_self\"\n                        >\n                    Supported payment methods\n                <\/a><\/li><li><a href=\"\/marketplaces\/payment-methods\/add-payment-methods\"\n                        target=\"_self\"\n                        >\n                    Add payment methods\n                <\/a><\/li><li><a href=\"\/marketplaces\/payment-methods\/manage-payment-methods\/customer-area\"\n                        target=\"_self\"\n                        >\n                    Manage payment methods in your Customer Area\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/marketplaces\/payment-methods\/manage-payment-methods\/api","articleFields":{"description":"Learn how to manage your payment methods for your marketplace using the Management API.","_expandable":null,"operations":"","feedback_component":true,"parameters":{"model":"marketplace","directoryPath":"\/marketplaces"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/marketplaces\/payment-methods\/manage-payment-methods\/api","title":"Manage payment methods through API","content":"By using the  Management API, you can:\n\nGet a list of all payment methods configured for your merchant account.\nGet the details of a payment method.\nEnable or disable a payment method.\nChange the country\/region or currency of a payment method.\n\nRequirements\nBefore you begin, take into account the following requirements, limitations, and preparations.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nYou must have an Adyen online payments integration and a checkout UI.\n\n\nAPI credential roles\nYour  Management API credential must have the following role:Management API\u2014Payment methods read and write\n\n\n\nLimitations\nYou can only configure payment methods that are supported for your currency and integration.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.\n\n\n\n\nGet a list of all payment methods\nTo get the details of all payment methods configured on your merchant account, make a GET  \/merchants\/{merchantId}\/paymentMethodSettings request with the ID of your merchant account in the path.\n\n    \n\n\nGet the details of a specific payment method\nTo get the details of a specific payment method, make a GET  \/merchants\/{merchantId}\/paymentMethodSettings\/{paymentMethodId} request with the ID of your merchant account and the payment method in the path.\n\n    \n\nUpdate a payment method\nTo change the settings of a payment method, make a PATCH  \/merchants\/{merchantId}\/paymentMethodSettings\/{paymentMethodId} request with the ID of your merchant account and the payment method in the path.\nIn the body, you can specify the following parameters:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\n countries\n\nThe list of countries to enable with the payment method. If sent empty, then all countries are supported by the payment method.\n\n\n currencies\n\nThe list of currencies to enable with the payment method. If sent empty, then all currencies are supported by the payment method.\n\n\n enabled\n\nIndicates whether the payment method is enabled (true) or disabled (false).\n\n\n\n\nDisabled payment methods are automatically deleted after 90 days. \n\nHere's an example of requesting to update Visa payment method by adding support for cards issued in the United States:\n\n    \n\nThe response contains the id of the payment method and the updated list of payment method settings.\n\n    \n\nSee also\n\n\n                    Supported payment methods\n                \n                    Add payment methods\n                \n                    Manage payment methods in your Customer Area\n                \n","type":"page","locale":"pt","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Marketplaces","lvl2":"Payment methods","lvl3":"Manage payment methods","lvl4":"Manage payment methods through API"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/marketplaces","lvl2":"https:\/\/docs.adyen.com\/pt\/marketplaces\/payment-methods","lvl3":"https:\/\/docs.adyen.com\/pt\/marketplaces\/payment-methods\/manage-payment-methods","lvl4":"\/pt\/marketplaces\/payment-methods\/manage-payment-methods\/api"},"levels":5,"category":"Marketplaces","category_color":"green","tags":["Manage","payment","methods","through"]}}
