{"title":"Manage network tokens","category":"default","creationDate":1776961628,"content":"<p>When your cardholder <a href=\"\/pt\/issuing\/digital-wallets\">adds their Adyen-issued card to the digital wallet<\/a>, the card scheme (Visa or Mastercard) creates a network token for it. A network token is a 16-digit Primary Account Number (PAN) alternative that is unique for each card-device-wallet pairing.<\/p>\n<p>The benefits of using network tokens are:<\/p>\n<ul>\n<li>Reduced user friction and declined payments because network tokens are maintained by card schemes.<\/li>\n<li>Higher authorisation rates compared to payments made without network tokens.<\/li>\n<li>Better payment security because each transaction is protected with a one-time use cryptogram.<\/li>\n<\/ul>\n<p>With Adyen Issuing, you can manage network tokens separately from the cards. For example, you might want to temporarily suspend a network token or deactivate a network token, if the card has been lost or stolen.<\/p>\n<h2>Requirements<\/h2>\n<p>Before you begin, make sure that you fulfill the following requirements:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">You must have an integration that supports Issuing.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>API credentials<\/strong><\/td>\n<td style=\"text-align: left;\">You need an API credential for the Configuration API that has the following role:<ul><li markdown=\"1\"><strong>Gives the user permissions to read and patch the NetworkTokens that are linked to the accounts they are able to access<\/strong><\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"get-all-tokens\">Get all network tokens<\/h2>\n<p>To get all network tokens that are linked to the Adyen-issued card:<\/p>\n<ol>\n<li>\n<p>Make a GET  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/get\/paymentInstruments\/(id)\/networkTokens\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/paymentInstruments\/{id}\/networkTokens<\/a> request and specify the following parameter in the path:<\/p>\n<table>\n<thead>\n<tr>\n<th>Path parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>id<\/code><\/td>\n<td>The identifier of the payment instrument created when <a href=\"\/pt\/issuing\/create-cards#create\">issuing a card<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Get all network tokens of a card'\" :id=\"'get-all-network-tokens'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/balanceplatform-api-test.adyen.com\\\/bcl\\\/v2\\\/paymentInstruments\\\/PI3227C223222B5BPCMFXD2XG\\\/networkTokens \\\\\\n-H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X GET \\\\\\n-d ''&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v25.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.service.balancePlatform.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\\/\\\/ Make the API call\\nPaymentInstrumentsApi service = new PaymentInstrumentsApi(client);\\nListNetworkTokensResponse response = service.listNetworkTokens(\\&quot;id\\&quot;, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v17.4.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Service\\\\BalancePlatform\\\\PaymentInstrumentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\\/\\\/ Make the API call\\n$service = new PaymentInstrumentsApi($client);\\n$response = $service-&gt;listNetworkTokens('id');&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v14.4.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Service.BalancePlatform;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Make the API call\\nvar service = new PaymentInstrumentsService(client);\\nvar response = service.ListNetworkTokens(\\&quot;id\\&quot;);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v16.2.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, BalancePlatformAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Make the API call\\nconst balancePlatformAPI = new BalancePlatformAPI(client);\\nconst response = balancePlatformAPI.PaymentInstrumentsApi.listNetworkTokens(\\&quot;id\\&quot;);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v9.3.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/balancePlatform\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Make the API call\\nservice := client.BalancePlatform()\\nreq := service.PaymentInstrumentsApi.ListNetworkTokensInput(\\&quot;id\\&quot;)\\nres, httpRes, err := service.PaymentInstrumentsApi.ListNetworkTokens(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.2.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Make the API call\\nresult = adyen.balancePlatform.payment_instruments_api.list_network_tokens(id=\\&quot;id\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.3.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Make the API call\\nresult = adyen.balancePlatform.payment_instruments_api.list_network_tokens('id')&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v16.2.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, BalancePlatformAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Make the API call\\nconst balancePlatformAPI = new BalancePlatformAPI(client);\\nconst response = balancePlatformAPI.PaymentInstrumentsApi.listNetworkTokens(\\&quot;id\\&quot;);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Verify that you receive an <span translate=\"no\"><strong>HTTP 200 \u2014 OK<\/strong><\/span> response that returns all network tokens associated with the payment instrument, regardless of the network token status. For each network token, note the parameters in the following table:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<th>Possible values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>type<\/code><\/td>\n<td>The type of wallet the network token is associated with.<\/td>\n<td><span translate=\"no\"><strong>applePay<\/strong><\/span>, <span translate=\"no\"><strong>googlePay<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>id<\/code><\/td>\n<td>The unique identifier of the network token.<\/td>\n<td><span translate=\"no\"><strong>NWTK00000000000000000000000001<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>paymentInstrumentId<\/code><\/td>\n<td>The unique identifier of the payment instrument.<\/td>\n<td><span translate=\"no\"><strong>PI3227C223222B5BPCMFXD2XG<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>creationDate<\/code><\/td>\n<td>Date and time when the network token was created.<\/td>\n<td><span translate=\"no\"><strong>2021-01-01T01:00:00+01:00<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>status<\/code><\/td>\n<td>The status of the network token.<\/td>\n<td><span translate=\"no\"><strong>active<\/strong><\/span>, <span translate=\"no\"><strong>inactive<\/strong><\/span>, <span translate=\"no\"><strong>suspended<\/strong><\/span>, <span translate=\"no\"><strong>closed<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td><code>brandVariant<\/code><\/td>\n<td>The card brand variant of the payment instrument associated with the network token.<\/td>\n<td><span translate=\"no\"><strong>mcmaestro<\/strong><\/span>, <span translate=\"no\"><strong>mc_prepaid_mrw<\/strong><\/span>, etc.<\/td>\n<\/tr>\n<tr>\n<td><code>tokenLastFour<\/code><\/td>\n<td>The last four digits of the network token <code>id<\/code>.<\/td>\n<td><strong>0001<\/strong><\/td>\n<\/tr>\n<tr>\n<td><code>device.osName<\/code><\/td>\n<td>The operating system of the device the network token is stored on.<\/td>\n<td><span translate=\"no\"><strong>android<\/strong><\/span>, <span translate=\"no\"><strong>ios<\/strong><\/span>, <span translate=\"no\"><strong>other<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td><code>device.formFactor<\/code><\/td>\n<td>The form factor of the device the network token is stored on.<\/td>\n<td><span translate=\"no\"><strong>phone<\/strong><\/span>, <span translate=\"no\"><strong>watch<\/strong><\/span>, <span translate=\"no\"><strong>tablet<\/strong><\/span>, <span translate=\"no\"><strong>other<\/strong><\/span>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"data\\\": [\\n        {\\n            \\\"type\\\": \\\"applePay\\\",\\n            \\\"id\\\": \\\"NWTK00000000000000000000000001\\\",\\n            \\\"paymentInstrumentId\\\": \\\"PI3227C223222B5BPCMFXD2XG\\\",\\n            \\\"creationDate\\\": \\\"2020-01-01T01:00:00+01:00\\\",\\n            \\\"status\\\": \\\"active\\\",\\n            \\\"brandVariant\\\": \\\"mcmaestro\\\",\\n            \\\"tokenLastFour\\\": \\\"0001\\\",\\n            \\\"device\\\": {\\n                \\\"osName\\\": \\\"ios\\\",\\n                \\\"formFactor\\\": \\\"phone\\\"\\n            }\\n        },\\n        {\\n            \\\"type\\\": \\\"googlePay\\\",\\n            \\\"id\\\": \\\"NWTK00000000000000000000000002\\\",\\n            \\\"paymentInstrumentId\\\": \\\"PI3227C223222B5BPCMFXD2XG\\\",\\n            \\\"creationDate\\\": \\\"2021-01-01T01:00:00+01:00\\\",\\n            \\\"status\\\": \\\"suspended\\\",\\n            \\\"brandVariant\\\": \\\"mc_prepaid_mrw\\\",\\n            \\\"tokenLastFour\\\": \\\"0002\\\",\\n            \\\"device\\\": {\\n                \\\"osName\\\": \\\"android\\\",\\n                \\\"formFactor\\\": \\\"watch\\\"\\n            }\\n        }\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"get-one-token\">Get a single network token<\/h2>\n<p>To get the details of a single network token that is linked to the Adyen-issued card:<\/p>\n<ol>\n<li>\n<p>Make a GET  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/get\/networkTokens\/(networkTokenId)\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/networkTokens\/{networkTokenId}<\/a> request and specify the following parameter in the path:<\/p>\n<table>\n<thead>\n<tr>\n<th>Path parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>networkTokenId<\/code><\/td>\n<td>The identifier of the network token associated with the card.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Get a single network token of a card'\" :id=\"'get-a-network-token'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/balanceplatform-api-test.adyen.com\\\/bcl\\\/v2\\\/paymentInstruments\\\/PI3227C223222B5BPCMFXD2XG\\\/networkTokens\\\/NWTK00000000000000000000000001 \\\\\\n-H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X GET \\\\\\n-d ''&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Verify that you receive an <span translate=\"no\"><strong>HTTP 200 \u2014 OK<\/strong><\/span> response that contains the details for the network token associated with the payment instrument. Note the parameters in the following table:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<th>Possible values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>type<\/code><\/td>\n<td>The type of wallet the network token is associated with.<\/td>\n<td><span translate=\"no\"><strong>wallet<\/strong><\/span>, <span translate=\"no\"><strong>cof<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>id<\/code><\/td>\n<td>The unique identifier of the network token.<\/td>\n<td>An alphanumeric string.<\/td>\n<\/tr>\n<tr>\n<td><code>paymentInstrumentId<\/code><\/td>\n<td>The unique identifier of the payment instrument.<\/td>\n<td>An alphanumeric string.<\/td>\n<\/tr>\n<tr>\n<td><code>creationDate<\/code><\/td>\n<td>The date and time when the network token was created.<\/td>\n<td>Date in <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_8601\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO-8601<\/a> format.<\/td>\n<\/tr>\n<tr>\n<td><code>status<\/code><\/td>\n<td>The status of the network token.<\/td>\n<td><span translate=\"no\"><strong>active<\/strong><\/span>, <span translate=\"no\"><strong>inactive<\/strong><\/span>, <span translate=\"no\"><strong>suspended<\/strong><\/span>, <span translate=\"no\"><strong>closed<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>brandVariant<\/code><\/td>\n<td>The card brand variant of the payment instrument associated with the network token.<\/td>\n<td><span translate=\"no\"><strong>mcmaestro<\/strong><\/span>, <span translate=\"no\"><strong>mc_prepaid_mrw<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>tokenLastFour<\/code><\/td>\n<td>The last four digits of the network token <code>id<\/code>.<\/td>\n<td>A string of four numbers.<\/td>\n<\/tr>\n<tr>\n<td><code>tokenRequestor.id<\/code><\/td>\n<td>The unique identifier of the entity that requested the network token.<\/td>\n<td>A string of numbers.<\/td>\n<\/tr>\n<tr>\n<td><code>tokenRequestor.name<\/code><\/td>\n<td>The name of the entity that requested the network token.<\/td>\n<td><span translate=\"no\"><strong>googlePay<\/strong><\/span>, <span translate=\"no\"><strong>applePay<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>device.osName<\/code><\/td>\n<td>The operating system of the device the network token is stored on.<\/td>\n<td><span translate=\"no\"><strong>android<\/strong><\/span>, <span translate=\"no\"><strong>ios<\/strong><\/span>, or <span translate=\"no\"><strong>other<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>device.formFactor<\/code><\/td>\n<td>The type of device used to provision the network token.<\/td>\n<td><span translate=\"no\"><strong>phone<\/strong><\/span>, <span translate=\"no\"><strong>watch<\/strong><\/span>, <span translate=\"no\"><strong>tablet<\/strong><\/span>, or <span translate=\"no\"><strong>other<\/strong><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"type\\\": \\\"wallet\\\",\\n    \\\"id\\\": \\\"NWTK00000000000000000000000001\\\",\\n    \\\"paymentInstrumentId\\\": \\\"PI00000000000000000000001\\\",\\n    \\\"creationDate\\\": \\\"2020-01-01T01:00:00+01:00\\\",\\n    \\\"status\\\": \\\"active\\\",\\n    \\\"brandVariant\\\": \\\"mcmaestro\\\",\\n    \\\"tokenLastFour\\\": \\\"0001\\\",\\n    \\\"tokenRequestor\\\": {\\n        \\\"id\\\": \\\"40012345678\\\",\\n        \\\"name\\\": \\\"googlePay\\\"\\n    },\\n    \\\"device\\\": {\\n        \\\"osName\\\": \\\"ios\\\",\\n        \\\"formFactor\\\": \\\"phone\\\"\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"update-token-status\">Update the status of a network token<\/h2>\n<p>You can update the <a href=\"\/pt\/issuing\/network-tokens#lifecycle-of-a-network-token\">status<\/a> of a network token to:<\/p>\n<ul>\n<li>Manually activate a network token after completing <a href=\"\/pt\/issuing\/tokens-digital-wallet?tab=phone_call_authentication_required_2_3\">phone call authentication<\/a>: You change the status from <span translate=\"no\"><strong>inactive<\/strong><\/span> to <span translate=\"no\"><strong>active<\/strong><\/span>. <\/li>\n<li>Temporarily suspend a network token: You change the status from <span translate=\"no\"><strong>active<\/strong><\/span> to <span translate=\"no\"><strong>suspended<\/strong><\/span>.<\/li>\n<li>Reactivate a suspended token: You change the status from <span translate=\"no\"><strong>suspended<\/strong><\/span> to <span translate=\"no\"><strong>active<\/strong><\/span>.<\/li>\n<li>Permanently close a network token: You change the status from <span translate=\"no\"><strong>active<\/strong><\/span> or <span translate=\"no\"><strong>suspended<\/strong><\/span> to <span translate=\"no\"><strong>closed<\/strong><\/span>.<\/li>\n<\/ul>\n<p>To update the status of a network token:<\/p>\n<ol>\n<li>\n<p>Make a PATCH  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/patch\/networkTokens\/(networkTokenId)\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/networkTokens\/{networkTokenId}<\/a> request and specify the following parameter in the path:<\/p>\n<table>\n<thead>\n<tr>\n<th>Path parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>networkTokenId<\/code><\/td>\n<td>The identifier of the network token associated with the card.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Provide the following parameters in the request body:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>status<\/code><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The status of the network token. Possible values: <span translate=\"no\"><strong>active<\/strong><\/span>, <span translate=\"no\"><strong>suspended<\/strong><\/span>, <span translate=\"no\"><strong>closed<\/strong><\/span>. The <span translate=\"no\"><strong>closed<\/strong><\/span> status is final and cannot be changed.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Here's an example of how to change the <code>status<\/code> of the network token to <span translate=\"no\"><strong>suspended<\/strong><\/span>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Update the status of a network token'\" :id=\"'suspend-network-token'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/balanceplatform-api-test.adyen.com\\\/bcl\\\/v2\\\/paymentInstruments\\\/PI3227C223222B5BPCMFXD2XG\\\/networkTokens\\\/NWTK00000000000000000000000001 \\\\\\n-H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X PATCH \\\\\\n-d '{\\n    \\&quot;status\\&quot;: \\&quot;suspended\\&quot;\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Verify that you receive an <span translate=\"no\"><strong>HTTP 202 \u2014 Accepted<\/strong><\/span> response with no content. This response means that the request has been accepted, but will be processed asynchronously.<\/p>\n<\/li>\n<li>\n<p>Listen to webhooks to receive the final result of this request.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"limit-token-usage\">Limit the usage of a network token<\/h2>\n<p>In some cases, you might need to limit the number of network tokens per card or set limits for transactions that use network tokens. You can do so by using the <code>\/transactionRules<\/code> endpoint.<\/p>\n<h3>Limit the number of active network tokens<\/h3>\n<p>To limit the number of active network tokens allowed for a single card:<\/p>\n<ol>\n<li>\n<p>Send a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/transactionRules<\/a> request and specify the following parameters:<\/p>\n<div class=\"sticky-table-container\">\n    \n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-description\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">description<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Your description for the rule. Maximum length: 300 characters. This description is shown in the <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-entityKey\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">entityKey<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Contains the ID and type of resource to which the rule is applied.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-interval\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">interval<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The time period or duration when the rule applies.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-reference\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">reference<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Your reference for the rule. Maximum length: 150 characters.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-type\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">type<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Set to <span translate=\"no\"><strong>blockList<\/strong><\/span>, <span translate=\"no\"><strong>maxUsage<\/strong><\/span>, or <span translate=\"no\"><strong>velocity<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-ruleRestrictions\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">ruleRestrictions<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Object that contains key-value objects with the key as the condition and the value containing values and operations.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-status\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">status<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>Set to <span translate=\"no\"><strong>active<\/strong><\/span> if you want to start evaluating the rule. When you set the status to active, we automatically set the <code>startDate<\/code> to the current time.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<\/div>\n\n<p>The following example shows how to limit the number of active network tokens to only <strong>one per card<\/strong>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Limit the number of active network tokens for a card'\" :id=\"'limit-active-tokens'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/balanceplatform-api-test.adyen.com\\\/bcl\\\/v2\\\/transactionRules \\\\\\n-H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST \\\\\\n-d '{\\n    \\&quot;interval\\&quot;: {\\n      \\&quot;type\\&quot;: \\&quot;perTransaction\\&quot;\\n    },\\n    \\&quot;type\\&quot;: \\&quot;blockList\\&quot;,\\n    \\&quot;description\\&quot;: \\&quot;Set the maximum number of active network tokens to one for this card\\&quot;,\\n    \\&quot;reference\\&quot;: \\&quot;myRule123\\&quot;,\\n    \\&quot;entityKey\\&quot;: {\\n      \\&quot;entityType\\&quot;: \\&quot;paymentInstrument\\&quot;,\\n      \\&quot;entityReference\\&quot;: \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n    },\\n    \\&quot;ruleRestrictions\\&quot;: {\\n      \\&quot;activeNetworkTokens\\&quot;: {\\n        \\&quot;operation\\&quot;: \\&quot;greaterThanOrEqualTo\\&quot;,\\n        \\&quot;value\\&quot;: 1\\n      }\\n    },\\n    \\&quot;status\\&quot;: \\&quot;active\\&quot;,\\n    \\&quot;requestType\\&quot;: \\&quot;authorization\\&quot;,\\n    \\&quot;outcomeType\\&quot;: \\&quot;hardBlock\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v25.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.balancePlatform.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.service.balancePlatform.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nActiveNetworkTokensRestriction activeNetworkTokensRestriction = new ActiveNetworkTokensRestriction()\\n  .operation(\\&quot;greaterThanOrEqualTo\\&quot;)\\n  .value(1);\\n\\nTransactionRuleEntityKey transactionRuleEntityKey = new TransactionRuleEntityKey()\\n  .entityType(\\&quot;paymentInstrument\\&quot;)\\n  .entityReference(\\&quot;PI3227C223222B5FN65FN5NS9\\&quot;);\\n\\nTransactionRuleInterval transactionRuleInterval = new TransactionRuleInterval()\\n  .type(TransactionRuleInterval.TypeEnum.PERTRANSACTION);\\n\\nTransactionRuleRestrictions transactionRuleRestrictions = new TransactionRuleRestrictions()\\n  .activeNetworkTokens(activeNetworkTokensRestriction);\\n\\nTransactionRuleInfo transactionRuleInfo = new TransactionRuleInfo()\\n  .reference(\\&quot;myRule123\\&quot;)\\n  .outcomeType(TransactionRuleInfo.OutcomeTypeEnum.HARDBLOCK)\\n  .requestType(TransactionRuleInfo.RequestTypeEnum.AUTHORIZATION)\\n  .entityKey(transactionRuleEntityKey)\\n  .description(\\&quot;Set the maximum number of active network tokens to one for this card\\&quot;)\\n  .interval(transactionRuleInterval)\\n  .ruleRestrictions(transactionRuleRestrictions)\\n  .type(TransactionRuleInfo.TypeEnum.BLOCKLIST)\\n  .status(TransactionRuleInfo.StatusEnum.ACTIVE);\\n\\n\\\/\\\/ Make the API call\\nTransactionRulesApi service = new TransactionRulesApi(client);\\nTransactionRule response = service.createTransactionRule(transactionRuleInfo, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v17.4.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\TransactionRuleEntityKey;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\TransactionRuleInterval;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\TransactionRuleRestrictions;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\ActiveNetworkTokensRestriction;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\TransactionRuleInfo;\\nuse Adyen\\\\Service\\\\BalancePlatform\\\\TransactionRulesApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$activeNetworkTokensRestriction = new ActiveNetworkTokensRestriction();\\n$activeNetworkTokensRestriction\\n  -&gt;setOperation(\\&quot;greaterThanOrEqualTo\\&quot;)\\n  -&gt;setValue(1);\\n\\n$transactionRuleEntityKey = new TransactionRuleEntityKey();\\n$transactionRuleEntityKey\\n  -&gt;setEntityType(\\&quot;paymentInstrument\\&quot;)\\n  -&gt;setEntityReference(\\&quot;PI3227C223222B5FN65FN5NS9\\&quot;);\\n\\n$transactionRuleInterval = new TransactionRuleInterval();\\n$transactionRuleInterval\\n  -&gt;setType(\\&quot;perTransaction\\&quot;);\\n\\n$transactionRuleRestrictions = new TransactionRuleRestrictions();\\n$transactionRuleRestrictions\\n  -&gt;setActiveNetworkTokens($activeNetworkTokensRestriction);\\n\\n$transactionRuleInfo = new TransactionRuleInfo();\\n$transactionRuleInfo\\n  -&gt;setReference(\\&quot;myRule123\\&quot;)\\n  -&gt;setOutcomeType(\\&quot;hardBlock\\&quot;)\\n  -&gt;setRequestType(\\&quot;authorization\\&quot;)\\n  -&gt;setEntityKey($transactionRuleEntityKey)\\n  -&gt;setDescription(\\&quot;Set the maximum number of active network tokens to one for this card\\&quot;)\\n  -&gt;setInterval($transactionRuleInterval)\\n  -&gt;setRuleRestrictions($transactionRuleRestrictions)\\n  -&gt;setType(\\&quot;blockList\\&quot;)\\n  -&gt;setStatus(\\&quot;active\\&quot;);\\n\\n\\\/\\\/ Make the API call\\n$service = new TransactionRulesApi($client);\\n$response = $service-&gt;createTransactionRule($transactionRuleInfo);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v14.4.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.BalancePlatform;\\nusing Adyen.Service.BalancePlatform;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nActiveNetworkTokensRestriction activeNetworkTokensRestriction = new ActiveNetworkTokensRestriction\\n{\\n  Operation = \\&quot;greaterThanOrEqualTo\\&quot;,\\n  Value = 1\\n};\\n\\nTransactionRuleEntityKey transactionRuleEntityKey = new TransactionRuleEntityKey\\n{\\n  EntityType = \\&quot;paymentInstrument\\&quot;,\\n  EntityReference = \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n};\\n\\nTransactionRuleInterval transactionRuleInterval = new TransactionRuleInterval\\n{\\n  Type = TransactionRuleInterval.TypeEnum.PerTransaction\\n};\\n\\nTransactionRuleRestrictions transactionRuleRestrictions = new TransactionRuleRestrictions\\n{\\n  ActiveNetworkTokens = activeNetworkTokensRestriction\\n};\\n\\nTransactionRuleInfo transactionRuleInfo = new TransactionRuleInfo\\n{\\n  Reference = \\&quot;myRule123\\&quot;,\\n  OutcomeType = TransactionRuleInfo.OutcomeTypeEnum.HardBlock,\\n  RequestType = TransactionRuleInfo.RequestTypeEnum.Authorization,\\n  EntityKey = transactionRuleEntityKey,\\n  Description = \\&quot;Set the maximum number of active network tokens to one for this card\\&quot;,\\n  Interval = transactionRuleInterval,\\n  RuleRestrictions = transactionRuleRestrictions,\\n  Type = TransactionRuleInfo.TypeEnum.BlockList,\\n  Status = TransactionRuleInfo.StatusEnum.Active\\n};\\n\\n\\\/\\\/ Make the API call\\nvar service = new TransactionRulesService(client);\\nvar response = service.CreateTransactionRule(transactionRuleInfo);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v16.2.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, BalancePlatformAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst transactionRuleInfo = {\\n  interval: {\\n    type: \\&quot;perTransaction\\&quot;\\n  },\\n  type: \\&quot;blockList\\&quot;,\\n  description: \\&quot;Set the maximum number of active network tokens to one for this card\\&quot;,\\n  reference: \\&quot;myRule123\\&quot;,\\n  entityKey: {\\n    entityType: \\&quot;paymentInstrument\\&quot;,\\n    entityReference: \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n  },\\n  ruleRestrictions: {\\n    activeNetworkTokens: {\\n      operation: \\&quot;greaterThanOrEqualTo\\&quot;,\\n      value: 1\\n    }\\n  },\\n  status: \\&quot;active\\&quot;,\\n  requestType: \\&quot;authorization\\&quot;,\\n  outcomeType: \\&quot;hardBlock\\&quot;\\n}\\n\\n\\\/\\\/ Make the API call\\nconst balancePlatformAPI = new BalancePlatformAPI(client);\\nconst response = balancePlatformAPI.TransactionRulesApi.createTransactionRule(transactionRuleInfo);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v9.3.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/balancePlatform\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\nactiveNetworkTokensRestriction := balancePlatform.ActiveNetworkTokensRestriction{\\n  Operation: \\&quot;greaterThanOrEqualTo\\&quot;,\\n  Value: common.PtrInt32(1),\\n}\\n\\ntransactionRuleEntityKey := balancePlatform.TransactionRuleEntityKey{\\n  EntityType: common.PtrString(\\&quot;paymentInstrument\\&quot;),\\n  EntityReference: common.PtrString(\\&quot;PI3227C223222B5FN65FN5NS9\\&quot;),\\n}\\n\\ntransactionRuleInterval := balancePlatform.TransactionRuleInterval{\\n  Type: \\&quot;perTransaction\\&quot;,\\n}\\n\\ntransactionRuleRestrictions := balancePlatform.TransactionRuleRestrictions{\\n  ActiveNetworkTokens: &amp;activeNetworkTokensRestriction,\\n}\\n\\ntransactionRuleInfo := balancePlatform.TransactionRuleInfo{\\n  Reference: \\&quot;myRule123\\&quot;,\\n  OutcomeType: common.PtrString(\\&quot;hardBlock\\&quot;),\\n  RequestType: common.PtrString(\\&quot;authorization\\&quot;),\\n  EntityKey: transactionRuleEntityKey,\\n  Description: \\&quot;Set the maximum number of active network tokens to one for this card\\&quot;,\\n  Interval: transactionRuleInterval,\\n  RuleRestrictions: transactionRuleRestrictions,\\n  Type: \\&quot;blockList\\&quot;,\\n  Status: common.PtrString(\\&quot;active\\&quot;),\\n}\\n\\n\\\/\\\/ Make the API call\\nservice := client.BalancePlatform()\\nreq := service.TransactionRulesApi.CreateTransactionRuleInput().TransactionRuleInfo(transactionRuleInfo)\\nres, httpRes, err := service.TransactionRulesApi.CreateTransactionRule(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.2.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;interval\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;perTransaction\\&quot;\\n  },\\n  \\&quot;type\\&quot;: \\&quot;blockList\\&quot;,\\n  \\&quot;description\\&quot;: \\&quot;Set the maximum number of active network tokens to one for this card\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;myRule123\\&quot;,\\n  \\&quot;entityKey\\&quot;: {\\n    \\&quot;entityType\\&quot;: \\&quot;paymentInstrument\\&quot;,\\n    \\&quot;entityReference\\&quot;: \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n  },\\n  \\&quot;ruleRestrictions\\&quot;: {\\n    \\&quot;activeNetworkTokens\\&quot;: {\\n      \\&quot;operation\\&quot;: \\&quot;greaterThanOrEqualTo\\&quot;,\\n      \\&quot;value\\&quot;: 1\\n    }\\n  },\\n  \\&quot;status\\&quot;: \\&quot;active\\&quot;,\\n  \\&quot;requestType\\&quot;: \\&quot;authorization\\&quot;,\\n  \\&quot;outcomeType\\&quot;: \\&quot;hardBlock\\&quot;\\n}\\n\\n# Make the API call\\nresult = adyen.balancePlatform.transaction_rules_api.create_transaction_rule(request=json_request)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.3.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :interval =&gt; {\\n    :type =&gt; 'perTransaction'\\n  },\\n  :type =&gt; 'blockList',\\n  :description =&gt; 'Set the maximum number of active network tokens to one for this card',\\n  :reference =&gt; 'myRule123',\\n  :entityKey =&gt; {\\n    :entityType =&gt; 'paymentInstrument',\\n    :entityReference =&gt; 'PI3227C223222B5FN65FN5NS9'\\n  },\\n  :ruleRestrictions =&gt; {\\n    :activeNetworkTokens =&gt; {\\n      :operation =&gt; 'greaterThanOrEqualTo',\\n      :value =&gt; 1\\n    }\\n  },\\n  :status =&gt; 'active',\\n  :requestType =&gt; 'authorization',\\n  :outcomeType =&gt; 'hardBlock'\\n}\\n\\n# Make the API call\\nresult = adyen.balancePlatform.transaction_rules_api.create_transaction_rule(request_body)&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v16.2.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, BalancePlatformAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst activeNetworkTokensRestriction: Types.balancePlatform.ActiveNetworkTokensRestriction = {\\n  operation: \\&quot;greaterThanOrEqualTo\\&quot;,\\n  value: 1\\n};\\n\\nconst transactionRuleEntityKey: Types.balancePlatform.TransactionRuleEntityKey = {\\n  entityType: \\&quot;paymentInstrument\\&quot;,\\n  entityReference: \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n};\\n\\nconst transactionRuleInterval: Types.balancePlatform.TransactionRuleInterval = {\\n  type: Types.balancePlatform.TransactionRuleInterval.TypeEnum.PerTransaction\\n};\\n\\nconst transactionRuleRestrictions: Types.balancePlatform.TransactionRuleRestrictions = {\\n  activeNetworkTokens: activeNetworkTokensRestriction\\n};\\n\\nconst transactionRuleInfo: Types.balancePlatform.TransactionRuleInfo = {\\n  reference: \\&quot;myRule123\\&quot;,\\n  outcomeType: Types.balancePlatform.TransactionRuleInfo.OutcomeTypeEnum.HardBlock,\\n  requestType: Types.balancePlatform.TransactionRuleInfo.RequestTypeEnum.Authorization,\\n  entityKey: transactionRuleEntityKey,\\n  description: \\&quot;Set the maximum number of active network tokens to one for this card\\&quot;,\\n  interval: transactionRuleInterval,\\n  ruleRestrictions: transactionRuleRestrictions,\\n  type: Types.balancePlatform.TransactionRuleInfo.TypeEnum.BlockList,\\n  status: Types.balancePlatform.TransactionRuleInfo.StatusEnum.Active\\n};\\n\\n\\\/\\\/ Make the API call\\nconst balancePlatformAPI = new BalancePlatformAPI(client);\\nconst response = balancePlatformAPI.TransactionRulesApi.createTransactionRule(transactionRuleInfo);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Verify that you receive an <span translate=\"no\"><strong>HTTP 200 \u2014 OK<\/strong><\/span> response that returns the <code>id<\/code> of the transaction rule that can be used to further <a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/patch\/transactionRules\/_transactionRuleId_\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">update<\/a> or <a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/delete\/transactionRules\/_transactionRuleId_\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">delete<\/a> this rule.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response\u2014Transaction rule successfully created'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"description\\\": \\\"Set the maximum number of active network tokens to one for this card\\\",\\n    \\\"entityKey\\\": {\\n        \\\"entityReference\\\": \\\"PI3227C223222B5FN65FN5NS9\\\",\\n        \\\"entityType\\\": \\\"paymentInstrument\\\"\\n    },\\n    \\\"interval\\\": {\\n        \\\"timeZone\\\": \\\"UTC\\\",\\n        \\\"type\\\": \\\"perTransaction\\\"\\n    },\\n    \\\"outcomeType\\\": \\\"hardBlock\\\",\\n    \\\"reference\\\": \\\"myRule123\\\",\\n    \\\"requestType\\\": \\\"authorization\\\",\\n    \\\"ruleRestrictions\\\": {\\n        \\\"activeNetworkTokens\\\": {\\n            \\\"operation\\\": \\\"greaterThanOrEqualTo\\\",\\n            \\\"value\\\": 1\\n        }\\n    },\\n    \\\"startDate\\\": \\\"2022-10-05T10:44:15.608698+02:00\\\",\\n    \\\"status\\\": \\\"active\\\",\\n    \\\"type\\\": \\\"blockList\\\",\\n    \\\"id\\\": \\\"TR32272223222C5GP4S4K5NZG\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h3>Limit transactions using network tokens<\/h3>\n<p>To limit the transactions using network tokens for a card:<\/p>\n<ol>\n<li>\n<p>Make a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/transactionRules<\/a> request and specify the following parameters:<\/p>\n<div class=\"sticky-table-container\">\n    \n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-description\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">description<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Your description for the rule. Maximum length: 300 characters. This description is shown in the <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-entityKey\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">entityKey<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Contains the ID and type of resource to which the rule is applied.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-interval\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">interval<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The time period or duration when the rule applies.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-reference\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">reference<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Your reference for the rule. Maximum length: 150 characters.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-type\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">type<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Set to <span translate=\"no\"><strong>blockList<\/strong><\/span>, <span translate=\"no\"><strong>maxUsage<\/strong><\/span>, or <span translate=\"no\"><strong>velocity<\/strong><\/span>.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-ruleRestrictions\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">ruleRestrictions<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Object that contains key-value objects with the key as the condition and the value containing values and operations.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/post\/transactionRules#request-status\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">status<\/a><\/td>\n<td style=\"text-align: center;\"><\/td>\n<td>Set to <span translate=\"no\"><strong>active<\/strong><\/span> if you want to start evaluating the rule. When you set the status to active, we automatically set the <code>startDate<\/code> to the current time.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<\/div>\n\n<p>The following example shows how to block transactions that are <strong>greater than EUR&nbsp;50<\/strong> and use network tokens.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Block the transactions using network tokens'\" :id=\"'block-transactions'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/balanceplatform-api-test.adyen.com\\\/bcl\\\/v2\\\/transactionRules \\\\\\n-H 'x-api-key: ADYEN_BALANCE_PLATFORM_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST \\\\\\n-d '{\\n    \\&quot;description\\&quot;: \\&quot;Block network token transactions above EUR 50\\&quot;,\\n    \\&quot;reference\\&quot;: \\&quot;myRule123\\&quot;,\\n    \\&quot;entityKey\\&quot;: {\\n      \\&quot;entityType\\&quot;: \\&quot;paymentInstrument\\&quot;,\\n      \\&quot;entityReference\\&quot;: \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n    },\\n    \\&quot;interval\\&quot;: {\\n      \\&quot;type\\&quot;: \\&quot;perTransaction\\&quot;\\n    },\\n    \\&quot;ruleRestrictions\\&quot;: {\\n      \\&quot;processingTypes\\&quot;: {\\n        \\&quot;operation\\&quot;: \\&quot;anyMatch\\&quot;,\\n        \\&quot;value\\&quot;: [\\n          \\&quot;token\\&quot;\\n        ]\\n      },\\n      \\&quot;totalAmount\\&quot;: {\\n        \\&quot;operation\\&quot;: \\&quot;greaterThan\\&quot;,\\n        \\&quot;value\\&quot;: {\\n          \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;,\\n          \\&quot;value\\&quot;: 5000\\n        }\\n      }\\n    },\\n    \\&quot;status\\&quot;: \\&quot;active\\&quot;,\\n    \\&quot;outcomeType\\&quot;: \\&quot;hardBlock\\&quot;,\\n    \\&quot;type\\&quot;: \\&quot;velocity\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v25.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.balancePlatform.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.service.balancePlatform.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount()\\n  .currency(\\&quot;EUR\\&quot;)\\n  .value(5000L);\\n\\nTotalAmountRestriction totalAmountRestriction = new TotalAmountRestriction()\\n  .operation(\\&quot;greaterThan\\&quot;)\\n  .value(amount);\\n\\nProcessingTypesRestriction processingTypesRestriction = new ProcessingTypesRestriction()\\n  .operation(\\&quot;anyMatch\\&quot;)\\n  .value(Arrays.asList(ProcessingTypesRestriction.ValueEnum.TOKEN));\\n\\nTransactionRuleEntityKey transactionRuleEntityKey = new TransactionRuleEntityKey()\\n  .entityType(\\&quot;paymentInstrument\\&quot;)\\n  .entityReference(\\&quot;PI3227C223222B5FN65FN5NS9\\&quot;);\\n\\nTransactionRuleInterval transactionRuleInterval = new TransactionRuleInterval()\\n  .type(TransactionRuleInterval.TypeEnum.PERTRANSACTION);\\n\\nTransactionRuleRestrictions transactionRuleRestrictions = new TransactionRuleRestrictions()\\n  .totalAmount(totalAmountRestriction)\\n  .processingTypes(processingTypesRestriction);\\n\\nTransactionRuleInfo transactionRuleInfo = new TransactionRuleInfo()\\n  .reference(\\&quot;myRule123\\&quot;)\\n  .outcomeType(TransactionRuleInfo.OutcomeTypeEnum.HARDBLOCK)\\n  .entityKey(transactionRuleEntityKey)\\n  .description(\\&quot;Block network token transactions above EUR 50\\&quot;)\\n  .interval(transactionRuleInterval)\\n  .ruleRestrictions(transactionRuleRestrictions)\\n  .type(TransactionRuleInfo.TypeEnum.VELOCITY)\\n  .status(TransactionRuleInfo.StatusEnum.ACTIVE);\\n\\n\\\/\\\/ Make the API call\\nTransactionRulesApi service = new TransactionRulesApi(client);\\nTransactionRule response = service.createTransactionRule(transactionRuleInfo, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v17.4.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\TransactionRuleEntityKey;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\TransactionRuleInterval;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\TransactionRuleRestrictions;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\Amount;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\TotalAmountRestriction;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\ProcessingTypesRestriction;\\nuse Adyen\\\\Model\\\\BalancePlatform\\\\TransactionRuleInfo;\\nuse Adyen\\\\Service\\\\BalancePlatform\\\\TransactionRulesApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;EUR\\&quot;)\\n  -&gt;setValue(5000);\\n\\n$totalAmountRestriction = new TotalAmountRestriction();\\n$totalAmountRestriction\\n  -&gt;setOperation(\\&quot;greaterThan\\&quot;)\\n  -&gt;setValue($amount);\\n\\n$processingTypesRestriction = new ProcessingTypesRestriction();\\n$processingTypesRestriction\\n  -&gt;setOperation(\\&quot;anyMatch\\&quot;)\\n  -&gt;setValue(array(\\&quot;token\\&quot;));\\n\\n$transactionRuleEntityKey = new TransactionRuleEntityKey();\\n$transactionRuleEntityKey\\n  -&gt;setEntityType(\\&quot;paymentInstrument\\&quot;)\\n  -&gt;setEntityReference(\\&quot;PI3227C223222B5FN65FN5NS9\\&quot;);\\n\\n$transactionRuleInterval = new TransactionRuleInterval();\\n$transactionRuleInterval\\n  -&gt;setType(\\&quot;perTransaction\\&quot;);\\n\\n$transactionRuleRestrictions = new TransactionRuleRestrictions();\\n$transactionRuleRestrictions\\n  -&gt;setTotalAmount($totalAmountRestriction)\\n  -&gt;setProcessingTypes($processingTypesRestriction);\\n\\n$transactionRuleInfo = new TransactionRuleInfo();\\n$transactionRuleInfo\\n  -&gt;setReference(\\&quot;myRule123\\&quot;)\\n  -&gt;setOutcomeType(\\&quot;hardBlock\\&quot;)\\n  -&gt;setEntityKey($transactionRuleEntityKey)\\n  -&gt;setDescription(\\&quot;Block network token transactions above EUR 50\\&quot;)\\n  -&gt;setInterval($transactionRuleInterval)\\n  -&gt;setRuleRestrictions($transactionRuleRestrictions)\\n  -&gt;setType(\\&quot;velocity\\&quot;)\\n  -&gt;setStatus(\\&quot;active\\&quot;);\\n\\n\\\/\\\/ Make the API call\\n$service = new TransactionRulesApi($client);\\n$response = $service-&gt;createTransactionRule($transactionRuleInfo);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v14.4.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.BalancePlatform;\\nusing Adyen.Service.BalancePlatform;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;EUR\\&quot;,\\n  Value = 5000\\n};\\n\\nTotalAmountRestriction totalAmountRestriction = new TotalAmountRestriction\\n{\\n  Operation = \\&quot;greaterThan\\&quot;,\\n  Value = amount\\n};\\n\\nProcessingTypesRestriction processingTypesRestriction = new ProcessingTypesRestriction\\n{\\n  Operation = \\&quot;anyMatch\\&quot;,\\n  Value = { ProcessingTypesRestriction.ValueEnum.Token }\\n};\\n\\nTransactionRuleEntityKey transactionRuleEntityKey = new TransactionRuleEntityKey\\n{\\n  EntityType = \\&quot;paymentInstrument\\&quot;,\\n  EntityReference = \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n};\\n\\nTransactionRuleInterval transactionRuleInterval = new TransactionRuleInterval\\n{\\n  Type = TransactionRuleInterval.TypeEnum.PerTransaction\\n};\\n\\nTransactionRuleRestrictions transactionRuleRestrictions = new TransactionRuleRestrictions\\n{\\n  TotalAmount = totalAmountRestriction,\\n  ProcessingTypes = processingTypesRestriction\\n};\\n\\nTransactionRuleInfo transactionRuleInfo = new TransactionRuleInfo\\n{\\n  Reference = \\&quot;myRule123\\&quot;,\\n  OutcomeType = TransactionRuleInfo.OutcomeTypeEnum.HardBlock,\\n  EntityKey = transactionRuleEntityKey,\\n  Description = \\&quot;Block network token transactions above EUR 50\\&quot;,\\n  Interval = transactionRuleInterval,\\n  RuleRestrictions = transactionRuleRestrictions,\\n  Type = TransactionRuleInfo.TypeEnum.Velocity,\\n  Status = TransactionRuleInfo.StatusEnum.Active\\n};\\n\\n\\\/\\\/ Make the API call\\nvar service = new TransactionRulesService(client);\\nvar response = service.CreateTransactionRule(transactionRuleInfo);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v16.2.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, BalancePlatformAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst transactionRuleInfo = {\\n  description: \\&quot;Block network token transactions above EUR 50\\&quot;,\\n  reference: \\&quot;myRule123\\&quot;,\\n  entityKey: {\\n    entityType: \\&quot;paymentInstrument\\&quot;,\\n    entityReference: \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n  },\\n  interval: {\\n    type: \\&quot;perTransaction\\&quot;\\n  },\\n  ruleRestrictions: {\\n    processingTypes: {\\n      operation: \\&quot;anyMatch\\&quot;,\\n      value: [ \\&quot;token\\&quot; ]\\n    },\\n    totalAmount: {\\n      operation: \\&quot;greaterThan\\&quot;,\\n      value: {\\n        currency: \\&quot;EUR\\&quot;,\\n        value: 5000\\n      }\\n    }\\n  },\\n  status: \\&quot;active\\&quot;,\\n  outcomeType: \\&quot;hardBlock\\&quot;,\\n  type: \\&quot;velocity\\&quot;\\n}\\n\\n\\\/\\\/ Make the API call\\nconst balancePlatformAPI = new BalancePlatformAPI(client);\\nconst response = balancePlatformAPI.TransactionRulesApi.createTransactionRule(transactionRuleInfo);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v9.3.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/balancePlatform\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\namount := balancePlatform.Amount{\\n  Currency: \\&quot;EUR\\&quot;,\\n  Value: 5000,\\n}\\n\\ntotalAmountRestriction := balancePlatform.TotalAmountRestriction{\\n  Operation: \\&quot;greaterThan\\&quot;,\\n  Value: &amp;amount,\\n}\\n\\nprocessingTypesRestriction := balancePlatform.ProcessingTypesRestriction{\\n  Operation: \\&quot;anyMatch\\&quot;,\\n  Value: []string{\\n    \\&quot;token\\&quot;,\\n  },\\n}\\n\\ntransactionRuleEntityKey := balancePlatform.TransactionRuleEntityKey{\\n  EntityType: common.PtrString(\\&quot;paymentInstrument\\&quot;),\\n  EntityReference: common.PtrString(\\&quot;PI3227C223222B5FN65FN5NS9\\&quot;),\\n}\\n\\ntransactionRuleInterval := balancePlatform.TransactionRuleInterval{\\n  Type: \\&quot;perTransaction\\&quot;,\\n}\\n\\ntransactionRuleRestrictions := balancePlatform.TransactionRuleRestrictions{\\n  TotalAmount: &amp;totalAmountRestriction,\\n  ProcessingTypes: &amp;processingTypesRestriction,\\n}\\n\\ntransactionRuleInfo := balancePlatform.TransactionRuleInfo{\\n  Reference: \\&quot;myRule123\\&quot;,\\n  OutcomeType: common.PtrString(\\&quot;hardBlock\\&quot;),\\n  EntityKey: transactionRuleEntityKey,\\n  Description: \\&quot;Block network token transactions above EUR 50\\&quot;,\\n  Interval: transactionRuleInterval,\\n  RuleRestrictions: transactionRuleRestrictions,\\n  Type: \\&quot;velocity\\&quot;,\\n  Status: common.PtrString(\\&quot;active\\&quot;),\\n}\\n\\n\\\/\\\/ Make the API call\\nservice := client.BalancePlatform()\\nreq := service.TransactionRulesApi.CreateTransactionRuleInput().TransactionRuleInfo(transactionRuleInfo)\\nres, httpRes, err := service.TransactionRulesApi.CreateTransactionRule(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.2.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;description\\&quot;: \\&quot;Block network token transactions above EUR 50\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;myRule123\\&quot;,\\n  \\&quot;entityKey\\&quot;: {\\n    \\&quot;entityType\\&quot;: \\&quot;paymentInstrument\\&quot;,\\n    \\&quot;entityReference\\&quot;: \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n  },\\n  \\&quot;interval\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;perTransaction\\&quot;\\n  },\\n  \\&quot;ruleRestrictions\\&quot;: {\\n    \\&quot;processingTypes\\&quot;: {\\n      \\&quot;operation\\&quot;: \\&quot;anyMatch\\&quot;,\\n      \\&quot;value\\&quot;: [ \\&quot;token\\&quot; ]\\n    },\\n    \\&quot;totalAmount\\&quot;: {\\n      \\&quot;operation\\&quot;: \\&quot;greaterThan\\&quot;,\\n      \\&quot;value\\&quot;: {\\n        \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;,\\n        \\&quot;value\\&quot;: 5000\\n      }\\n    }\\n  },\\n  \\&quot;status\\&quot;: \\&quot;active\\&quot;,\\n  \\&quot;outcomeType\\&quot;: \\&quot;hardBlock\\&quot;,\\n  \\&quot;type\\&quot;: \\&quot;velocity\\&quot;\\n}\\n\\n# Make the API call\\nresult = adyen.balancePlatform.transaction_rules_api.create_transaction_rule(request=json_request)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.3.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :description =&gt; 'Block network token transactions above EUR 50',\\n  :reference =&gt; 'myRule123',\\n  :entityKey =&gt; {\\n    :entityType =&gt; 'paymentInstrument',\\n    :entityReference =&gt; 'PI3227C223222B5FN65FN5NS9'\\n  },\\n  :interval =&gt; {\\n    :type =&gt; 'perTransaction'\\n  },\\n  :ruleRestrictions =&gt; {\\n    :processingTypes =&gt; {\\n      :operation =&gt; 'anyMatch',\\n      :value =&gt; [ 'token' ]\\n    },\\n    :totalAmount =&gt; {\\n      :operation =&gt; 'greaterThan',\\n      :value =&gt; {\\n        :currency =&gt; 'EUR',\\n        :value =&gt; 5000\\n      }\\n    }\\n  },\\n  :status =&gt; 'active',\\n  :outcomeType =&gt; 'hardBlock',\\n  :type =&gt; 'velocity'\\n}\\n\\n# Make the API call\\nresult = adyen.balancePlatform.transaction_rules_api.create_transaction_rule(request_body)&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v16.2.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, BalancePlatformAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.balancePlatform.Amount = {\\n  currency: \\&quot;EUR\\&quot;,\\n  value: 5000\\n};\\n\\nconst totalAmountRestriction: Types.balancePlatform.TotalAmountRestriction = {\\n  operation: \\&quot;greaterThan\\&quot;,\\n  value: amount\\n};\\n\\nconst processingTypesRestriction: Types.balancePlatform.ProcessingTypesRestriction = {\\n  operation: \\&quot;anyMatch\\&quot;,\\n  value: [\\n    Types.balancePlatform.ProcessingTypesRestriction.ValueEnum.Token\\n  ]\\n};\\n\\nconst transactionRuleEntityKey: Types.balancePlatform.TransactionRuleEntityKey = {\\n  entityType: \\&quot;paymentInstrument\\&quot;,\\n  entityReference: \\&quot;PI3227C223222B5FN65FN5NS9\\&quot;\\n};\\n\\nconst transactionRuleInterval: Types.balancePlatform.TransactionRuleInterval = {\\n  type: Types.balancePlatform.TransactionRuleInterval.TypeEnum.PerTransaction\\n};\\n\\nconst transactionRuleRestrictions: Types.balancePlatform.TransactionRuleRestrictions = {\\n  totalAmount: totalAmountRestriction,\\n  processingTypes: processingTypesRestriction\\n};\\n\\nconst transactionRuleInfo: Types.balancePlatform.TransactionRuleInfo = {\\n  reference: \\&quot;myRule123\\&quot;,\\n  outcomeType: Types.balancePlatform.TransactionRuleInfo.OutcomeTypeEnum.HardBlock,\\n  entityKey: transactionRuleEntityKey,\\n  description: \\&quot;Block network token transactions above EUR 50\\&quot;,\\n  interval: transactionRuleInterval,\\n  ruleRestrictions: transactionRuleRestrictions,\\n  type: Types.balancePlatform.TransactionRuleInfo.TypeEnum.Velocity,\\n  status: Types.balancePlatform.TransactionRuleInfo.StatusEnum.Active\\n};\\n\\n\\\/\\\/ Make the API call\\nconst balancePlatformAPI = new BalancePlatformAPI(client);\\nconst response = balancePlatformAPI.TransactionRulesApi.createTransactionRule(transactionRuleInfo);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Verify that you receive an <span translate=\"no\"><strong>HTTP 200 \u2014 OK<\/strong><\/span> response that returns the <code>id<\/code> of the transaction rule that can be used to further <a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/patch\/transactionRules\/_transactionRuleId_\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">update<\/a> or <a href=\"https:\/\/docs.adyen.com\/api-explorer\/balanceplatform\/latest\/delete\/transactionRules\/_transactionRuleId_\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">delete<\/a> this rule.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"description\\\": \\\"Block network token transactions above EUR 50\\\",\\n    \\\"entityKey\\\": {\\n        \\\"entityReference\\\": \\\"PI3227C223222B5FN65FN5NS9\\\",\\n        \\\"entityType\\\": \\\"paymentInstrument\\\"\\n    },\\n    \\\"interval\\\": {\\n        \\\"timeZone\\\": \\\"UTC\\\",\\n        \\\"type\\\": \\\"perTransaction\\\"\\n    },\\n    \\\"outcomeType\\\": \\\"hardBlock\\\",\\n    \\\"reference\\\": \\\"myRule123\\\",\\n    \\\"requestType\\\": \\\"authorization\\\",\\n    \\\"ruleRestrictions\\\": {\\n        \\\"processingTypes\\\": {\\n            \\\"operation\\\": \\\"anyMatch\\\",\\n            \\\"value\\\": [\\n                \\\"token\\\"\\n            ]\\n        },\\n        \\\"totalAmount\\\": {\\n            \\\"operation\\\": \\\"greaterThan\\\",\\n            \\\"value\\\": {\\n                \\\"currency\\\": \\\"EUR\\\",\\n                \\\"value\\\": 5000\\n            }\\n        }\\n    },\\n    \\\"startDate\\\": \\\"2022-10-05T10:34:31.911273+02:00\\\",\\n    \\\"status\\\": \\\"active\\\",\\n    \\\"type\\\": \\\"velocity\\\",\\n    \\\"id\\\": \\\"TR32272223222C5GP4S4K5NZG\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>","url":"https:\/\/docs.adyen.com\/pt\/issuing\/manage-network-tokens","articleFields":{"description":"Learn how to manage network tokens for cards added to digital wallets.","feedback_component":true,"page_id":"74681dc2-9070-4148-91ff-39c17c7a6614","filters_component":false,"parameters":{"directoryPath":"\/issuing"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/issuing\/manage-network-tokens","title":"Manage network tokens","content":"When your cardholder adds their Adyen-issued card to the digital wallet, the card scheme (Visa or Mastercard) creates a network token for it. A network token is a 16-digit Primary Account Number (PAN) alternative that is unique for each card-device-wallet pairing.\nThe benefits of using network tokens are:\n\nReduced user friction and declined payments because network tokens are maintained by card schemes.\nHigher authorisation rates compared to payments made without network tokens.\nBetter payment security because each transaction is protected with a one-time use cryptogram.\n\nWith Adyen Issuing, you can manage network tokens separately from the cards. For example, you might want to temporarily suspend a network token or deactivate a network token, if the card has been lost or stolen.\nRequirements\nBefore you begin, make sure that you fulfill the following requirements:\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nYou must have an integration that supports Issuing.\n\n\nAPI credentials\nYou need an API credential for the Configuration API that has the following role:Gives the user permissions to read and patch the NetworkTokens that are linked to the accounts they are able to access\n\n\n\nGet all network tokens\nTo get all network tokens that are linked to the Adyen-issued card:\n\n\nMake a GET  \/paymentInstruments\/{id}\/networkTokens request and specify the following parameter in the path:\n\n\n\nPath parameter\nDescription\n\n\n\n\nid\nThe identifier of the payment instrument created when issuing a card.\n\n\n\n\n\n\n\n\nVerify that you receive an HTTP 200 \u2014 OK response that returns all network tokens associated with the payment instrument, regardless of the network token status. For each network token, note the parameters in the following table:\n\n\n\nParameter\nDescription\nPossible values\n\n\n\n\ntype\nThe type of wallet the network token is associated with.\napplePay, googlePay\n\n\nid\nThe unique identifier of the network token.\nNWTK00000000000000000000000001\n\n\npaymentInstrumentId\nThe unique identifier of the payment instrument.\nPI3227C223222B5BPCMFXD2XG\n\n\ncreationDate\nDate and time when the network token was created.\n2021-01-01T01:00:00+01:00\n\n\nstatus\nThe status of the network token.\nactive, inactive, suspended, closed.\n\n\nbrandVariant\nThe card brand variant of the payment instrument associated with the network token.\nmcmaestro, mc_prepaid_mrw, etc.\n\n\ntokenLastFour\nThe last four digits of the network token id.\n0001\n\n\ndevice.osName\nThe operating system of the device the network token is stored on.\nandroid, ios, other.\n\n\ndevice.formFactor\nThe form factor of the device the network token is stored on.\nphone, watch, tablet, other.\n\n\n\n\n\n\n\n\nGet a single network token\nTo get the details of a single network token that is linked to the Adyen-issued card:\n\n\nMake a GET  \/networkTokens\/{networkTokenId} request and specify the following parameter in the path:\n\n\n\nPath parameter\nDescription\n\n\n\n\nnetworkTokenId\nThe identifier of the network token associated with the card.\n\n\n\n\n\n\n\n\nVerify that you receive an HTTP 200 \u2014 OK response that contains the details for the network token associated with the payment instrument. Note the parameters in the following table:\n\n\n\nParameter\nDescription\nPossible values\n\n\n\n\ntype\nThe type of wallet the network token is associated with.\nwallet, cof\n\n\nid\nThe unique identifier of the network token.\nAn alphanumeric string.\n\n\npaymentInstrumentId\nThe unique identifier of the payment instrument.\nAn alphanumeric string.\n\n\ncreationDate\nThe date and time when the network token was created.\nDate in ISO-8601 format.\n\n\nstatus\nThe status of the network token.\nactive, inactive, suspended, closed\n\n\nbrandVariant\nThe card brand variant of the payment instrument associated with the network token.\nmcmaestro, mc_prepaid_mrw\n\n\ntokenLastFour\nThe last four digits of the network token id.\nA string of four numbers.\n\n\ntokenRequestor.id\nThe unique identifier of the entity that requested the network token.\nA string of numbers.\n\n\ntokenRequestor.name\nThe name of the entity that requested the network token.\ngooglePay, applePay\n\n\ndevice.osName\nThe operating system of the device the network token is stored on.\nandroid, ios, or other\n\n\ndevice.formFactor\nThe type of device used to provision the network token.\nphone, watch, tablet, or other\n\n\n\n\n\n\n\n\nUpdate the status of a network token\nYou can update the status of a network token to:\n\nManually activate a network token after completing phone call authentication: You change the status from inactive to active. \nTemporarily suspend a network token: You change the status from active to suspended.\nReactivate a suspended token: You change the status from suspended to active.\nPermanently close a network token: You change the status from active or suspended to closed.\n\nTo update the status of a network token:\n\n\nMake a PATCH  \/networkTokens\/{networkTokenId} request and specify the following parameter in the path:\n\n\n\nPath parameter\nDescription\n\n\n\n\nnetworkTokenId\nThe identifier of the network token associated with the card.\n\n\n\nProvide the following parameters in the request body:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nstatus\n\nThe status of the network token. Possible values: active, suspended, closed. The closed status is final and cannot be changed.\n\n\n\nHere's an example of how to change the status of the network token to suspended.\n\n\n\n\n\nVerify that you receive an HTTP 202 \u2014 Accepted response with no content. This response means that the request has been accepted, but will be processed asynchronously.\n\n\nListen to webhooks to receive the final result of this request.\n\n\nLimit the usage of a network token\nIn some cases, you might need to limit the number of network tokens per card or set limits for transactions that use network tokens. You can do so by using the \/transactionRules endpoint.\nLimit the number of active network tokens\nTo limit the number of active network tokens allowed for a single card:\n\n\nSend a POST  \/transactionRules request and specify the following parameters:\n\n    \n\n\n\nParameter\nRequired\nDescription\n\n\n\n\ndescription\n\nYour description for the rule. Maximum length: 300 characters. This description is shown in the Customer Area.\n\n\nentityKey\n\nContains the ID and type of resource to which the rule is applied.\n\n\ninterval\n\nThe time period or duration when the rule applies.\n\n\nreference\n\nYour reference for the rule. Maximum length: 150 characters.\n\n\ntype\n\nSet to blockList, maxUsage, or velocity.\n\n\nruleRestrictions\n\nObject that contains key-value objects with the key as the condition and the value containing values and operations.\n\n\nstatus\n\nSet to active if you want to start evaluating the rule. When you set the status to active, we automatically set the startDate to the current time.\n\n\n\n\n\n\nThe following example shows how to limit the number of active network tokens to only one per card.\n\n\n\n\n\nVerify that you receive an HTTP 200 \u2014 OK response that returns the id of the transaction rule that can be used to further update or delete this rule.\n\n\n\n\n\nLimit transactions using network tokens\nTo limit the transactions using network tokens for a card:\n\n\nMake a POST  \/transactionRules request and specify the following parameters:\n\n    \n\n\n\nParameter\nRequired\nDescription\n\n\n\n\ndescription\n\nYour description for the rule. Maximum length: 300 characters. This description is shown in the Customer Area.\n\n\nentityKey\n\nContains the ID and type of resource to which the rule is applied.\n\n\ninterval\n\nThe time period or duration when the rule applies.\n\n\nreference\n\nYour reference for the rule. Maximum length: 150 characters.\n\n\ntype\n\nSet to blockList, maxUsage, or velocity.\n\n\nruleRestrictions\n\nObject that contains key-value objects with the key as the condition and the value containing values and operations.\n\n\nstatus\n\nSet to active if you want to start evaluating the rule. When you set the status to active, we automatically set the startDate to the current time.\n\n\n\n\n\n\nThe following example shows how to block transactions that are greater than EUR&nbsp;50 and use network tokens.\n\n\n\n\n\nVerify that you receive an HTTP 200 \u2014 OK response that returns the id of the transaction rule that can be used to further update or delete this rule.\n\n\n\n\n","type":"page","locale":"pt","boost":18,"hierarchy":{"lvl0":"Home","lvl1":"Adyen Issuing","lvl2":"Manage network tokens"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/issuing","lvl2":"\/pt\/issuing\/manage-network-tokens"},"levels":3,"category":"Issuing","category_color":"green","tags":["Manage","network","tokens"]},"articleFiles":{"block-transactions.js":"<p alt=\"\">block-transactions.js<\/p>","get-all-network-tokens.js":"<p alt=\"\">get-all-network-tokens.js<\/p>","limit-active-tokens.js":"<p alt=\"\">limit-active-tokens.js<\/p>"}}
