- Get a list of all payment methods configured for your merchant account.
- Get the details of a payment method.
- Enable or disable a payment method.
- Change the country/region or currency of a payment method.
Requirements
Before you begin, take into account the following requirements, limitations, and preparations.| Requirement | Description | |
|---|---|---|
| Integration type | You must have an Adyen online payments integration and a checkout UI. | |
| API credential roles | Your Management API credential must have the following role: Management API—Payment methods read and write | |
| Limitations | You can only configure payment methods that are supported for your currency and integration. It may take some time for the payment method to become available due to external factors. Payment methods typically appear within a day. To avoid delays, we recommend requesting payment methods at least one day before the business opens. |
Get a list of all payment methods
To get the details of all payment methods configured on your merchant account, make a GET /merchants/{merchantId}/paymentMethodSettings request with the ID of your merchant account in the path. Get a list of payment methodscurl https://management-test.adyen.com/v3/merchants/{merchantId}/paymentMethodSettings \
-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);
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"
]
}