{"title":"Surcharge","category":"default","creationDate":1695290040,"content":"<p>Payment brands, such as card schemes and debit network providers, charge a fee for accepting payments on their payment network, called a payment acceptance fee. Usually, businesses include the costs for payment-related fees in the prices they charge. But in some countries\/regions it is common to pass on these costs as a surcharge when the customer uses a card for payment.<\/p>\n<h2>Requirements<\/h2>\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;\">Make sure that you have an <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=Web&amp;integration=API%20only&amp;version=latest\">API-only online payments<\/a> integration that can accept card payments with either: <ul><li markdown=\"1\"><a href=\"\/pt\/payment-methods\/cards\/raw-card-data\/\">Raw card data<\/a><\/li><li markdown=\"1\"><a href=\"\/pt\/payment-methods\/cards\/custom-card-integration\/\">Encrypted card data<\/a><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/development-resources\/api-credentials\/roles\/\">API credential roles<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">You need an API credential with an API key and the <strong>Checkout webservice role<\/strong>.<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/development-resources\/webhooks\">Webhooks<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Subscribe to Standard webhooks.<\/td>\n<td><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Limitations<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you take into account the following: <ul><li markdown=\"1\">The surcharge feature is in pilot, and restrictions may apply. Reach out to your Adyen contact to be part of the pilot.<\/li><li markdown=\"1\">Surcharges cannot be applied to <a href=\"\/pt\/online-payments\/adjust-authorisation\/\">authorization adjustments<\/a> or <a href=\"\/pt\/get-started-with-adyen\/adyen-glossary#overcapture\">overcaptures<\/a>. The surcharge amount cannot be higher than the surcharge amount that was shown to the customer at the moment of purchase.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\">Before you begin: <ul><li markdown=\"1\">Make sure you comply with the general and regional compliance requirements mentioned in our <a href=\"\/pt\/development-resources\/surcharge-compliance\/\">Surcharge compliance guide<\/a>.<\/li><li markdown=\"1\">We recommend consulting your own legal advisor on compliance with regulatory requirements, and reviewing the scheme rules for the latest information.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Compliance<\/h2>\n<h2>How it works<\/h2>\n<p>When your shopper proceeds to pay:<\/p>\n<ol>\n<li>Collect the shopper's card details on your checkout page.<\/li>\n<li>From your server, make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/cardDetails<\/a> request using the shopper's card details, to get the information that helps to make a decision about the surcharge.<\/li>\n<li>Implement logic to decide if a surcharge is allowed, and to calculate the surcharge amount, using the data from the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/cardDetails<\/a> response.<\/li>\n<li>Display the surcharge amount on your checkout page.<\/li>\n<li>When the shopper proceeds to pay, from your server, make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request that includes the surcharge amount.<\/li>\n<\/ol>\n<h2>Get card details<\/h2>\n<p>Use the customer's raw or encrypted card number to make an API request that retrieves the details of the card that helps to determine whether you can apply surcharge to a payment.<\/p>\n<ol>\n<li>\n<p>In your payment form, collect the card number of the customer with either of the following:<\/p>\n<ul>\n<li><a href=\"\/pt\/payment-methods\/cards\/raw-card-data\/#build-your-payment-form-for-cards\">Custom payment form to collect raw card data<\/a><\/li>\n<li><a href=\"\/pt\/payment-methods\/cards\/custom-card-integration\/\">Custom Card Component integration to collect encrypted card data<\/a><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>From your server, make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/cardDetails<\/a> request, including:<\/p>\n<div class=\"sticky-table-container\">\n    \n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails#request-cardNumber\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">cardNumber<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Conditionally required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Conditionally required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/conditionally-required\/conditionally-required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">If you accept card payments using <a href=\"\/pt\/payment-methods\/cards\/raw-card-data\/\">raw card data<\/a>, pass this field. <br> Minimum length: first eight digits of the card number. We recommend to pass the full card number for the best result.  <div class=\"sc-notice note\"><div> You must be <a href=\"\/pt\/development-resources\/pci-dss-compliance-guide\/\">fully PCI compliant<\/a> to collect raw card data. <\/div><\/div><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails#request-encryptedCardNumber\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">encryptedCardNumber<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Conditionally required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Conditionally required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/conditionally-required\/conditionally-required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">If you accept card payments using our <a href=\"\/pt\/payment-methods\/cards\/custom-card-integration\/\">Custom Card Component with encrypted card data<\/a>, pass this field. <br> The encrypted card number you get in the <code>state.data<\/code> when the <a href=\"\/pt\/payment-methods\/cards\/custom-card-integration\/#show-the-available-cards-in-your-payment-form\">Component<\/a> calls the <code>onSubmit<\/code> event.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails#request-merchantAccount\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">merchantAccount<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The name of your merchant account.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<\/div>\n\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Make a request to get information about the card'\" :id=\"'get-card-details'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v71\\\/cardDetails \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n   \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;encryptedCardNumber\\&quot;: \\&quot;adyenjs_0_1_18$MT6ppy0FAMVMLH...\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v40.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nCardDetailsRequest cardDetailsRequest = new CardDetailsRequest()\\n  .encryptedCardNumber(\\&quot;adyenjs_0_1_18$MT6ppy0FAMVMLH...\\&quot;)\\n  .merchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nCardDetailsResponse response = service.cardDetails(cardDetailsRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v28.3.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\CardDetailsRequest;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$cardDetailsRequest = new CardDetailsRequest();\\n$cardDetailsRequest\\n  -&gt;setEncryptedCardNumber(\\&quot;adyenjs_0_1_18\\\\$MT6ppy0FAMVMLH...\\&quot;)\\n  -&gt;setMerchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;cardDetails($cardDetailsRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .NET API Library v32.2.1\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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)\\nCardDetailsRequest cardDetailsRequest = new CardDetailsRequest\\n{\\n  EncryptedCardNumber = \\&quot;adyenjs_0_1_18$MT6ppy0FAMVMLH...\\&quot;,\\n  MerchantAccount = \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.CardDetails(cardDetailsRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v30.0.0\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst cardDetailsRequest = {\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  encryptedCardNumber: \\&quot;adyenjs_0_1_18$MT6ppy0FAMVMLH...\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.cardDetails(cardDetailsRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v21.1.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\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)\\ncardDetailsRequest := checkout.CardDetailsRequest{\\n  EncryptedCardNumber: common.PtrString(\\&quot;adyenjs_0_1_18$MT6ppy0FAMVMLH...\\&quot;),\\n  MerchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.CardDetailsInput().IdempotencyKey(\\&quot;UUID\\&quot;).CardDetailsRequest(cardDetailsRequest)\\nres, httpRes, err := service.PaymentsApi.CardDetails(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v14.0.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;encryptedCardNumber\\&quot;: \\&quot;adyenjs_0_1_18$MT6ppy0FAMVMLH...\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.card_details(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v11.0.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'YOUR_MERCHANT_ACCOUNT',\\n  :encryptedCardNumber =&gt; 'adyenjs_0_1_18$MT6ppy0FAMVMLH...'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.card_details(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v30.0.0\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst cardDetailsRequest: Types.checkout.CardDetailsRequest = {\\n  encryptedCardNumber: \\&quot;adyenjs_0_1_18$MT6ppy0FAMVMLH...\\&quot;,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.cardDetails(cardDetailsRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>In the response, note the following data to:<\/p>\n<ul>\n<li>Determine whether a surcharge is applicable for a payment.<\/li>\n<li>Calculate the surcharge amount that you can apply.<\/li>\n<\/ul>\n<div class=\"sticky-table-container\">\n    \n<table>\n<thead>\n<tr>\n<th>Response parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails#responses-200-brands-type\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">brands.type<\/a><\/td>\n<td>The name of the card brand.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails#responses-200-fundingSource\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">fundingSource<\/a><\/td>\n<td>The funding source of the card, for example, <strong>DEBIT<\/strong>, <strong>CREDIT<\/strong>, or <strong>PREPAID<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails#responses-200-isCardCommercial\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">isCardCommercial<\/a><\/td>\n<td>Indicates if this is a commercial card or a consumer card. When <strong>true<\/strong>, it is a commercial card. When <strong>false<\/strong>, it is a consumer card.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/cardDetails#responses-200-issuingCountryCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">issuingCountryCode<\/a><\/td>\n<td>The two-letter country code of the country where the card was issued.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n<\/div>\n\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example \/cardDetails response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n \\\"brands\\\": [\\n       {\\n          \\\"type\\\": \\\"visa\\\",\\n          \\\"supported\\\": true\\n       },\\n       {\\n         \\\"type\\\": \\\"cartebancaire\\\",\\n         \\\"supported\\\": true\\n       }\\n ],\\n \\\"fundingSource\\\": \\\"CREDIT\\\",\\n \\\"isCardCommercial\\\": false,\\n \\\"issuingCountryCode\\\": \\\"US\\\"\\n }\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Use the data from the response to build your logic that determines whether you can apply surcharge on a payment with this card, and calculate the surcharge amount. Refer to our <a href=\"\/pt\/development-resources\/surcharge-compliance\/\">Surcharge compliance guide<\/a> when determining to which transactions you can apply a surcharge.<\/p>\n<\/li>\n<\/ol>\n<h2>Make a payment including the surcharge<\/h2>\n<p>After you calculate the surcharge amount, disclose the surcharge amount to your shopper and include the surcharge in your payment request.<\/p>\n<ol>\n<li>Make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request with your <a href=\"\/pt\/payment-methods\/cards\/raw-card-data\/#make-a-payment\">API only with raw card data integration<\/a>, or with your <a href=\"\/pt\/payment-methods\/cards\/custom-card-integration\/\">API only with encrypted card data integration<\/a>.<\/li>\n<li>In your request include a <code>surcharge<\/code> object, that specifies the <code>value<\/code> of the surcharge you apply to the transaction.<\/li>\n<li>\n<p>Calculate the value you need to pass in the <code>amount.value<\/code> object in your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request by adding the surcharge amount to the original transaction amount.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Make a payment with encrypted card details including a surcharge'\" :id=\"'surcharge-payment'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;amount\\&quot;:{\\n    \\&quot;currency\\&quot;:\\&quot;USD\\&quot;,\\n    \\&quot;value\\&quot;:1100\\n  },\\n  \\&quot;surcharge\\&quot;:{\\n    \\&quot;value\\&quot;:100\\n  },\\n  \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/...\\&quot;,\\n  \\&quot;merchantAccount\\&quot;:\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;paymentMethod:{\\n    \\&quot;type\\&quot;:\\&quot;scheme\\&quot;,\\n    \\&quot;encryptedCardNumber\\&quot;: \\&quot;test_4111111111111111\\&quot;,\\n    \\&quot;encryptedExpiryMonth\\&quot;: \\&quot;test_03\\&quot;,\\n    \\&quot;encryptedExpiryYear\\&quot;: \\&quot;test_2030\\&quot;,\\n    \\&quot;encryptedSecurityCode\\&quot;: \\&quot;test_737\\&quot;,\\n    \\&quot;holderName\\&quot;: \\&quot;S. Hopper\\&quot;\\n  },\\n  \\&quot;riskData\\&quot;:{\\n    \\&quot;clientData\\&quot;: \\&quot;eyJ0cmFuc1N0YXR1cy...I6IlkifQ==\\&quot;\\n  }\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> response contains:<\/p>\n<ul>\n<li><code>pspReference<\/code>: Our unique identifier for the transaction.<\/li>\n<li><code>resultCode<\/code>: Use this to present the payment result to your shopper.<\/li>\n<li><code>merchantReference<\/code>: The reference from the <code>\/payments<\/code> request.<\/li>\n<li><code>additionalData<\/code>: Additional information about the transaction. You can optionally enable <a href=\"#receive-surcharge-in-additional-data\">receiving the surcharge amount<\/a> in additional data.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<div class=\"notices green\">\n<p>For transactions where you apply a surcharge, when you make a <a href=\"\/pt\/online-payments\/capture\/\">capture<\/a>, or <a href=\"\/pt\/online-payments\/refund\/\">refund<\/a> request, pass the full amount that includes the surcharge amount.<\/p>\n<\/div>\n<h3 id=\"receive-surcharge-in-additional-data\">Receive the surcharge in additional data<\/h3>\n<p>To receive the amount of surcharge you apply to a transaction in the <code>additionalData<\/code> object of the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> response, or in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/AUTHORISATION\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AUTHORISATION<\/a> webhook:<\/p>\n<ol>\n<li>In your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, go to <strong>Developers<\/strong> &gt; <strong>Additional data<\/strong>.<\/li>\n<li>Select <strong>Surcharge amount<\/strong>.<\/li>\n<li>Select <strong>Save configuration<\/strong>.<\/li>\n<\/ol>\n<h2>Reporting<\/h2>\n<h2>Test and go live<\/h2>\n<p>Before going live with your integration, use our <a href=\"\/pt\/development-resources\/test-cards-and-credentials\/test-card-numbers\/\">test card numbers<\/a> to test that you make a successful payment that includes a surcharge.<\/p>\n<h2>See also<\/h2>\n<ul>\n<li><a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only&amp;version=71\">API only integration guide<\/a><\/li>\n<li><a href=\"\/pt\/development-resources\/surcharge-compliance\/\">Surcharge compliance guide<\/a><\/li>\n<li><a href=\"\/pt\/point-of-sale\/surcharge\">Surcharge with in-person payments<\/a><\/li>\n<\/ul>","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/surcharge","articleFields":{"description":"Pass on payment acceptance fees to your customers as a surcharge to their payments.","feedback_component":true,"parameters":{"integrationType":"direct","channel":"online"},"filters_component":false,"page_id":"89ec45e5-8d8f-4202-a880-f1407882256c","decision_tree":"[]","last_edit_on":"12-11-2024 17:18"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/surcharge","title":"Surcharge","content":"Payment brands, such as card schemes and debit network providers, charge a fee for accepting payments on their payment network, called a payment acceptance fee. Usually, businesses include the costs for payment-related fees in the prices they charge. But in some countries\/regions it is common to pass on these costs as a surcharge when the customer uses a card for payment.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have an API-only online payments integration that can accept card payments with either: Raw card dataEncrypted card data\n\n\nAPI credential roles\nYou need an API credential with an API key and the Checkout webservice role.\n\n\n\nWebhooks\nSubscribe to Standard webhooks.\n\n\n\nLimitations\nMake sure that you take into account the following: The surcharge feature is in pilot, and restrictions may apply. Reach out to your Adyen contact to be part of the pilot.Surcharges cannot be applied to authorization adjustments or overcaptures. The surcharge amount cannot be higher than the surcharge amount that was shown to the customer at the moment of purchase.\n\n\nSetup steps\nBefore you begin: Make sure you comply with the general and regional compliance requirements mentioned in our Surcharge compliance guide.We recommend consulting your own legal advisor on compliance with regulatory requirements, and reviewing the scheme rules for the latest information.\n\n\n\nCompliance\nHow it works\nWhen your shopper proceeds to pay:\n\nCollect the shopper's card details on your checkout page.\nFrom your server, make a  \/cardDetails request using the shopper's card details, to get the information that helps to make a decision about the surcharge.\nImplement logic to decide if a surcharge is allowed, and to calculate the surcharge amount, using the data from the  \/cardDetails response.\nDisplay the surcharge amount on your checkout page.\nWhen the shopper proceeds to pay, from your server, make a  \/payments request that includes the surcharge amount.\n\nGet card details\nUse the customer's raw or encrypted card number to make an API request that retrieves the details of the card that helps to determine whether you can apply surcharge to a payment.\n\n\nIn your payment form, collect the card number of the customer with either of the following:\n\nCustom payment form to collect raw card data\nCustom Card Component integration to collect encrypted card data\n\n\n\nFrom your server, make a  \/cardDetails request, including:\n\n    \n\n\n\nParameter\nRequired\nDescription\n\n\n\n\n cardNumber\n\nIf you accept card payments using raw card data, pass this field.  Minimum length: first eight digits of the card number. We recommend to pass the full card number for the best result.   You must be fully PCI compliant to collect raw card data. \n\n\n encryptedCardNumber\n\nIf you accept card payments using our Custom Card Component with encrypted card data, pass this field.  The encrypted card number you get in the state.data when the Component calls the onSubmit event.\n\n\n merchantAccount\n\nThe name of your merchant account.\n\n\n\n\n\n\n\n\n\n\n\nIn the response, note the following data to:\n\nDetermine whether a surcharge is applicable for a payment.\nCalculate the surcharge amount that you can apply.\n\n\n    \n\n\n\nResponse parameter\nDescription\n\n\n\n\n brands.type\nThe name of the card brand.\n\n\n fundingSource\nThe funding source of the card, for example, DEBIT, CREDIT, or PREPAID.\n\n\n isCardCommercial\nIndicates if this is a commercial card or a consumer card. When true, it is a commercial card. When false, it is a consumer card.\n\n\n issuingCountryCode\nThe two-letter country code of the country where the card was issued.\n\n\n\n\n\n\n\n\n\n\n\nUse the data from the response to build your logic that determines whether you can apply surcharge on a payment with this card, and calculate the surcharge amount. Refer to our Surcharge compliance guide when determining to which transactions you can apply a surcharge.\n\n\nMake a payment including the surcharge\nAfter you calculate the surcharge amount, disclose the surcharge amount to your shopper and include the surcharge in your payment request.\n\nMake a  \/payments request with your API only with raw card data integration, or with your API only with encrypted card data integration.\nIn your request include a surcharge object, that specifies the value of the surcharge you apply to the transaction.\n\nCalculate the value you need to pass in the amount.value object in your  \/payments request by adding the surcharge amount to the original transaction amount.\n\n\n\nThe  \/payments response contains:\n\npspReference: Our unique identifier for the transaction.\nresultCode: Use this to present the payment result to your shopper.\nmerchantReference: The reference from the \/payments request.\nadditionalData: Additional information about the transaction. You can optionally enable receiving the surcharge amount in additional data.\n\n\n\n\nFor transactions where you apply a surcharge, when you make a capture, or refund request, pass the full amount that includes the surcharge amount.\n\nReceive the surcharge in additional data\nTo receive the amount of surcharge you apply to a transaction in the additionalData object of the  \/payments response, or in the  AUTHORISATION webhook:\n\nIn your Customer Area, go to Developers &gt; Additional data.\nSelect Surcharge amount.\nSelect Save configuration.\n\nReporting\nTest and go live\nBefore going live with your integration, use our test card numbers to test that you make a successful payment that includes a surcharge.\nSee also\n\nAPI only integration guide\nSurcharge compliance guide\nSurcharge with in-person payments\n","type":"page","locale":"pt","boost":18,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Surcharge"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"\/pt\/online-payments\/surcharge"},"levels":3,"category":"Online Payments","category_color":"green","tags":["Surcharge"]}}
