--- title: "Automate store management" description: "Use API requests to create, retrieve, and update your stores" url: "https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/automate-store-management" source_url: "https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/automate-store-management.md" canonical: "https://docs.adyen.com/point-of-sale/design-your-integration/determine-account-structure/automate-store-management" last_modified: "2026-05-24T12:54:31+02:00" language: "en" --- # Automate store management Use API requests to create, retrieve, and update your stores [View source](/point-of-sale/design-your-integration/determine-account-structure/automate-store-management.md) The Management API lets you [retrieve](#retrieve-stores), [create](#create-store), and [update](#update-store) your stores by making API requests. You can also do this manually in your [Customer Area](https://ca-test.adyen.com/), but with API requests you can automate these processes. For more information about stores and point-of-sale account structures, see [Set up your Adyen account for point of sale](/point-of-sale/design-your-integration/determine-account-structure). When creating and managing stores using API requests, you need to be aware of: * How stores are [identified](#store-identification). * The [status](#store-status) that a store can have. ## Requirements Before you begin, take into account the following requirements, limitations, and preparations. | Requirement | Description | | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Integration type** | A point-of-sale integration with Adyen. | | **[API credentials](/development-resources/api-credentials)** | You must have an API credential with an API key and the following [roles](/development-resources/api-credentials#api-permissions):- Management API—Stores read - Management API—Stores read and write - Management API—Payment methods read - Management API—Payment methods read and write If you have a Terminal API integration with [cloud-based communications](/point-of-sale/design-your-integration/choose-your-architecture#cloud-communications), you can use the existing API key that you use for Terminal API requests. | | **Limitations** | Requests to live Management API endpoints related to stores are subject to [rate limits](/point-of-sale/automating-terminal-management#rate-limits-in-the-live-environment). | ## Store identification Historically, stores under a merchant account have a human-readable **reference**, also known as the store code. This reference is unique for the merchant account. However, it is possible that a store reference is not unique on our platform. So we introduced a platform-generated **unique store ID** for each store. When you create a store, you can provide a reference for it, and Adyen will automatically assign a unique ID. For existing stores, the situation can vary. We are currently assigning unique IDs to existing stores, but it will take a while before this is completed. This means that if your existing store doesn't have an ID yet, you cannot make a PATCH request to update the store. ## Opening and closing stores Stores can have three statuses that determine how they operate: * **Active**: When you create a store, it is automatically set to **active**. After assigning and boarding payment terminals, the store is immediately open for business. * **Inactive**: When you change the store status from **active** to **inactive**, the store is blocked from accepting new transactions, but capturing outstanding transactions is still possible. The maximum [transaction limits and number of Store-and-Forward transactions](/point-of-sale/design-your-integration/determine-account-structure/configure-features#payment-features) for the store are set to zero (0). When you change the store status back to **active**, this restriction is removed. * **Closed**: Before you can close a store, you must first change the store status to **inactive**. Then, when you change the store status from **inactive** to **closed**, all payment terminals under the store are immediately reassigned to the merchant inventory. This means the terminals need to be assigned to a different store and boarded before they can process transactions again. It is not possible to change the status anymore because a closed store cannot be reopened. ## Retrieve store details You can make API requests to: * [Get a list of stores](#get-all-stores). For each store, the response includes the full details. * [Get the details of a specific store](#get-specific-store). ### Get a list of stores 1. To get a list of stores, use one of the following endpoints: * GET [/stores](https://docs.adyen.com/api-explorer/Management/latest/get/stores) for the details of all stores that your API key has access to. * GET [/merchants/{merchantId}/stores](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/stores) for the details of the stores under a specific merchant account. To find the `merchantId`, make a GET request to [/merchants](https://docs.adyen.com/api-explorer/Management/latest/get/merchants). You can filter the paginated response using the following query parameters: * [pageNumber](https://docs.adyen.com/api-explorer/Management/latest/get/stores#query-pageNumber): returns the stores listed on the specified page. * [pageSize](https://docs.adyen.com/api-explorer/Management/latest/get/stores#query-pageSize): the number of stores to have on a page. The default is 10, the maximum is 100. * [merchantId](https://docs.adyen.com/api-explorer/Management/latest/get/stores#query-merchantId): the merchant account ID that a store belongs to. You can only use this query parameter with a GET [/stores](https://docs.adyen.com/api-explorer/Management/latest/get/stores) request. * [reference](https://docs.adyen.com/api-explorer/Management/latest/get/stores#query-reference): the reference of the store. Because a store reference is only unique within a merchant account, a GET [/stores](https://docs.adyen.com/api-explorer/Management/latest/get/stores) request using the store reference as a query parameter returns all stores with that reference, including those of different merchant accounts. **Get a list of your stores** #### curl ```bash curl https://management-test.adyen.com/v3/stores \ -H 'x-api-key: ADYEN_API_KEY' \ -X GET \ -d '' ``` #### Java ```java // Adyen Java API Library v33.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 AccountStoreLevelApi service = new AccountStoreLevelApi(client); ListStoresResponse response = service.listStores(1, 1, "String", "String", null); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); $requestOptions['queryParams'] = array('pageNumber' => 'integer', 'pageSize' => 'integer', 'reference' => 'string', 'merchantId' => 'string'); // Send the request $service = new AccountStoreLevelApi($client); $response = $service->listStores($requestOptions); ``` #### C\# ```cs // Adyen .net API Library v28.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 AccountStoreLevelService(client); var response = service.ListStores(pageNumber: 1, pageSize: 1, reference: "string", merchantId: "string"); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v23.3.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.AccountStoreLevelApi.listStores(1, 1, "string", "string"); ``` #### Go ```go // Adyen Go API Library v17.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v17/src/common" "github.com/adyen/adyen-go-api-library/v17/src/adyen" "github.com/adyen/adyen-go-api-library/v17/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Send the request service := client.Management() req := service.AccountStoreLevelApi.ListStoresInput() req = req.PageNumber(1).PageSize(1).Reference("string").MerchantId("string") res, httpRes, err := service.AccountStoreLevelApi.ListStores(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.3.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" adyen.client.platform = "test" # The environment to use library in. query_parameters = { "pageNumber" : "integer", "pageSize" : "integer", "reference" : "string", "merchantId" : "string" } # Send the request result = adyen.management.account_store_level_api.list_stores(query_parameters=query_parameters) ``` #### Ruby ```rb # Adyen Ruby API Library v10.1.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) query_params = { :pageNumber => 'integer', :pageSize => 'integer', :reference => 'string', :merchantId => 'string' } # Send the request result = adyen.management.account_store_level_api.list_stores(query_params: query_params) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v23.3.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.AccountStoreLevelApi.listStores(1, 1, "string", "string"); ``` 2. In the response, note the `id` of the store. You can use this value to [get the details of a specific store](#get-specific-store) or to [update a store](#update-store). The next table shows the store details that the response can include. | Parameter | Description | | | ------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | [address](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-address) | An object that contains:- `city`: The city of the store. - `country`: The country of the store. - `line1` `line2` `line3`: Up to three lines used for the street name, street number, and other information. - `postalCode`: The postal code of the store. - `stateOrProvince`: The state or province code as defined in [ISO 3166-2](https://www.iso.org/iso-3166-country-codes.html). For example, **IL** for Illinois in the United States. | | | [description](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-description) | The description of the store. | | | [externalReferenceId](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-externalReferenceId) | The unique identifier of the store, used by certain payment methods and tax authorities. | | | [id](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-id) | Unique identifier of the store, starting with **ST**. This value is generated by Adyen. | | | [\_links](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-_links) | The URL of the store. | | | [merchantId](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-merchantId) | The ID of the merchant account that the store belongs to. | | | [phoneNumber](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-phoneNumber) | The phone number of the store, including the country code. | | | [reference](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-reference) | Your reference to recognize the store by. If a reference was not specified when the store was created, the reference is populated with the store `id`. | | | [shopperStatement](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-shopperStatement) | Store name shown on the shopper's bank or credit card statement and on the shopper receipt. | | | [splitConfiguration](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-splitConfiguration) | *Only for Adyen for Platforms merchants.* An object containing the information required to [automatically split transactions](/platforms/automatic-split-configuration) that are routed through this store.This object consists of:- [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-splitConfigurationId): the unique identifier of the [split configuration profile](/platforms/automatic-split-configuration/create-split-configuration) that you want to add to the store. - [balanceAccountId](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)/balanceAccounts#responses-200-balanceAccounts-id): The unique identifier of the balance account to which the split amount must be booked, depending on the defined [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic). | | | [status](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-data-status) | The [status](#store-status) of the store. | | **List of stores** ```json { "_links": { "first": { "href": "https://management-test.adyen.com/v3/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=1&pageSize=1" }, "last": { "href": "https://management-test.adyen.com/v3/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=2&pageSize=1" }, "next": { "href": "https://management-test.adyen.com/v3/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=2&pageSize=1" }, "self": { "href": "https://management-test.adyen.com/v3/merchants/YOUR_MERCHANT_ACCOUNT_ID/stores?pageNumber=1&pageSize=1" } }, "itemsTotal": 2, "pagesTotal": 1, "data": [ { "id": "ST322LJ223223K5F4SQNR9XL5", "address": { "city": "Springfield", "country": "US", "line1": "200 Main Street", "line2": "Building 5A", "line3":"Suite 3", "postalCode":"20250", "stateOrProvince":"NY" }, "description": "City centre store", "merchantId": "YOUR_MERCHANT_ACCOUNT_ID", "phoneNumber": "+1813702551707653", "reference": "Springfield Shop", "status": "active", "_links": { "self": { "href": "https://management-test.adyen.com/v3/stores/ST322LJ223223K5F4SQNR9XL5" } } }, { "id": "ST322LJ223223K5F4SQNR9XL6", "address": { "city": "North Madison", "country": "US", "line1": "1492 Townline Road", "line2": "Rowland Business Park", "postalCode":"20577", "stateOrProvince":"NY" }, "description": "West location", "merchantId": "YOUR_MERCHANT_ACCOUNT_ID", "phoneNumber": "+1211992213193020", "reference": "Second Madison store", "status": "active", "_links": { "self": { "href": "https://management-test.adyen.com/v3/stores/ST322LJ223223K5F4SQNR9XL6" } } } ] }' ``` ### Get the details of a specific store 1. Make sure that you know the `id` or the `reference` of the store. To find these values, get a [list of stores](#get-all-stores). 2. To get the details of a single store, use the following endpoints: * GET [/stores/{storeId}](https://docs.adyen.com/api-explorer/Management/latest/get/stores/\(storeId\)) * GET [/merchants/{merchantId}/stores/{storeId}](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/stores/\(storeId\)) You can also use the store [reference](https://docs.adyen.com/api-explorer/Management/latest/get/stores#query-reference) as a query parameter. Because the reference is only unique within a merchant account, if you use the [/stores](https://docs.adyen.com/api-explorer/Management/latest/get/stores) endpoint you get all stores with that reference, including those of different merchant accounts. To get the details of a store under a merchant account using the store reference, make a GET request to [/merchants/{merchantId}/stores?reference={reference}](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/stores#query-reference). This example shows how to get information about a store using the store ID in the path. **Get the details of a specific store** #### curl ```bash curl https://management-test.adyen.com/v3/stores/ST322LJ223223K5F4SQNR9XL6 \ -H 'x-api-key: ADYEN_API_KEY' \ -X GET \ -d '' ``` #### Java ```java // Adyen Java API Library v33.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 AccountStoreLevelApi service = new AccountStoreLevelApi(client); Store response = service.getStoreById("storeId", null); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Send the request $service = new AccountStoreLevelApi($client); $response = $service->getStoreById('storeId'); ``` #### C\# ```cs // Adyen .net API Library v28.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 AccountStoreLevelService(client); var response = service.GetStoreById("storeId"); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v23.3.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.AccountStoreLevelApi.getStoreById("storeId"); ``` #### Go ```go // Adyen Go API Library v17.0.0 import ( "context" "github.com/adyen/adyen-go-api-library/v17/src/common" "github.com/adyen/adyen-go-api-library/v17/src/adyen" "github.com/adyen/adyen-go-api-library/v17/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Send the request service := client.Management() req := service.AccountStoreLevelApi.GetStoreByIdInput("storeId") res, httpRes, err := service.AccountStoreLevelApi.GetStoreById(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v13.3.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.account_store_level_api.get_store_by_id(storeId="storeId") ``` #### Ruby ```rb # Adyen Ruby API Library v10.1.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 # Send the request result = adyen.management.account_store_level_api.get_store_by_id('storeId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v23.3.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.AccountStoreLevelApi.getStoreById("storeId"); ``` 3. Note that the response returns the same details as when you get a [list of stores](#get-all-stores), but only for the specified store. **Response showing the store details** ```json { "id": "ST322LJ223223K5F4SQNR9XL6", "address": { "city": "North Madison", "country": "US", "line1": "1492 Townline Road", "line2": "Rowland Business Park", "postalCode":"20577", "stateOrProvince":"NY" }, "description": "West location", "merchantId": "YOUR_MERCHANT_ACCOUNT_ID", "phoneNumber": "+1211992213193020", "reference": "Second Madison store", "status": "active", "_links": { "self": { "href": "https://management-test.adyen.com/v3/stores/ST322LJ223223K5F4SQNR9XL6" } } }' ``` ## Create a store Before you create a store, make sure you know the merchant account ID that the store will be associated with.\ For a list of merchant account IDs accessible with your API key, make a GET [/merchants](https://docs.adyen.com/api-explorer/Management/latest/get/merchants) request. 1. To create a store, make a POST [/stores](https://docs.adyen.com/api-explorer/Management/latest/post/stores) request, specifying: | Parameter | Required | Description | | | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | | [address](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-address) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | An object that contains:- `city`: the city of the store. - `country`: the country of the store. - `line1` `line2` `line3`: up to three lines can be used for the street name, street number, and other information. Only the first line is mandatory. - `postalCode`: the postal code of the store. - `stateOrProvince`: *Required for Australia, Brazil, Canada, India, Mexico, New Zealand, United States.* The state or province of the store as defined in [ISO 3166-2](https://www.iso.org/iso-3166-country-codes.html). For example, **ON** for Ontario, Canada. | | | [description](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-description) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | A description for the store. | | | [externalReferenceId](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-externalReferenceId) | | *Only when using the Zip payment method.*The location ID that Zip has assigned to your store. | | | [merchantId](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-merchantId) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The merchant account ID. | | | [phoneNumber](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-phoneNumber) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The complete phone number of the store, beginning with *+* and the country code. | | | [reference](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-reference) | | A unique reference to recognize the store by. Allowed characters: Lowercase and uppercase letters without diacritics, numbers 0 through 9, hyphen (-), and underscore (\_).If you do not provide a reference in your POST request, it is populated with the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id). | | | [shopperStatement](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-shopperStatement) | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The store name shown on the shopper's bank or credit card statement and the shopper receipt. Maximum length: 22 characters. Cannot be all numerals. | | | [splitConfiguration](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-splitConfiguration) | | *Only for Adyen for Platforms merchants.* An object containing the information required to [automatically split transactions](/platforms/automatic-split-configuration) that are routed through this store.This object consists of:- [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-splitConfigurationId): the unique identifier of the [split configuration](/platforms/automatic-split-configuration/create-split-configuration) that you want to add to the store. - [balanceAccountId](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)/balanceAccounts#responses-200-balanceAccounts-id): The unique identifier of the balance account to which the split amount must be booked, depending on the defined [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations/\(splitConfigurationId\)#request-splitLogic). | | | [localizedInformation](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-localizedInformation) | | *Only for stores in Japan.* An object that provides localized information about the store, in the relevant character set.This object consists of:- [localShopperStatement](https://docs.adyen.com/api-explorer/Management/latest/post/stores#request-localizedInformation-localShopperStatement): an array with localized shopper statements which card schemes use in the bank statement. Each array item consists of: * `script`: the character set. Allowed values: **ja-Hani** (Kanji) and **ja-Kana** (Katakana). * `value`: the text of the shopper statement, in the specified character set. For Japan, the card schemes require two local shopper statements, one in ja-Hani and one in ja-Kana. | | You can also make a POST request to [/merchants/{merchantId}/stores](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/stores) using the same parameters. In that case you do not need to include the merchant account ID in the request body. ### Tab: Create a store - general **Create a store** #### curl ```bash curl https://management-test.adyen.com/v3/stores \ -H 'content-type: application/json' \ -H 'x-api-key: ADYEN_API_KEY' \ -X POST \ -d '{ "merchantId":"MERCHANT_ACCOUNT_ID", "description":"City centre store", "shopperStatement": "Springfield Shop", "phoneNumber":"1813702551707653", "reference":"Spring_store_2", "address":{ "country": "US", "line1": "200 Main Street", "line2": "Building 5A", "line3":"Suite 3", "city": "Springfield", "stateOrProvince": "NY", "postalCode":"20250" } }' ``` #### Java ```java // Adyen Java API Library v41.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) StoreLocation storeLocation = new StoreLocation() .country("US") .stateOrProvince("NY") .city("Springfield") .postalCode("20250") .line3("Suite 3") .line2("Building 5A") .line1("200 Main Street"); StoreCreationWithMerchantCodeRequest storeCreationWithMerchantCodeRequest = new StoreCreationWithMerchantCodeRequest() .reference("Spring_store_2") .phoneNumber("1813702551707653") .address(storeLocation) .merchantId("MERCHANT_ACCOUNT_ID") .description("City centre store") .shopperStatement("Springfield Shop"); // Send the request AccountStoreLevelApi service = new AccountStoreLevelApi(client); Store response = service.createStore(storeCreationWithMerchantCodeRequest, null); ``` #### PHP ```php setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $storeLocation = new StoreLocation(); $storeLocation ->setCountry("US") ->setStateOrProvince("NY") ->setCity("Springfield") ->setPostalCode("20250") ->setLine3("Suite 3") ->setLine2("Building 5A") ->setLine1("200 Main Street"); $storeCreationWithMerchantCodeRequest = new StoreCreationWithMerchantCodeRequest(); $storeCreationWithMerchantCodeRequest ->setReference("Spring_store_2") ->setPhoneNumber("1813702551707653") ->setAddress($storeLocation) ->setMerchantId("MERCHANT_ACCOUNT_ID") ->setDescription("City centre store") ->setShopperStatement("Springfield Shop"); // Send the request $service = new AccountStoreLevelApi($client); $response = $service->createStore($storeCreationWithMerchantCodeRequest); ``` #### C\# ```cs // Adyen .net API Library v33.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) StoreLocation storeLocation = new StoreLocation { Country = "US", StateOrProvince = "NY", City = "Springfield", PostalCode = "20250", Line3 = "Suite 3", Line2 = "Building 5A", Line1 = "200 Main Street" }; StoreCreationWithMerchantCodeRequest storeCreationWithMerchantCodeRequest = new StoreCreationWithMerchantCodeRequest { Reference = "Spring_store_2", PhoneNumber = "1813702551707653", Address = storeLocation, MerchantId = "MERCHANT_ACCOUNT_ID", Description = "City centre store", ShopperStatement = "Springfield Shop" }; // Send the request var service = new AccountStoreLevelService(client); var response = service.CreateStore(storeCreationWithMerchantCodeRequest); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v30.1.0 const { Client, ManagementAPI } = require('@adyen/api-library'); const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const storeCreationWithMerchantCodeRequest = { merchantId: "MERCHANT_ACCOUNT_ID", description: "City centre store", shopperStatement: "Springfield Shop", phoneNumber: "1813702551707653", reference: "Spring_store_2", address: { country: "US", line1: "200 Main Street", line2: "Building 5A", line3: "Suite 3", city: "Springfield", stateOrProvince: "NY", postalCode: "20250" } } // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.AccountStoreLevelApi.createStore(storeCreationWithMerchantCodeRequest); ``` #### Go ```go // Adyen Go API Library v21.1.0 import ( "context" "github.com/adyen/adyen-go-api-library/v21/src/common" "github.com/adyen/adyen-go-api-library/v21/src/adyen" "github.com/adyen/adyen-go-api-library/v21/src/management" ) client := adyen.NewClient(&common.Config{ ApiKey: "ADYEN_API_KEY", Environment: common.TestEnv, }) // Create the request object(s) storeLocation := management.StoreLocation{ Country: "US", StateOrProvince: common.PtrString("NY"), City: common.PtrString("Springfield"), PostalCode: common.PtrString("20250"), Line3: common.PtrString("Suite 3"), Line2: common.PtrString("Building 5A"), Line1: common.PtrString("200 Main Street"), } storeCreationWithMerchantCodeRequest := management.StoreCreationWithMerchantCodeRequest{ Reference: common.PtrString("Spring_store_2"), PhoneNumber: "1813702551707653", Address: storeLocation, MerchantId: "MERCHANT_ACCOUNT_ID", Description: "City centre store", ShopperStatement: "Springfield Shop", } // Send the request service := client.Management() req := service.AccountStoreLevelApi.CreateStoreInput().StoreCreationWithMerchantCodeRequest(storeCreationWithMerchantCodeRequest) res, httpRes, err := service.AccountStoreLevelApi.CreateStore(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v14.0.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 = { "merchantId": "MERCHANT_ACCOUNT_ID", "description": "City centre store", "shopperStatement": "Springfield Shop", "phoneNumber": "1813702551707653", "reference": "Spring_store_2", "address": { "country": "US", "line1": "200 Main Street", "line2": "Building 5A", "line3": "Suite 3", "city": "Springfield", "stateOrProvince": "NY", "postalCode": "20250" } } # Send the request result = adyen.management.account_store_level_api.create_store(request=json_request) ``` #### Ruby ```rb # Adyen Ruby API Library v11.1.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 = { :merchantId => 'MERCHANT_ACCOUNT_ID', :description => 'City centre store', :shopperStatement => 'Springfield Shop', :phoneNumber => '1813702551707653', :reference => 'Spring_store_2', :address => { :country => 'US', :line1 => '200 Main Street', :line2 => 'Building 5A', :line3 => 'Suite 3', :city => 'Springfield', :stateOrProvince => 'NY', :postalCode => '20250' } } # Send the request result = adyen.management.account_store_level_api.create_store(request_body) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v30.1.0 import { Client, ManagementAPI, Types } from "@adyen/api-library"; const config = new Config({ apiKey: "ADYEN_API_KEY", environment: EnvironmentEnum.TEST }); const client = new Client(config); // Create the request object(s) const storeLocation: Types.management.StoreLocation = { country: "US", stateOrProvince: "NY", city: "Springfield", postalCode: "20250", line3: "Suite 3", line2: "Building 5A", line1: "200 Main Street" }; const storeCreationWithMerchantCodeRequest: Types.management.StoreCreationWithMerchantCodeRequest = { reference: "Spring_store_2", phoneNumber: "1813702551707653", address: storeLocation, merchantId: "MERCHANT_ACCOUNT_ID", description: "City centre store", shopperStatement: "Springfield Shop" }; // Send the request const managementAPI = new ManagementAPI(client); const response = managementAPI.AccountStoreLevelApi.createStore(storeCreationWithMerchantCodeRequest); ``` ### Tab: Create a store - Japan **Create a Japanese store** #### curl ```bash curl https://management-test.adyen.com/v3/stores \ -H 'content-type: application/json' \ -H 'x-api-key: ADYEN_API_KEY' \ -X POST \ -d '{ "merchantId": "MERCHANT_ACCOUNT_ID", "description": "Tokyo Ginza store", "shopperStatement": "Adyen Co., Ltd.", "localizedInformation": { "localShopperStatement": [ { "script": "ja-Hani", "value": "アディエン株式会社" }, { "script": "ja-Kana", "value": "アディエンジャパン" } ] }, "phoneNumber": "+81312345678", "reference": "Ginza_store_2", "address": { "country": "JP", "line1": "Tokyo Central Ginza", "line2": "ACN Higashi Azabu Building Rokukai", "city": "Tokyo", "postalCode":"104-0061" } }' ``` #### Python ```py # Adyen Python API Library v14.0.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 = { "merchantId": "MERCHANT_ACCOUNT_ID", "description": "Tokyo Ginza store", "shopperStatement": "Adyen Co., Ltd.", "localizedInformation": { "localShopperStatement": [ { "script": "ja-Hani", "value": "アディエン株式会社" }, { "script": "ja-Kana", "value": "アディエンジャパン" } ] }, "phoneNumber": "+81312345678", "reference": "Ginza_store_2", "address": { "country": "JP", "line1": "Tokyo Central Ginza", "line2": "ACN Higashi Azabu Building Rokukai", "city": "Tokyo", "postalCode": "104-0061" } } # Send the request result = adyen.management.account_store_level_api.create_store(request=json_request) ``` #### Ruby ```rb # Adyen Ruby API Library v11.1.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 = { :merchantId => 'MERCHANT_ACCOUNT_ID', :description => 'Tokyo Ginza store', :shopperStatement => 'Adyen Co., Ltd.', :localizedInformation => { :localShopperStatement => [ { :script => 'ja-Hani', :value => 'アディエン株式会社' }, { :script => 'ja-Kana', :value => 'アディエンジャパン' } ] }, :phoneNumber => '+81312345678', :reference => 'Ginza_store_2', :address => { :country => 'JP', :line1 => 'Tokyo Central Ginza', :line2 => 'ACN Higashi Azabu Building Rokukai', :city => 'Tokyo', :postalCode => '104-0061' } } # Send the request result = adyen.management.account_store_level_api.create_store(request_body) ``` 2. In the response, note that this includes the Adyen-generated [id](https://docs.adyen.com/api-explorer/Management/latest/post/stores#responses-200-id) for the store. You can use this as a path parameter to [update the store](#update-store). **Store created** ```json { "id": "ST322LJ223223K5F4SQNR9XL5", "address":{ "country": "US", "line1": "200 Main Street", "line2": "Building 5A", "line3":"Suite 3", "city": "Springfield", "stateOrProvince": "NY", "postalCode":"20250" }, "description": "City centre store", "merchantId": "MERCHANT_ACCOUNT_ID", "phoneNumber": "1813702551707653", "reference": "Spring_store_2", "shopperStatement": "Springfield Shop", "status": "active", "_links": { "self": { "href": "https://management-test.adyen.com/latest/stores/ST322LJ223223K5F4SQNR9XL5" } } }' ``` 3. [Add payment methods](#add-payment-method) to the store. ## Manage payment methods A newly created store doesn't have any payment methods yet. You need to [add](#add-payment-method) payment methods one at a time. Every payment method that you add, gets an ID that is unique for the combination of that payment method and store. Using this ID, you can [update](#update-payment-method) the settings of that payment method in the corresponding store. ### Add a payment method 1. To decide what payment method to add: * See the [list of payment methods](/development-resources/paymentmethodvariant#management-api) that you can add using Management API. Some payment methods (like iDEAL) only apply to web shops and are not supported on payment terminals. * For a list of payment methods that are already enabled for your store, make a GET request to [/merchants/{merchantId}/paymentMethodSettings](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/paymentMethodSettings) with your store ID as a query parameter.\ For example, `.../paymentMethodSettings?storeID=ST322LJ223223K5F4SQNR9XL5`. 2. To add a payment method to your store, make a POST request to [/merchants/{merchantId}/paymentMethodSettings](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/paymentMethodSettings) with your store ID in the request body (not as a query parameter). Specify: | 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-") | Payment method [type](/development-resources/paymentmethodvariant#management-api). Some payment methods require an additional object with payment method details. | | | [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 that you want to request a payment method for. | | | [storeIds](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/paymentMethodSettings#request-storeIds) | | The `id` of the store that you get when [creating a store](#create-store) . | | | [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. | | The following example adds American Express. **Add payment method** #### curl ```bash curl https://management-test.adyen.com/v3/merchants/{merchantId}/paymentMethodSettings \ -H 'content-type: application/json' \ -H 'x-API-key: ADYEN_API_KEY' \ -X POST \ -d '{ "type": "amex", "storeIds":["ST322LJ223223K5F4SQNR9XL5"], "currencies": [ "USD" ], "countries": [] }' ``` #### Java ```java // Adyen Java API Library v25.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); // Request objects PaymentMethodSetupInfo paymentMethodSetupInfo = new PaymentMethodSetupInfo() .countries(Arrays.asList()) .type(PaymentMethodSetupInfo.TypeEnum.AMEX) .currencies(Arrays.asList("USD")); // Make the request PaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client); PaymentMethod response = service.requestPaymentMethod("merchantId", paymentMethodSetupInfo, null); ``` #### PHP ```php // Adyen PHP API Library v17.4.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); // Request objects $paymentMethodSetupInfo = new PaymentMethodSetupInfo(); $paymentMethodSetupInfo ->setCountries(array()) ->setType("amex") ->setCurrencies(array("USD")); // Make the request $service = new PaymentMethodsMerchantLevelApi($client); $response = $service->requestPaymentMethod('merchantId', $paymentMethodSetupInfo); ``` #### C\# ```cs // Adyen .net API Library v14.3.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); // Fill in your request objects PaymentMethodSetupInfo paymentMethodSetupInfo = new PaymentMethodSetupInfo { Countries = { }, Type = PaymentMethodSetupInfo.TypeEnum.Amex, Currencies = { "USD" } }; // Make the request var service = new PaymentMethodsMerchantLevelService(client); var response = service.RequestPaymentMethod("merchantId", paymentMethodSetupInfo); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v16.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 const paymentMethodSetupInfo = { type: "amex", storeId: "ST322LJ223223K5F4SQNR9XL5", currencies: [ "USD" ], countries: [ ] } // Make the request const managementAPI = new ManagementAPI(client); const response = managementAPI.PaymentMethodsMerchantLevelApi.requestPaymentMethod("merchantId", paymentMethodSetupInfo); ``` #### Go ```go // Adyen Go API Library v9.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, }) // Fill in your request objects paymentMethodSetupInfo := management.PaymentMethodSetupInfo{ Countries: []string{ , }, Type: "amex", Currencies: []string{ "USD", }, } // Make 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.2.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" adyen.client.platform = "test" # The environment to use library in. json_request = { "type": "amex", "storeId": "ST322LJ223223K5F4SQNR9XL5", "currencies": [ "USD" ], "countries": [ ] } result = adyen.management.payment_methods_merchant_level_api.request_payment_method(request=json_request, merchantId="merchantId") ``` #### Ruby ```rb # Adyen Ruby API Library v9.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 request_body = { :type => 'amex', :storeId => 'ST322LJ223223K5F4SQNR9XL5', :currencies => [ 'USD' ], :countries => [ ] } result = adyen.management.payment_methods_merchant_level_api.request_payment_method(request_body, 'merchantId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v16.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 objects const paymentMethodSetupInfo: Types.management.PaymentMethodSetupInfo = { countries: [], type: Types.management.PaymentMethodSetupInfo.TypeEnum.Amex, currencies: ["USD"] }; // Make the request const managementAPI = new ManagementAPI(client); const response = managementAPI.PaymentMethodsMerchantLevelApi.requestPaymentMethod("merchantId", paymentMethodSetupInfo); ``` 3. In the response, note that this includes the `id` of the payment method. This ID is specific for the combination of payment method and store. You can use this as a path parameter to [update the settings of the payment method](#update-payment-method). **Response** ```json { "id": "PM3227C223224K5DSP4NSDKPK", "type": "amex", "storeIds": ["ST322LJ223223K5F4SQNR9XL5"], "countries": [], "currencies": [ "USD" ] } ``` 4. To check if the added payment method is enabled, make a GET request to [/merchants/{merchantId}/paymentMethodSettings](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/paymentMethodSettings) with your store ID as a query parameter. **Get payment methods for a store** #### curl ```bash curl https://management-test.adyen.com/v3/merchants/{merchantId}/paymentMethodSettings?storeID=ST322LJ223223K5F4SQNR9XL5 \ -H 'x-API-key: ADYEN_API_KEY' \ -X GET ``` #### Java ```java // Adyen Java API Library v25.0.0 import com.adyen.Client; import com.adyen.enums.Environment; import com.adyen.service.management.*; Client client = new Client("ADYEN_API_KEY", Environment.TEST); // Make the request PaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client); PaymentMethodResponse response = service.getAllPaymentMethods("merchantId", "String", "String", 1, 1, null); ``` #### PHP ```php // Adyen PHP API Library v17.4.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'); // Make the request $service = new PaymentMethodsMerchantLevelApi($client); $response = $service->getAllPaymentMethods('merchantId', $requestOptions); ``` #### C\# ```cs // Adyen .net API Library v14.3.0 using Adyen; using Environment = Adyen.Model.Environment; using Adyen.Service.Management; var config = new Config() { XApiKey = "ADYEN_API_KEY", Environment = Environment.Test }; var client = new Client(config); // Make 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 v16.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"}); // Make the request const managementAPI = new ManagementAPI(client); const response = managementAPI.PaymentMethodsMerchantLevelApi.getAllPaymentMethods("merchantId", "string", "string", 1, 1); ``` #### Go ```go // Adyen Go API Library v9.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, }) // Make 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 v12.2.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" } result = adyen.management.payment_methods_merchant_level_api.get_all_payment_methods(merchantId="merchantId", query_parameters=query_parameters) ``` #### Ruby ```rb # Adyen Ruby API Library v9.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 query_params = { :storeId => 'string', :businessLineId => 'string', :pageSize => 'integer', :pageNumber => 'integer' } result = adyen.management.payment_methods_merchant_level_api.get_all_payment_methods('merchantId', query_params: query_params) ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v16.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"}); // Make the request const managementAPI = new ManagementAPI(client); const response = managementAPI.PaymentMethodsMerchantLevelApi.getAllPaymentMethods("merchantId", "string", "string", 1, 1); ``` **Response** ```json { ..., "data": [ { "PaymentMethod": { "id": "PM3227C223224K5DSP4NSDKPK", "type": "amex", "storeId": "ST322LJ223223K5F4SQNR9XL5", "enabled": true, "countries": [], "currencies": [] } } ] } ``` ### Update a payment method After adding a payment method to a store, you can change its settings. For example, to update the supported countries/regions or currencies, or to disable the payment method. To update a payment method: 1. Make sure that you know the `id` of the payment method for the applicable store. To find this value, make a GET request to [/merchants/{merchantId}/paymentMethodSettings](https://docs.adyen.com/api-explorer/Management/latest/get/merchants/\(merchantId\)/paymentMethodSettings). 2. Make a PATCH request to [/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}](https://docs.adyen.com/api-explorer/Management/latest/patch/merchants/\(merchantId\)/paymentMethodSettings/\(paymentMethodId\)), specifying: | 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**). | Because the payment method ID in the path is unique for the store where the payment method is set up, there is no need to specify a store. The next example updates American Express with payments in Canadian dollars: **Update payment method settings** #### curl ```bash curl https://management-test.adyen.com/v3/merchants/{merchantId}/paymentMethodSettings/PM3227C223224K5DSP4NSDKPK \ -H 'x-API-key: ADYEN_API_KEY' \ -H 'content-type: application/json' \ -X PATCH \ -d '{ "currencies": [ "CAD", "USD" ] }' ``` #### Java ```java // Adyen Java API Library v25.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); // Request objects UpdatePaymentMethodInfo updatePaymentMethodInfo = new UpdatePaymentMethodInfo() .currencies(Arrays.asList("CAD", "USD")); // Make the request PaymentMethodsMerchantLevelApi service = new PaymentMethodsMerchantLevelApi(client); PaymentMethod response = service.updatePaymentMethod("merchantId", "paymentMethodId", updatePaymentMethodInfo, null); ``` #### PHP ```php // Adyen PHP API Library v17.4.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); // Request objects $updatePaymentMethodInfo = new UpdatePaymentMethodInfo(); $updatePaymentMethodInfo ->setCurrencies(array("CAD", "USD")); // Make the request $service = new PaymentMethodsMerchantLevelApi($client); $response = $service->updatePaymentMethod('merchantId', 'paymentMethodId', $updatePaymentMethodInfo); ``` #### C\# ```cs // Adyen .net API Library v14.3.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); // Fill in your request objects UpdatePaymentMethodInfo updatePaymentMethodInfo = new UpdatePaymentMethodInfo { Currencies = { "CAD", "USD" } }; // Make the request var service = new PaymentMethodsMerchantLevelService(client); var response = service.UpdatePaymentMethod("merchantId", "paymentMethodId", updatePaymentMethodInfo); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v16.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 const updatePaymentMethodInfo = { currencies: [ "CAD", "USD" ] } // Make the request const managementAPI = new ManagementAPI(client); const response = managementAPI.PaymentMethodsMerchantLevelApi.updatePaymentMethod("merchantId", "paymentMethodId", updatePaymentMethodInfo); ``` #### Go ```go // Adyen Go API Library v9.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, }) // Fill in your request objects updatePaymentMethodInfo := management.UpdatePaymentMethodInfo{ Currencies: []string{ "CAD", "USD", }, } // Make 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 v12.2.0 import Adyen adyen = Adyen.Adyen() adyen.client.xapikey = "ADYEN_API_KEY" adyen.client.platform = "test" # The environment to use library in. json_request = { "currencies": [ "CAD", "USD" ] } result = adyen.management.payment_methods_merchant_level_api.update_payment_method(request=json_request, merchantId="merchantId", paymentMethodId="paymentMethodId") ``` #### Ruby ```rb # Adyen Ruby API Library v9.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 request_body = { :currencies => [ 'CAD', 'USD' ] } result = adyen.management.payment_methods_merchant_level_api.update_payment_method(request_body, 'merchantId', 'paymentMethodId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v16.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 objects const updatePaymentMethodInfo: Types.management.UpdatePaymentMethodInfo = { currencies: ["CAD", "USD"] }; // Make the request const managementAPI = new ManagementAPI(client); const response = managementAPI.PaymentMethodsMerchantLevelApi.updatePaymentMethod("merchantId", "paymentMethodId", updatePaymentMethodInfo); ``` 3. In the response, note that this contains the `storeId` of the store that the payment method was updated for. **Response** ```json { "id": "PM3227C223224K5DSP4NSDKPK", "type": "amex", "storeId": "ST322LJ223223K5F4SQNR9XL5", "enabled": true, "countries": [], "currencies": [ "CAD", "USD" ] } ``` ## Update a store To update a store, you need to know its [unique store ID](#store-identification). In your request, include only the parameters you want to update. The same applies if the parameter is inside an object. For example, to change the postal code and remove the third address line from the store address, the `address` object should include the `postalCode` parameter with the new value, and the `line3` parameter with an empty value. To update a store: 1. Make sure that you know the [id](https://docs.adyen.com/api-explorer/Management/latest/get/stores#responses-200-id) of the store. To find this value, get a [list of stores](#get-all-stores). 2. To update the store, use the following endpoints: * PATCH [/stores/{storeId}](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)) * PATCH [/merchants/{merchantId}/stores/{storeId}](https://docs.adyen.com/api-explorer/Management/latest/patch/merchants/\(merchantId\)/stores/\(storeId\)) In the request body, include any of the following parameters: | Parameter | Description | | | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | - | | [address](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)#request-address) | Can contain string values for the following parameters:- `city`: The city of the store. - `line1` `line2` `line3`: Up to three lines can be used for the street name, street number, and other information. - `postalCode`: The postal code of the store. Must be in the same postal code format as the country of the store. `stateOrProvince` : *Required for Australia, Brazil, Canada, India, Mexico, New Zealand, United States.* The state or province of the store as defined in [ISO 3166-2](https://www.iso.org/iso-3166-country-codes.html) . For example, **ON** for Ontario, Canada.It is not possible to update the country of the store. | | | [description](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)#request-description) | Your description of the store. | | | [externalReferenceId](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)#request-externalReferenceId) | *Only when using the Zip payment method.*The location ID that Zip has assigned to your store. | | | [splitConfiguration](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)#request-splitConfiguration) | *Only for Adyen for Platforms merchants.* An object containing the information required to [automatically split transactions](/platforms/automatic-split-configuration) that are routed through this store.This object consists of:- [splitConfigurationId](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#responses-200-splitConfigurationId): the unique identifier of the [split configuration](/platforms/automatic-split-configuration/create-split-configuration) that you want to add to the store. - [balanceAccountId](https://docs.adyen.com/api-explorer/balanceplatform/latest/get/accountHolders/\(id\)/balanceAccounts#responses-200-balanceAccounts-id): The unique identifier of the balance account to which the split amount must be booked, depending on the defined [splitLogic](https://docs.adyen.com/api-explorer/Management/latest/post/merchants/\(merchantId\)/splitConfigurations#request-rules-splitLogic). | | | [status](https://docs.adyen.com/api-explorer/Management/latest/patch/stores/\(storeId\)#request-status) | The [status](#store-status) of the store. You can change the status from **active** to **inactive** or from **inactive** to **active** or **closed**. After a store is **closed**, you cannot change the status anymore. | | This example shows how you update a store's street address and postal code, identifying the store by ID. The first two lines of the address are changed and the third line is removed by including an empty value: **Update a store\\'s address** #### curl ```bash curl https://management-test.adyen.com/v3/stores/ST322LJ223223K5F4SQNR9XL5 \ -H 'content-type: application/json' \ -H 'x-api-key: ADYEN_API_KEY' \ -X PATCH \ -d '{ "address":{ "line1": "1776 West Pinewood Avenue", "line2": "Heartland Building", "line3": "", "postalCode":"20251" } }' ``` #### Java ```java // Adyen Java API Library v25.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) UpdatableAddress updatableAddress = new UpdatableAddress() .postalCode("20251") .line3("") .line2("Heartland Building") .line1("1776 West Pinewood Avenue"); UpdateStoreRequest updateStoreRequest = new UpdateStoreRequest() .address(updatableAddress); // Make the API call AccountStoreLevelApi service = new AccountStoreLevelApi(client); Store response = service.updateStoreById("storeId", updateStoreRequest, null); ``` #### PHP ```php // Adyen PHP API Library v17.4.0 use Adyen\Client; use Adyen\Environment; use Adyen\Model\Management\UpdatableAddress; use Adyen\Model\Management\UpdateStoreRequest; use Adyen\Service\Management\AccountStoreLevelApi; $client = new Client(); $client->setXApiKey("ADYEN_API_KEY"); $client->setEnvironment(Environment::TEST); // Create the request object(s) $updatableAddress = new UpdatableAddress(); $updatableAddress ->setPostalCode("20251") ->setLine3("") ->setLine2("Heartland Building") ->setLine1("1776 West Pinewood Avenue"); $updateStoreRequest = new UpdateStoreRequest(); $updateStoreRequest ->setAddress($updatableAddress); // Make the API call $service = new AccountStoreLevelApi($client); $response = $service->updateStoreById('storeId', $updateStoreRequest); ``` #### C\# ```cs // Adyen .net API Library v14.4.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) UpdatableAddress updatableAddress = new UpdatableAddress { PostalCode = "20251", Line3 = "", Line2 = "Heartland Building", Line1 = "1776 West Pinewood Avenue" }; UpdateStoreRequest updateStoreRequest = new UpdateStoreRequest { Address = updatableAddress }; // Make the API call var service = new AccountStoreLevelService(client); var response = service.UpdateStoreById("storeId", updateStoreRequest); ``` #### NodeJS (JavaScript) ```js // Adyen Node API Library v16.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 updateStoreRequest = { address: { line1: "1776 West Pinewood Avenue", line2: "Heartland Building", line3: "", postalCode: "20251" } } // Make the API call const managementAPI = new ManagementAPI(client); const response = managementAPI.AccountStoreLevelApi.updateStoreById("storeId", updateStoreRequest); ``` #### Go ```go // Adyen Go API Library v9.3.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) updatableAddress := management.UpdatableAddress{ PostalCode: common.PtrString("20251"), Line3: common.PtrString(""), Line2: common.PtrString("Heartland Building"), Line1: common.PtrString("1776 West Pinewood Avenue"), } updateStoreRequest := management.UpdateStoreRequest{ Address: &updatableAddress, } // Make the API call service := client.Management() req := service.AccountStoreLevelApi.UpdateStoreByIdInput("storeId").UpdateStoreRequest(updateStoreRequest) res, httpRes, err := service.AccountStoreLevelApi.UpdateStoreById(context.Background(), req) ``` #### Python ```py # Adyen Python API Library v12.2.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 = { "address": { "line1": "1776 West Pinewood Avenue", "line2": "Heartland Building", "line3": "", "postalCode": "20251" } } # Make the API call result = adyen.management.account_store_level_api.update_store_by_id(request=json_request, storeId="storeId") ``` #### Ruby ```rb # Adyen Ruby API Library v9.3.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 = { :address => { :line1 => '1776 West Pinewood Avenue', :line2 => 'Heartland Building', :line3 => '', :postalCode => '20251' } } # Make the API call result = adyen.management.account_store_level_api.update_store_by_id(request_body, 'storeId') ``` #### NodeJS (TypeScript) ```ts // Adyen Node API Library v16.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 updatableAddress: Types.management.UpdatableAddress = { postalCode: "20251", line3: "", line2: "Heartland Building", line1: "1776 West Pinewood Avenue" }; const updateStoreRequest: Types.management.UpdateStoreRequest = { address: updatableAddress }; // Make the API call const managementAPI = new ManagementAPI(client); const response = managementAPI.AccountStoreLevelApi.updateStoreById("storeId", updateStoreRequest); ``` 3. Note that the response includes the full store details. **Store address updated** ```json { "id": "ST322LJ223223K5F4SQNR9XL5", "address":{ "country": "US", "line1": "1776 West Pinewood Avenue", "line2": "Heartland Building", "city": "Springfield", "stateOrProvince": "NY", "postalCode":"20251" }, "description": "City Centre store", "merchantId": "YOUR_MERCHANT_ACCOUNT_ID", "phoneNumber": "+13121112222", "reference": "Spring_store_2", "status": "active", "_links": { "self": { "href": "https://management-test.adyen.com/latest/stores/ST322LJ223223K5F4SQNR9XL5" } } }' ``` ## See also * [Order terminals using API requests](/point-of-sale/automating-terminal-management/order-terminals-api) * [Assign terminals using API requests](/point-of-sale/automating-terminal-management/assign-terminals-api) * [Configure terminals using API requests](/point-of-sale/automating-terminal-management/configure-terminals-api)