--- title: "Manage payment methods with API" description: "Request and manage payment methods using the Management API." url: "https://docs.adyen.com/platforms/payment-methods/api" source_url: "https://docs.adyen.com/platforms/payment-methods/api.md" canonical: "https://docs.adyen.com/platforms/payment-methods/api" last_modified: "2026-05-24T12:54:31+02:00" language: "en" --- # Manage payment methods with API Request and manage payment methods using the Management API. [View source](/platforms/payment-methods/api.md) During the [onboarding process](/platforms/onboard-users/onboarding-steps/), you already added payment methods to your users' stores. After we enable a payment method, your users can start accepting all of the [payment method's variants](/development-resources/paymentmethodvariant/) by default. For example, if you configure **visa**, they can accept [all of its variants](/development-resources/paymentmethodvariant/#visa), including **visadebit**, **visapremiumcredit**, **visasignature** and so on. This page explains how you can: * Request additional payment methods. * View all payment methods configured for your merchant account or store. * View the details of a specific payment method. * Update the country/region and currency of a payment method. * Enable or disable a payment method for your user. ## Requirements Before you begin, take into account the following requirements, limitations, and preparations. | Requirement | Description | | | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | - | | **Integration type** | You must have an [online](/online-payments/build-your-integration) or [in-person](/point-of-sale/design-your-integration) payments integration with Adyen. | | | **[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** | | | **[Webhooks](/development-resources/webhooks)** | Subscribe to the following webhooks:- **Payment method webhook** | | | **Limitations** | * You can only configure payment methods that are [supported for your currency and integration](/platforms/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. | | | **Setup steps** | Before requesting a payment method, make sure that you already configured both your user's [store](/platforms/manage-stores/#create-store) and **business lines**. | | ## Request payment methods To request a payment method for your user's store, make a POST [/merchants/{merchantId}/paymentMethodSettings](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/paymentMethodSettings) request with your merchant account ID in the path. In the body, specify the following parameters: | Parameter | Required | Description | | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [type](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/paymentMethodSettings#request-type) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The payment method variant. Some payment methods require additional configuration or parameters. For details, see the [Supported payment methods](/platforms/payment-methods#supported-payment-methods). | | [storeIds](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/paymentMethodSettings#request-storeIds) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The `id` of your user's store. For the list of stores in your merchant account, make a GET [/merchants/{merchantId}/stores](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/stores) request. | | [businessLineId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/paymentMethodSettings#request-businessLineId) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The unique identifier of your user's [business line](/platforms/onboard-users/onboarding-steps) for which you want to request a payment method. | | [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. To enable all countries supported by the payment method, set to **ANY** or send empty. | | [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. To enable all currencies supported by the payment method, set to **ANY** or send empty. | Here is an example of a request to accept **Visa** payments from cards issued in the **Netherlands**: **Add a payment method to a store** #### curl ```bash curl https://management-test.adyen.com/v3/merchants/{merchantId}/paymentMethodSettings \ -H 'x-API-key: YOUR_X-API-KEY' \ -H 'content-type: application/json' \ -X POST \ -d '{ "type": "visa", "businessLineId":"BL00000000000000000000001", "storeIds": ["ST00000000000000000000001"], "currencies": [ "EUR" ], "countries": [ "NL" ] }' ``` #### Java ```java // Adyen Java API Library v28.3.1 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) PaymentMethodSetupInfo paymentMethodSetupInfo = new PaymentMethodSetupInfo() .countries(Arrays.asList("NL")) .type(PaymentMethodSetupInfo.TypeEnum.VISA) .businessLineId("BL00000000000000000000001") .currencies(Arrays.asList("EUR")); // Send the request PaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client); PaymentMethod response = service.requestPaymentMethod("merchantId", paymentMethodSetupInfo, null); ``` #### PHP ```php // Adyen PHP API Library v20.2.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Management\PaymentMethodSetupInfo; use Adyen\Service\Management\PaymentMethodsMerchantLevelApi; $client = new Client(); $client->setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $paymentMethodSetupInfo = new PaymentMethodSetupInfo(); $paymentMethodSetupInfo ->setCountries(array("NL")) ->setType("visa") ->setBusinessLineId("BL00000000000000000000001") ->setCurrencies(array("EUR")); // Send the request $service = new PaymentMethodsMerchantLevelApi($client); $response = $service->requestPaymentMethod('merchantId', $paymentMethodSetupInfo); ``` #### C\# ```cs // Adyen .net API Library v19.1.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) PaymentMethodSetupInfo paymentMethodSetupInfo = new PaymentMethodSetupInfo { Countries = { "NL" }, Type = PaymentMethodSetupInfo.TypeEnum.Visa, BusinessLineId = "BL00000000000000000000001", Currencies = { "EUR" } }; // Send the request var service = new PaymentMethodsMerchantLevelService(client); var response = service.RequestPaymentMethod("merchantId", paymentMethodSetupInfo); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v19.2.0 // Require the parts of the module you want to use const { Client, ManagementAPI } = require('@adyen/api-library'); // Initialize the client object const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const paymentMethodSetupInfo = { type: "visa", businessLineId: "BL00000000000000000000001", storeIds: "ST00000000000000000000001", currencies: [ "EUR" ], countries: [ "NL" ] } // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.PaymentMethodsMerchantLevelApi.requestPaymentMethod("merchantId", paymentMethodSetupInfo); ``` #### Go ```go // Adyen Go API Library v12.2.0 import ( "context" "github.com/adyen/adyen-go-api-library/v9/src/common" "github.com/adyen/adyen-go-api-library/v9/src/adyen" "github.com/adyen/adyen-go-api-library/v9/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) paymentMethodSetupInfo := management.PaymentMethodSetupInfo{ Countries: []string{ "NL", }, Type: "visa", BusinessLineId: common.PtrString("BL00000000000000000000001"), Currencies: []string{ "EUR", }, } // Send the request service := client.Management() req := service.PaymentMethodsMerchantLevelApi.RequestPaymentMethodInput("merchantId").PaymentMethodSetupInfo(paymentMethodSetupInfo) res, httpRes, err := service.PaymentMethodsMerchantLevelApi.RequestPaymentMethod(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v12.7.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 = { "type": "visa", "businessLineId": "BL00000000000000000000001", "storeIds": ["ST00000000000000000000001"], "currencies": [ "EUR" ], "countries": [ "NL" ] } # Send the request result = adyen.management.payment_methods_merchant_level_api.request_payment_method(request=json_request, merchantId="merchantId") ``` #### Ruby ```rb # Adyen Ruby API Library v9.7.1 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 = { :type => 'visa', :businessLineId => 'BL00000000000000000000001', :storeIds => 'ST00000000000000000000001', :currencies => [ 'EUR' ], :countries => [ 'NL' ] } # Send the request result = adyen.management.payment_methods_merchant_level_api.request_payment_method(request_body, 'merchantId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v19.2.0 // Require the parts of the module you want to use import { Client, ManagementAPI, Types } from "@adyen/api-library"; // Initialize the client object const client = new Client({apiKey: "ADYEN_API_KEY", environment: "TEST"}); // Create the request object(s) const paymentMethodSetupInfo: Types.management.PaymentMethodSetupInfo = { countries: ["NL"], type: Types.management.PaymentMethodSetupInfo.TypeEnum.Visa, businessLineId: "BL00000000000000000000001", currencies: ["EUR"] }; // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.PaymentMethodsMerchantLevelApi.requestPaymentMethod("merchantId", paymentMethodSetupInfo); ``` The response contains the `id` of the requested payment method. ### Tab: Payment method added **Visa payment method added** ```json { "id": "PM00000000000000000000001", "businessLineId": "BL00000000000000000000001", "storeIds": ["ST00000000000000000000001"], "type": "visa", "enabled": "true", "currencies": [ "EUR" ], "countries": [ "NL" ], "allowed": "true", "verificationStatus": "valid" } ``` ### Tab: Payment method pending If the **receivePayments** capability of the account holder for whom you request the payment method is not **allowed**, then your user will not be able to use the payment method. This is the case if the `allowed` parameter is set to **false** in the API response. **Visa payment method pending** ```json { "businessLineId": "BL00000000000000000000001", "id": "PM00000000000000000000001", "type": "mc", "enabled": "true", "currencies": [ "USD" ], "countries": [ "NL" ], "allowed": false, "verificationStatus": "pending", "customRoutingFlags": [ "Test123456" ] } ``` Listen to the [balancePlatform.accountHolder.updated](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/latest/post/balancePlatform.accountHolder.updated) webhook to get notified about the status of the **receivePayments** capability. When it is **enabled**, **allowed**, and **valid**, the requested payment method will be automatically available for the user. If the **receivePayments** capability does not reach any of these states within 60 days, the payment method activation request is automatically removed. ### Webhooks Because adding a payment method to your user's store is an asynchronous process, we recommend that you subscribe to the [Management webhooks](https://docs.adyen.com/api-explorer/ManagementNotification/latest/overview) in your [Customer Area](https://ca-test.adyen.com/). After the payment method has been added to your store, Adyen sends a [paymentMethod.created](https://docs.adyen.com/api-explorer/ManagementNotification/latest/post/paymentMethod.created) webhook. Here is an example of the webhook you receive after adding **Visa** to your payment methods: **Visa payment method created** ```json { "createdAt": "2023-05-24T14:59:11+01:00", "data": { "id": "PM00000000000000000000001", "merchantId": "MERCHANT_ACCOUNT", "result": "SUCCESS", "storeId": "ST00000000000000000000001", "type": "visa" }, "environment": "test", "type": "paymentMethod.created" } ``` ### Troubleshooting By default, every payment method you request is enabled for your user. However, only verified account holders can use the configured payment methods. This means that the account holder must have the following parameters and values set for the **receivePayments** capability: | Parameter | Description | Value | | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | | [verificationStatus](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)#responses-200-capabilities-verificationStatus) | The status of the verification checks for the capability. | **valid** | | [enabled](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)#responses-200-capabilities-enabled) | Indicates whether the capability is enabled. | **true** | | [allowed](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)#responses-200-capabilities-allowed) | Indicates whether the capability is allowed. Adyen sets this to **true** if the verification is successful and the account holder is permitted to use the capability. | **true** | If you update you user's legal entity or account holder information after it has been verified, the payment methods may be disabled until the account holder is verified again. To check the status of your account holder's **receivePayments** capability, you can either send a GET [/accountHolders/{id}](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)) request, or listen to the [balancePlatform.accountHolder.updated](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/latest/post/balancePlatform.accountHolder.updated) webhook. ### Tab: Configuration API To check the status of your user's **receivePayments** capability, send a GET [/accountHolders/{id}](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)) request, specifying the ID of the account holder in the path. **Account holder status** ```json { "balancePlatform": "YOUR_BALANCE_PLATFORM", "description": "Liable account holder used for international payments and payouts", "legalEntityId": "LE322JV223222D5GG42KN6869", "reference": "S.Eller-001", "capabilities": { "receivePayments": { "enabled": true, "requested": true, "allowed": true, "verificationStatus": "valid" }, "receiveFromBalanceAccount": { "enabled": true, "requested": true, "allowed": true, "verificationStatus": "valid" }, "sendToBalanceAccount": { "enabled": true, "requested": true, "allowed": true, "verificationStatus": "valid" }, "sendToTransferInstrument": { "enabled": true, "requested": true, "allowed": true, "transferInstruments": [ { "enabled": true, "requested": true, "allowed": true, "id": "SE322KH223222F5GXZFNM3BGP", "verificationStatus": "valid" } ], "verificationStatus": "valid" } }, "id": "AH3227C223222C5GXQXF658WB", "status": "active" } ``` ### Tab: Configuration webhook Adyen sends [Configuration webhooks](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/latest/overview) to notify you of changes in your account holder's verification status. To check the status of your user's **receivePayments** capability, listen to the [balancePlatform.accountHolder.updated](https://docs.adyen.com/api-explorer/balanceplatform-webhooks/latest/post/balancePlatform.accountHolder.updated) webhook. **Account holder updated** ```json { "data": { "balancePlatform": "YOUR_BALANCE_PLATFORM", "accountHolder": { "legalEntityId": "LE322JV223222D5GG42KN6869", "reference": "S.Eller-001", "capabilities": { "receivePayments": { "enabled": true, "requested": true, "allowed": true, "verificationStatus": "valid" }, "sendToTransferInstrument": { "enabled": true, "requested": true, "allowed": true, "transferInstruments": [ { "enabled": true, "requested": true, "allowed": true, "id": "SE322KH223222F5GXZFNM3BGP", "verificationStatus": "valid" } ] } }, "id": "AH3227C223222C5GXQXF658WB", "status": "active" } }, "environment": "test", "type": "balancePlatform.accountHolder.updated" } ``` ## 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. You can filter the response using the following query parameters: * [storeIds](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/paymentMethodSettings#query-storeIds): The unique identifier of the store for which to return the payment methods. * [businessLineId](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/paymentMethodSettings#query-businessLineId): The unique identifier of the business line for which to return the payment methods. **Get a list of payment methods for a store** #### 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 businessLineId=BL00000000000000000000001 \ -d storeId=ST00000000000000000000001 ``` #### 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**. Payment methods linked to a closed store are automatically disabled and 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](/platforms/payment-methods#supported-payment-methods) * [Manage payment methods in your Customer Area](/platforms/payment-methods/customer-area)