- 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 or in-person payments integration with Adyen. | |
| API credential roles | Your Management API credential must have the following role: Management API—Payment methods read and write | |
| Webhooks | Subscribe to the following webhooks: Payment method webhook | |
| Limitations | You 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. | |
| Setup steps | Before requesting a payment method, make sure that you already configured both your user’s store and business lines. |
Request payment methods
To request a payment method for your user’s store, make a POST /merchants/{merchantId}/paymentMethodSettings request with your merchant account ID in the path. In the body, specify the following parameters:| Parameter | Required | Description |
|---|---|---|
| type | ![]() | The payment method variant. Some payment methods require additional configuration or parameters. For details, see the Supported payment methods. |
| storeIds | ![]() | The id of your user’s store. For the list of stores in your merchant account, make a GET /merchants/{merchantId}/stores request. |
| businessLineId | ![]() | The unique identifier of your user’s business line for which you want to request a payment method. |
| 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 | 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. |
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"
]
}'
// 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);
// 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);
// 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);
// 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);
// 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)
# 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")
# 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')
// 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);
id of the requested payment method.
- Payment method added
- Payment method pending
- Configuration API
- Configuration webhook
Visa payment method added
{
"id": "PM00000000000000000000001",
"businessLineId": "BL00000000000000000000001",
"storeIds": ["ST00000000000000000000001"],
"type": "visa",
"enabled": "true",
"currencies": [
"EUR"
],
"countries": [
"NL"
],
"allowed": "true",
"verificationStatus": "valid"
}
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 Listen to the 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.
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} request, or listen to the balancePlatform.accountHolder.updated webhook.
allowed parameter is set to false in the API response.Visa payment method pending{
"businessLineId": "BL00000000000000000000001",
"id": "PM00000000000000000000001",
"type": "mc",
"enabled": "true",
"currencies": [
"USD"
],
"countries": [
"NL"
],
"allowed": false,
"verificationStatus": "pending",
"customRoutingFlags": [
"Test123456"
]
}
Webhooks
Because adding a payment method to your user’s store is an asynchronous process, we recommend that you subscribe to the Management webhooks in your Customer Area.After the payment method has been added to your store, Adyen sends a paymentMethod.created webhook.Here is an example of the webhook you receive after adding Visa to your payment methods:Visa payment method created{
"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 | The status of the verification checks for the capability. | valid |
| enabled | Indicates whether the capability is enabled. | true |
| 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 |
To check the status of your user’s receivePayments capability, send a GET /accountHolders/{id} request, specifying the ID of the account holder in the path.Account holder status
{
"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"
}
Adyen sends Configuration webhooks 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 webhook.Account holder updated
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 settingsThe response contains the
{
"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 request with the ID of your merchant account in the path.You can filter the response using the following query parameters:- storeIds: The unique identifier of the store for which to return the payment methods.
- businessLineId: The unique identifier of the business line for which to return the payment methods.
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
// 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
// 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);
// 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);
// 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);
// 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)
# 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)
# 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)
// 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} request with the ID of your merchant account and the payment method in the path.Get the details of a payment methodcurl 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
// 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
// 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');
// 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");
// 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");
// 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)
# 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")
# 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')
// 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} 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 | The list of countries to enable with the payment method. If sent empty, then all countries are supported by the payment method. | |
| currencies | The list of currencies to enable with the payment method. If sent empty, then all currencies are supported by the payment method. | |
| enabled | Indicates whether the payment method is enabled (true) or disabled (false). |
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"
]
}'
// 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
// 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);
// 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);
// 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);
// 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)
# 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")
# 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')
// 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);
id of the payment method and the updated list of payment method settings.Response{
"id": "PM00000000000000000000001",
"type": "visa",
"enabled": true,
"countries": [
"NL",
"US"
],
"currencies": [
"EUR",
"USD"
]
}
