{"title":"Fix the cost of goods in the processing currency","category":"default","creationDate":1676035020,"content":"<p><span style=\"color: #0ABF53;\"><span style=\"font-size: 20px;\"><strong>Limited availability<\/strong><\/span><\/span><br \/>\nCurrency conversion in currently in pilot phase. Some of the processes and documentation may change as the feature evolves. If you are interested in piloting currency conversion or have any feedback, reach out to your Adyen contact.<\/p>\n<hr \/>\n<p>When you fix the cost of the goods in the processing currency, the customer always pays the same, fixed amount in their currency of choice (the processing currency). The amount your user receives in the settlement currency is not fixed and depends on the prevailing exchange rate and Adyen's conversion markup.<\/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;\">You must have an Adyen <a href=\"\/pt\/online-payments\/build-your-integration\">online payments integration and a checkout UI<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/development-resources\/api-credentials\">API credentials<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">You must have credentials for the following APIs:<ul><li markdown=\"1\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/overview\" class=\" external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Checkout API<\/a> (format: <strong>ws@Company.[YourCompanyAccount]<\/strong>)<\/li><li markdown=\"1\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/overview\" class=\" external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Foreign Exchange API<\/a> (format: <strong>ws@BalancePlatform.[YourBalancePlatform]<\/strong>).<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>API credential roles<\/strong><\/td>\n<td style=\"text-align: left;\">To use the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/overview\" class=\" external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Foreign Exchange API<\/a>, make sure you have the following role:<ul><li markdown=\"1\"><strong>Read FX rates role<\/strong><\/li><\/ul><\/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;\">Ensure that your server can receive and accept <a href=\"\/pt\/development-resources\/webhooks\">standard webhooks<\/a>.<br>Subscribe to any of the following webhooks: <ul><li markdown=\"1\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/transfer-webhooks\/latest\/overview\" class=\" external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Transfer webhooks<\/a><\/li><li markdown=\"1\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/transaction-webhooks\/latest\/overview\" class=\" external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Transaction webhooks<\/a><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/platforms\/verification-overview\/capabilities\">Capabilities<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that your account holders have the following capabilities:<ul><li markdown=\"1\"><strong>receivePayments<\/strong><\/li><li markdown=\"1\"><strong>receiveFromPlatformPayments<\/strong><\/li><li markdown=\"1\"><strong>sendToTransferInstrument<\/strong><\/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\">Ask our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> to:<ul><li markdown=\"1\">Enable the use of the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/overview\" class=\" external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Foreign Exchange API<\/a> for your merchant account.<\/li><li markdown=\"1\">Configure the required currencies for your merchant account.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<p>If the cost of the goods in the processing currency (the currency in which the customer pays) is fixed:<\/p>\n<ol>\n<li><a href=\"#calculate-the-amount-in-the-settlement-currency\">You calculate the amount your user receives in the settlement currency using the Foreign Exchange API<\/a>.<\/li>\n<li><a href=\"#send-a-payment-request-with-the-calculated-amount\">You make a POST <code>\/payments<\/code> request, specifying the cost of the goods in both currencies<\/a>.<\/li>\n<li>When Adyen receives the request, we debit the customer and credit your user in their respective currencies.<\/li>\n<\/ol>\n<h2>Calculate the amount in the settlement currency<\/h2>\n<p>To calculate the exact amount your user receives in their currency of choice (the settlement currency):<\/p>\n<ol>\n<li>\n<p>Contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> to:<\/p>\n<ul>\n<li>Enable the use of the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/overview\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Foreign Exchange API<\/a> for your merchant account.<\/li>\n<li>Configure the required currencies for your merchant account.<br><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Make sure that you have the API key for the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/overview\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Foreign Exchange API<\/a>. Your credential has the format <strong>ws@BalancePlatform.[YourBalancePlatform]<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Make a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/rates\/calculate<\/a> request with an  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">exchangeCalculations<\/a> array. Each item in the array defines a currency and value for which you want to perform a calculation. In each item of the array, specify:<\/p>\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\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations-type\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">type<\/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;\">Set to <strong>splitPayment<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations-sourceAmount-currency\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">sourceAmount.currency<\/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 processing currency.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations-sourceAmount-value\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">sourceAmount.value<\/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 cost of the goods in the processing currency, in minor units.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations-targetCurrency\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">targetCurrency<\/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 settlement currency.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations-exchangeSide\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">exchangeSide<\/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 operation performed on the fixed currency (the currency provided in the <code>sourceAmount.currency<\/code> field. Set this to <strong>sell<\/strong>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>In the response, note the following fields:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\"><strong>Parameter<\/strong><\/th>\n<th style=\"text-align: left;\"><strong>Description<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations-type\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">type<\/a><\/td>\n<td style=\"text-align: left;\">Returns <strong>splitPayment<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations-exchangeSide\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">exchangeSide<\/a><\/td>\n<td style=\"text-align: left;\">The operation performed on the fixed currency (the currency provided in the <code>sourceAmount.currency<\/code> field). Returns <strong>sell<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations-sourceAmount-currency\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">sourceAmount.currency<\/a><\/td>\n<td style=\"text-align: left;\">The processing currency.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#request-exchangeCalculations-sourceAmount-value\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">sourceAmount.value<\/a><\/td>\n<td style=\"text-align: left;\">The cost of the goods in the processing currency, in minor units.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#responses-200-exchangeCalculations-targetAmount-currency\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">targetAmount.currency<\/a><\/td>\n<td style=\"text-align: left;\">The settlement currency.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#responses-200-exchangeCalculations-targetAmount-value\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">targetAmount.value<\/a><\/td>\n<td style=\"text-align: left;\">The cost of the goods in the settlement currency, in minor units. This is the amount your user receives.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate#responses-200-exchangeCalculations-appliedExchangeRate\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">appliedExchangeRate<\/a><\/td>\n<td style=\"text-align: left;\">The exchange rate to convert the processing currency to the settlement currency that includes Adyen's Markup.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"accordion-shortcode adl-accordion adl-accordion--max-height-transition\" data-expand=\"true\" data-ignore=\"anchorjs-link\">\n    \n    <div class=\"adl-accordion__item\" style=\"\">\n        <div tabindex=\"0\" role=\"item\" aria-expanded=\"false\" class=\"adl-accordion__header\">\n            <i class=\"adl-accordion__toggle adl-icon-chevron-down\"><\/i>\n            <div class=\"adl-accordion__title-wrapper\" data-accordion=\"#example-request\">\n                                    <h4 class=\"adl-accordion__title\">Example request<\/h4>\n                            <\/div>\n        <\/div>\n        <div role=\"region\" class=\"adl-accordion__content\">\n            \n<p>For example, your user sells goods worth PLN 200.00 to a customer:<\/p>\n<ul>\n<li>Your user accepts CZK (the settlement currency).<\/li>\n<li>The customer pays in PLN (the processing currency).<\/li>\n<li>The cost of the goods is fixed in PLN (the processing currency).<\/li>\n<li>You must calculate the cost of the goods in CZK (the settlement currency). This is the amount your user receives.<\/li>\n<\/ul>\n<p>Here is a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/foreignexchange\/latest\/post\/rates\/calculate\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/rates\/calculate<\/a> request to calculate the amount your user receives, when the cost of the goods is fixed at PLN 200.00 (the processing currency).<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Calculate the cost of the goods in the settlement currency'\" :id=\"'calculate-settlement-currency-cost'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/balanceplatform-api-live.adyen.com\\\/fx\\\/api\\\/v1\\\/rates\\\/calculate \\\\\\n -H 'x-api-key: ADYEN_API_KEY' \\\\\\n -H 'content-type: application\\\/json' \\\\\\n -X POST \\\\\\n -d '{\\n      \\&quot;exchangeCalculations\\&quot;: [\\n         {\\n            \\&quot;type\\&quot;: \\&quot;splitPayment\\&quot;,\\n            \\&quot;sourceAmount\\&quot;: {\\n               \\&quot;currency\\&quot;: \\&quot;PLN\\&quot;,\\n               \\&quot;value\\&quot;: 20000\\n            },\\n            \\&quot;targetCurrency\\&quot;: \\&quot;CZK\\&quot;,\\n            \\&quot;exchangeSide\\&quot;: \\&quot;sell\\&quot;\\n         }\\n      ]\\n   }'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>You receive the following response:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"exchangeCalculations\\\": [\\n      {\\n         \\\"type\\\": \\\"splitPayment\\\",\\n         \\\"exchangeSide\\\": \\\"sell\\\",\\n         \\\"sourceAmount\\\": {\\n            \\\"currency\\\": \\\"PLN\\\",\\n            \\\"value\\\": 20000\\n         },\\n         \\\"targetAmount\\\": {\\n            \\\"currency\\\": \\\"CZK\\\",\\n            \\\"value\\\": \\\"1015.31\\\"\\n         },\\n         \\\"appliedExchangeRate\\\": \\\"5.07655\\\"\\n      }\\n   ]\\n}\"}]' :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\/foreignexchange\/latest\/post\/rates\/calculate#responses-200-exchangeCalculations-targetAmount-value\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">targetAmount.value<\/a> field returns the amount your user receives in CZK when the customer pays PLN 200.00. Here, your user receives CZK 1015.31 when the customer pays PLN 200.00.<\/p>\n\n        <\/div>\n    <\/div>\n<\/div>\n\n<\/li>\n<\/ol>\n<h2>Send a payment request with the calculated amount<\/h2>\n<ol>\n<li>\n<p>Make sure that you have the API key for the Checkout API. Your credential has the format <strong>ws@Company.[YourCompanyAccount]<\/strong>.<\/p>\n<\/li>\n<li>\n<p>Send a POST  <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>,  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/sessions<\/a>, or  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/captures\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/captures<\/a> request, specifying the following fields for the currency conversion:<\/p>\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<th style=\"text-align: left;\">Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>amount.value<\/code><\/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 cost of the goods in the processing currency, calculated in <a href=\"#1-calculate-the-amount-in-the-settlement-currency\">step 1<\/a>.<\/td>\n<td style=\"text-align: left;\"><strong>amount.value: 20000<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>amount.currency<\/code><\/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 currency in which the customer pays.<\/td>\n<td style=\"text-align: left;\"><strong>amount.currency: \"PLN\"<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>splits.amount.value<\/code><\/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 cost of the goods in the settlement currency. In case of multiple splits, the sum of the split amounts in the splits array must equal the cost of the goods in the settlement currency. Any mismatch is booked to the balance account you specify in the split item with type <strong>Remainder<\/strong>.<\/td>\n<td style=\"text-align: left;\"><strong>splits.amount.value: 101531<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>splits.amount.currency<\/code><\/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 settlement currency.<br>This is the currency in which your user receives the funds.<\/td>\n<td style=\"text-align: left;\"><strong>splits.amount.currency: \"CZK\"<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>splits.type<\/code><\/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 type of the split item. We recommend to always add a split item for the <strong>Remainder<\/strong> and the <a href=\"\/pt\/platforms\/online-payments\/transaction-fees\">transaction fees<\/a>.<\/td>\n<td style=\"text-align: left;\"><strong>split.type: BalanceAccount<\/strong><br><strong>split.type: PaymentFee<\/strong><br><strong>split.type: Remainder<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Payment request with currency conversion'\" :id=\"'convert-currency-payment'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&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-X POST \\\\\\n-d '{\\n    \\&quot;paymentMethod\\&quot;: {\\n        \\&quot;type\\&quot;: \\&quot;scheme\\&quot;,\\n        \\&quot;number\\&quot;: \\&quot;4111111111111111\\&quot;,\\n        \\&quot;cvc\\&quot;: \\&quot;737\\&quot;,\\n        \\&quot;expiryMonth\\&quot;: \\&quot;03\\&quot;,\\n        \\&quot;expiryYear\\&quot;: \\&quot;2030\\&quot;,\\n        \\&quot;holderName\\&quot;: \\&quot;John Doe\\&quot;\\n    },\\n    \\&quot;billingAddress\\&quot;: {\\n        \\&quot;city\\&quot;:\\&quot;London\\&quot;,\\n        \\&quot;country\\&quot;:\\&quot;GB\\&quot;,\\n        \\&quot;houseNumberOrName\\&quot;:\\&quot;10\\&quot;,\\n        \\&quot;postalCode\\&quot;:\\&quot;SW1A 2AA\\&quot;,\\n        \\&quot;street\\&quot;:\\&quot;Downing Street\\&quot;\\n    },\\n    \\&quot;amount\\&quot;: {\\n        \\&quot;value\\&quot;: 20174,\\n        \\&quot;currency\\&quot;: \\&quot;PLN\\&quot;\\n    },\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n    \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;splits\\&quot;: [\\n        {\\n            \\&quot;type\\&quot;: \\&quot;BalanceAccount\\&quot;,\\n            \\&quot;account\\&quot;: \\&quot;BA00000000000000000000001\\&quot;,\\n            \\&quot;amount\\&quot;: {\\n                \\&quot;currency\\&quot;: \\&quot;CZK\\&quot;,\\n                \\&quot;value\\&quot;: 100000\\n            },\\n            \\&quot;reference\\&quot;: \\&quot;YOUR_SPLIT_REFERENCE_1\\&quot;,\\n            \\&quot;description\\&quot;: \\&quot;YOUR_SPLIT_DESCRIPTION_1\\&quot;\\n        },\\n        {\\n            \\&quot;type\\&quot;: \\&quot;Remainder\\&quot;,\\n            \\&quot;account\\&quot;: \\&quot;BA00000000000000000000001\\&quot;,\\n            \\&quot;reference\\&quot;: \\&quot;YOUR_REMAINDER_REFERENCE\\&quot;,\\n            \\&quot;description\\&quot;: \\&quot;YOUR_REMAINDER_DESCRIPTION\\&quot;\\n        },\\n        {\\n            \\&quot;type\\&quot;: \\&quot;PaymentFee\\&quot;,\\n            \\&quot;account\\&quot;: \\&quot;BA00000000000000000000001\\&quot;,\\n            \\&quot;reference\\&quot;: \\&quot;YOUR_PAYMENT-FEE_REFERENCE\\&quot;,\\n            \\&quot;description\\&quot;: \\&quot;YOUR_PAYMENT-FEE_DESCRIPTION\\&quot;\\n        }\\n    ]\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v33.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)\\nSplitAmount splitAmount1 = new SplitAmount()\\n  .currency(\\&quot;CZK\\&quot;)\\n  .value(100000L);\\n\\nAmount amount = new Amount()\\n  .currency(\\&quot;PLN\\&quot;)\\n  .value(20174L);\\n\\nSplit split1 = new Split()\\n  .reference(\\&quot;YOUR_SPLIT_REFERENCE_1\\&quot;)\\n  .amount(splitAmount1)\\n  .description(\\&quot;YOUR_SPLIT_DESCRIPTION_1\\&quot;)\\n  .type(Split.TypeEnum.BALANCEACCOUNT)\\n  .account(\\&quot;BA00000000000000000000001\\&quot;);\\n\\nSplit split2 = new Split()\\n  .reference(\\&quot;YOUR_REMAINDER_REFERENCE\\&quot;)\\n  .description(\\&quot;YOUR_REMAINDER_DESCRIPTION\\&quot;)\\n  .type(Split.TypeEnum.REMAINDER)\\n  .account(\\&quot;BA00000000000000000000001\\&quot;);\\n\\nSplit split3 = new Split()\\n  .reference(\\&quot;YOUR_PAYMENT-FEE_REFERENCE\\&quot;)\\n  .description(\\&quot;YOUR_PAYMENT-FEE_DESCRIPTION\\&quot;)\\n  .type(Split.TypeEnum.PAYMENTFEE)\\n  .account(\\&quot;BA00000000000000000000001\\&quot;);\\n\\nCardDetails cardDetails = new CardDetails()\\n  .number(\\&quot;4111111111111111\\&quot;)\\n  .cvc(\\&quot;737\\&quot;)\\n  .holderName(\\&quot;John Doe\\&quot;)\\n  .expiryMonth(\\&quot;03\\&quot;)\\n  .expiryYear(\\&quot;2030\\&quot;)\\n  .type(CardDetails.TypeEnum.SCHEME);\\n\\nBillingAddress billingAddress = new BillingAddress()\\n  .country(\\&quot;GB\\&quot;)\\n  .city(\\&quot;London\\&quot;)\\n  .houseNumberOrName(\\&quot;10\\&quot;)\\n  .street(\\&quot;Downing Street\\&quot;)\\n  .postalCode(\\&quot;SW1A 2AA\\&quot;);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;YOUR_PAYMENT_REFERENCE\\&quot;)\\n  .amount(amount)\\n  .splits(Arrays.asList(split1, split2, split3))\\n  .merchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  .paymentMethod(new CheckoutPaymentMethod(cardDetails))\\n  .billingAddress(billingAddress);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentResponse response = service.payments(paymentRequest, 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 v24.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\Split;\\nuse Adyen\\\\Model\\\\Checkout\\\\CheckoutPaymentMethod;\\nuse Adyen\\\\Model\\\\Checkout\\\\BillingAddress;\\nuse Adyen\\\\Model\\\\Checkout\\\\SplitAmount;\\nuse Adyen\\\\Model\\\\Checkout\\\\PaymentRequest;\\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$splitAmount1 = new SplitAmount();\\n$splitAmount1\\n  -&gt;setCurrency(\\&quot;CZK\\&quot;)\\n  -&gt;setValue(100000);\\n\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;PLN\\&quot;)\\n  -&gt;setValue(20174);\\n\\n$split1 = new Split();\\n$split1\\n  -&gt;setReference(\\&quot;YOUR_SPLIT_REFERENCE_1\\&quot;)\\n  -&gt;setAmount($splitAmount1)\\n  -&gt;setDescription(\\&quot;YOUR_SPLIT_DESCRIPTION_1\\&quot;)\\n  -&gt;setType(\\&quot;BalanceAccount\\&quot;)\\n  -&gt;setAccount(\\&quot;BA00000000000000000000001\\&quot;);\\n\\n$split2 = new Split();\\n$split2\\n  -&gt;setReference(\\&quot;YOUR_REMAINDER_REFERENCE\\&quot;)\\n  -&gt;setDescription(\\&quot;YOUR_REMAINDER_DESCRIPTION\\&quot;)\\n  -&gt;setType(\\&quot;Remainder\\&quot;)\\n  -&gt;setAccount(\\&quot;BA00000000000000000000001\\&quot;);\\n\\n$split3 = new Split();\\n$split3\\n  -&gt;setReference(\\&quot;YOUR_PAYMENT-FEE_REFERENCE\\&quot;)\\n  -&gt;setDescription(\\&quot;YOUR_PAYMENT-FEE_DESCRIPTION\\&quot;)\\n  -&gt;setType(\\&quot;PaymentFee\\&quot;)\\n  -&gt;setAccount(\\&quot;BA00000000000000000000001\\&quot;);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setNumber(\\&quot;4111111111111111\\&quot;)\\n  -&gt;setCvc(\\&quot;737\\&quot;)\\n  -&gt;setHolderName(\\&quot;John Doe\\&quot;)\\n  -&gt;setExpiryMonth(\\&quot;03\\&quot;)\\n  -&gt;setExpiryYear(\\&quot;2030\\&quot;)\\n  -&gt;setType(\\&quot;scheme\\&quot;);\\n\\n$billingAddress = new BillingAddress();\\n$billingAddress\\n  -&gt;setCountry(\\&quot;GB\\&quot;)\\n  -&gt;setCity(\\&quot;London\\&quot;)\\n  -&gt;setHouseNumberOrName(\\&quot;10\\&quot;)\\n  -&gt;setStreet(\\&quot;Downing Street\\&quot;)\\n  -&gt;setPostalCode(\\&quot;SW1A 2AA\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_PAYMENT_REFERENCE\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setSplits(array($split1, $split2, $split3))\\n  -&gt;setMerchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setBillingAddress($billingAddress);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;payments($paymentRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v27.0.0\\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)\\nSplitAmount splitAmount1 = new SplitAmount\\n{\\n  Currency = \\&quot;CZK\\&quot;,\\n  Value = 100000\\n};\\n\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;PLN\\&quot;,\\n  Value = 20174\\n};\\n\\nSplit split1 = new Split\\n{\\n  Reference = \\&quot;YOUR_SPLIT_REFERENCE_1\\&quot;,\\n  Amount = splitAmount1,\\n  Description = \\&quot;YOUR_SPLIT_DESCRIPTION_1\\&quot;,\\n  Type = Split.TypeEnum.BalanceAccount,\\n  Account = \\&quot;BA00000000000000000000001\\&quot;\\n};\\n\\nSplit split2 = new Split\\n{\\n  Reference = \\&quot;YOUR_REMAINDER_REFERENCE\\&quot;,\\n  Description = \\&quot;YOUR_REMAINDER_DESCRIPTION\\&quot;,\\n  Type = Split.TypeEnum.Remainder,\\n  Account = \\&quot;BA00000000000000000000001\\&quot;\\n};\\n\\nSplit split3 = new Split\\n{\\n  Reference = \\&quot;YOUR_PAYMENT-FEE_REFERENCE\\&quot;,\\n  Description = \\&quot;YOUR_PAYMENT-FEE_DESCRIPTION\\&quot;,\\n  Type = Split.TypeEnum.PaymentFee,\\n  Account = \\&quot;BA00000000000000000000001\\&quot;\\n};\\n\\nCardDetails cardDetails = new CardDetails\\n{\\n  Number = \\&quot;4111111111111111\\&quot;,\\n  Cvc = \\&quot;737\\&quot;,\\n  HolderName = \\&quot;John Doe\\&quot;,\\n  ExpiryMonth = \\&quot;03\\&quot;,\\n  ExpiryYear = \\&quot;2030\\&quot;,\\n  Type = CardDetails.TypeEnum.Scheme\\n};\\n\\nBillingAddress billingAddress = new BillingAddress\\n{\\n  Country = \\&quot;GB\\&quot;,\\n  City = \\&quot;London\\&quot;,\\n  HouseNumberOrName = \\&quot;10\\&quot;,\\n  Street = \\&quot;Downing Street\\&quot;,\\n  PostalCode = \\&quot;SW1A 2AA\\&quot;\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  Amount = amount,\\n  Splits = new List&lt;Split&gt;{ split1, split2, split3 },\\n  MerchantAccount = \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  PaymentMethod = new CheckoutPaymentMethod(cardDetails),\\n  BillingAddress = billingAddress\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Payments(paymentRequest, 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 v23.3.0\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest = {\\n  paymentMethod: {\\n    type: \\&quot;scheme\\&quot;,\\n    number: \\&quot;4111111111111111\\&quot;,\\n    cvc: \\&quot;737\\&quot;,\\n    expiryMonth: \\&quot;03\\&quot;,\\n    expiryYear: \\&quot;2030\\&quot;,\\n    holderName: \\&quot;John Doe\\&quot;\\n  },\\n  billingAddress: {\\n    city: \\&quot;London\\&quot;,\\n    country: \\&quot;GB\\&quot;,\\n    houseNumberOrName: \\&quot;10\\&quot;,\\n    postalCode: \\&quot;SW1A 2AA\\&quot;,\\n    street: \\&quot;Downing Street\\&quot;\\n  },\\n  amount: {\\n    value: 20174,\\n    currency: \\&quot;PLN\\&quot;\\n  },\\n  reference: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  splits: [ {\\n    type: \\&quot;BalanceAccount\\&quot;,\\n    account: \\&quot;BA00000000000000000000001\\&quot;,\\n    amount: {\\n      currency: \\&quot;CZK\\&quot;,\\n      value: 100000\\n    },\\n    reference: \\&quot;YOUR_SPLIT_REFERENCE_1\\&quot;,\\n    description: \\&quot;YOUR_SPLIT_DESCRIPTION_1\\&quot;\\n  }, {\\n    type: \\&quot;Remainder\\&quot;,\\n    account: \\&quot;BA00000000000000000000001\\&quot;,\\n    reference: \\&quot;YOUR_REMAINDER_REFERENCE\\&quot;,\\n    description: \\&quot;YOUR_REMAINDER_DESCRIPTION\\&quot;\\n  }, {\\n    type: \\&quot;PaymentFee\\&quot;,\\n    account: \\&quot;BA00000000000000000000001\\&quot;,\\n    reference: \\&quot;YOUR_PAYMENT-FEE_REFERENCE\\&quot;,\\n    description: \\&quot;YOUR_PAYMENT-FEE_DESCRIPTION\\&quot;\\n  } ]\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { 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 v16.3.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v16\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v16\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v16\\\/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)\\nsplitAmount1 := checkout.SplitAmount{\\n  Currency: common.PtrString(\\&quot;CZK\\&quot;),\\n  Value: 100000,\\n}\\n\\namount := checkout.Amount{\\n  Currency: \\&quot;PLN\\&quot;,\\n  Value: 20174,\\n}\\n\\nsplit1 := checkout.Split{\\n  Reference: common.PtrString(\\&quot;YOUR_SPLIT_REFERENCE_1\\&quot;),\\n  Amount: &amp;splitAmount1,\\n  Description: common.PtrString(\\&quot;YOUR_SPLIT_DESCRIPTION_1\\&quot;),\\n  Type: \\&quot;BalanceAccount\\&quot;,\\n  Account: common.PtrString(\\&quot;BA00000000000000000000001\\&quot;),\\n}\\n\\nsplit2 := checkout.Split{\\n  Reference: common.PtrString(\\&quot;YOUR_REMAINDER_REFERENCE\\&quot;),\\n  Description: common.PtrString(\\&quot;YOUR_REMAINDER_DESCRIPTION\\&quot;),\\n  Type: \\&quot;Remainder\\&quot;,\\n  Account: common.PtrString(\\&quot;BA00000000000000000000001\\&quot;),\\n}\\n\\nsplit3 := checkout.Split{\\n  Reference: common.PtrString(\\&quot;YOUR_PAYMENT-FEE_REFERENCE\\&quot;),\\n  Description: common.PtrString(\\&quot;YOUR_PAYMENT-FEE_DESCRIPTION\\&quot;),\\n  Type: \\&quot;PaymentFee\\&quot;,\\n  Account: common.PtrString(\\&quot;BA00000000000000000000001\\&quot;),\\n}\\n\\ncardDetails := checkout.CardDetails{\\n  Number: common.PtrString(\\&quot;4111111111111111\\&quot;),\\n  Cvc: common.PtrString(\\&quot;737\\&quot;),\\n  HolderName: common.PtrString(\\&quot;John Doe\\&quot;),\\n  ExpiryMonth: common.PtrString(\\&quot;03\\&quot;),\\n  ExpiryYear: common.PtrString(\\&quot;2030\\&quot;),\\n  Type: common.PtrString(\\&quot;scheme\\&quot;),\\n}\\n\\nbillingAddress := checkout.BillingAddress{\\n  Country: \\&quot;GB\\&quot;,\\n  City: \\&quot;London\\&quot;,\\n  HouseNumberOrName: \\&quot;10\\&quot;,\\n  Street: \\&quot;Downing Street\\&quot;,\\n  PostalCode: \\&quot;SW1A 2AA\\&quot;,\\n}\\n\\npaymentRequest := checkout.PaymentRequest{\\n  Reference: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  Amount: amount,\\n  Splits: []checkout.Split{\\n      split1, split2, split3,\\n  },\\n  MerchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&amp;cardDetails),\\n  BillingAddress: &amp;billingAddress,\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v13.3.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;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;scheme\\&quot;,\\n    \\&quot;number\\&quot;: \\&quot;4111111111111111\\&quot;,\\n    \\&quot;cvc\\&quot;: \\&quot;737\\&quot;,\\n    \\&quot;expiryMonth\\&quot;: \\&quot;03\\&quot;,\\n    \\&quot;expiryYear\\&quot;: \\&quot;2030\\&quot;,\\n    \\&quot;holderName\\&quot;: \\&quot;John Doe\\&quot;\\n  },\\n  \\&quot;billingAddress\\&quot;: {\\n    \\&quot;city\\&quot;: \\&quot;London\\&quot;,\\n    \\&quot;country\\&quot;: \\&quot;GB\\&quot;,\\n    \\&quot;houseNumberOrName\\&quot;: \\&quot;10\\&quot;,\\n    \\&quot;postalCode\\&quot;: \\&quot;SW1A 2AA\\&quot;,\\n    \\&quot;street\\&quot;: \\&quot;Downing Street\\&quot;\\n  },\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;value\\&quot;: 20174,\\n    \\&quot;currency\\&quot;: \\&quot;PLN\\&quot;\\n  },\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;splits\\&quot;: [ {\\n    \\&quot;type\\&quot;: \\&quot;BalanceAccount\\&quot;,\\n    \\&quot;account\\&quot;: \\&quot;BA00000000000000000000001\\&quot;,\\n    \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;CZK\\&quot;,\\n      \\&quot;value\\&quot;: 100000\\n    },\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_SPLIT_REFERENCE_1\\&quot;,\\n    \\&quot;description\\&quot;: \\&quot;YOUR_SPLIT_DESCRIPTION_1\\&quot;\\n  }, {\\n    \\&quot;type\\&quot;: \\&quot;Remainder\\&quot;,\\n    \\&quot;account\\&quot;: \\&quot;BA00000000000000000000001\\&quot;,\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_REMAINDER_REFERENCE\\&quot;,\\n    \\&quot;description\\&quot;: \\&quot;YOUR_REMAINDER_DESCRIPTION\\&quot;\\n  }, {\\n    \\&quot;type\\&quot;: \\&quot;PaymentFee\\&quot;,\\n    \\&quot;account\\&quot;: \\&quot;BA00000000000000000000001\\&quot;,\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_PAYMENT-FEE_REFERENCE\\&quot;,\\n    \\&quot;description\\&quot;: \\&quot;YOUR_PAYMENT-FEE_DESCRIPTION\\&quot;\\n  } ]\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(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 v10.1.1\\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  :paymentMethod =&gt; {\\n    :type =&gt; 'scheme',\\n    :number =&gt; '4111111111111111',\\n    :cvc =&gt; '737',\\n    :expiryMonth =&gt; '03',\\n    :expiryYear =&gt; '2030',\\n    :holderName =&gt; 'John Doe'\\n  },\\n  :billingAddress =&gt; {\\n    :city =&gt; 'London',\\n    :country =&gt; 'GB',\\n    :houseNumberOrName =&gt; '10',\\n    :postalCode =&gt; 'SW1A 2AA',\\n    :street =&gt; 'Downing Street'\\n  },\\n  :amount =&gt; {\\n    :value =&gt; 20174,\\n    :currency =&gt; 'PLN'\\n  },\\n  :reference =&gt; 'YOUR_PAYMENT_REFERENCE',\\n  :merchantAccount =&gt; 'YOUR_MERCHANT_ACCOUNT',\\n  :splits =&gt; [ {\\n    :type =&gt; 'BalanceAccount',\\n    :account =&gt; 'BA00000000000000000000001',\\n    :amount =&gt; {\\n      :currency =&gt; 'CZK',\\n      :value =&gt; 100000\\n    },\\n    :reference =&gt; 'YOUR_SPLIT_REFERENCE_1',\\n    :description =&gt; 'YOUR_SPLIT_DESCRIPTION_1'\\n  }, {\\n    :type =&gt; 'Remainder',\\n    :account =&gt; 'BA00000000000000000000001',\\n    :reference =&gt; 'YOUR_REMAINDER_REFERENCE',\\n    :description =&gt; 'YOUR_REMAINDER_DESCRIPTION'\\n  }, {\\n    :type =&gt; 'PaymentFee',\\n    :account =&gt; 'BA00000000000000000000001',\\n    :reference =&gt; 'YOUR_PAYMENT-FEE_REFERENCE',\\n    :description =&gt; 'YOUR_PAYMENT-FEE_DESCRIPTION'\\n  } ]\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(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 v23.3.0\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Create the request object(s)\\nconst splitAmount1: Types.checkout.SplitAmount = {\\n  currency: \\&quot;CZK\\&quot;,\\n  value: 100000\\n};\\n\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;PLN\\&quot;,\\n  value: 20174\\n};\\n\\nconst split1: Types.checkout.Split = {\\n  reference: \\&quot;YOUR_SPLIT_REFERENCE_1\\&quot;,\\n  amount: splitAmount1,\\n  description: \\&quot;YOUR_SPLIT_DESCRIPTION_1\\&quot;,\\n  type: Types.checkout.Split.TypeEnum.BalanceAccount,\\n  account: \\&quot;BA00000000000000000000001\\&quot;\\n};\\n\\nconst split2: Types.checkout.Split = {\\n  reference: \\&quot;YOUR_REMAINDER_REFERENCE\\&quot;,\\n  description: \\&quot;YOUR_REMAINDER_DESCRIPTION\\&quot;,\\n  type: Types.checkout.Split.TypeEnum.Remainder,\\n  account: \\&quot;BA00000000000000000000001\\&quot;\\n};\\n\\nconst split3: Types.checkout.Split = {\\n  reference: \\&quot;YOUR_PAYMENT-FEE_REFERENCE\\&quot;,\\n  description: \\&quot;YOUR_PAYMENT-FEE_DESCRIPTION\\&quot;,\\n  type: Types.checkout.Split.TypeEnum.PaymentFee,\\n  account: \\&quot;BA00000000000000000000001\\&quot;\\n};\\n\\nconst cardDetails: Types.checkout.CardDetails = {\\n  number: \\&quot;4111111111111111\\&quot;,\\n  cvc: \\&quot;737\\&quot;,\\n  holderName: \\&quot;John Doe\\&quot;,\\n  expiryMonth: \\&quot;03\\&quot;,\\n  expiryYear: \\&quot;2030\\&quot;,\\n  type: Types.checkout.CardDetails.TypeEnum.Scheme\\n};\\n\\nconst billingAddress: Types.checkout.BillingAddress = {\\n  country: \\&quot;GB\\&quot;,\\n  city: \\&quot;London\\&quot;,\\n  houseNumberOrName: \\&quot;10\\&quot;,\\n  street: \\&quot;Downing Street\\&quot;,\\n  postalCode: \\&quot;SW1A 2AA\\&quot;\\n};\\n\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\n  reference: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  amount: amount,\\n  splits: [split1, split2, split3],\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  paymentMethod: cardDetails,\\n  billingAddress: billingAddress\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p><br><\/p>\n<\/li>\n<li>\n<p>You receive the following response:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response'\" :id=\"'response-payment-forex'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   ...\\n   \\\"pspReference\\\":\\\"LVP53Z9PQGNG5S82\\\",\\n   \\\"resultCode\\\":\\\"Authorised\\\",\\n   \\\"amount\\\":{\\n      \\\"currency\\\":\\\"PLN\\\",\\n      \\\"value\\\":20174\\n   },\\n   \\\"merchantReference\\\":\\\"YOUR_PAYMENT_REFERENCE\\\",\\n   \\\"paymentMethod\\\":{\\n      \\\"brand\\\":\\\"mc\\\",\\n      \\\"type\\\":\\\"scheme\\\"\\n   }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<p>The splits are guaranteed, and the payment is booked according to the data you provide in the splits array. Any mismatch or miscalculation is booked to the balance account you specify in the split item with type <strong>Remainder<\/strong>. You can reconcile these mismatches per transaction using the <a href=\"\/pt\/platforms\/reports-and-fees\/balance-platform-accounting-report\">Balance Platform Accounting Report<\/a>.<\/p>","url":"https:\/\/docs.adyen.com\/pt\/platforms\/online-payments\/currency-conversion\/payments\/fix-processing-currency","articleFields":{"description":"Learn how to convert the currency of a payment when the cost of the goods is fixed in the processing currency","feedback_component":true,"parameters":{"directoryPath":"\/platforms","model":"platform"},"filters_component":false,"page_id":"7f6ea2bd-a801-49ac-9cae-77429d0c13c6"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/platforms\/online-payments\/currency-conversion\/payments\/fix-processing-currency","title":"Fix the cost of goods in the processing currency","content":"Limited availability\nCurrency conversion in currently in pilot phase. Some of the processes and documentation may change as the feature evolves. If you are interested in piloting currency conversion or have any feedback, reach out to your Adyen contact.\n\nWhen you fix the cost of the goods in the processing currency, the customer always pays the same, fixed amount in their currency of choice (the processing currency). The amount your user receives in the settlement currency is not fixed and depends on the prevailing exchange rate and Adyen's conversion markup.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nYou must have an Adyen online payments integration and a checkout UI.\n\n\nAPI credentials\nYou must have credentials for the following APIs: Checkout API (format: ws@Company.[YourCompanyAccount]) Foreign Exchange API (format: ws@BalancePlatform.[YourBalancePlatform]).\n\n\nAPI credential roles\nTo use the  Foreign Exchange API, make sure you have the following role:Read FX rates role\n\n\nWebhooks\nEnsure that your server can receive and accept standard webhooks.Subscribe to any of the following webhooks:  Transfer webhooks Transaction webhooks\n\n\nCapabilities\nMake sure that your account holders have the following capabilities:receivePaymentsreceiveFromPlatformPaymentssendToTransferInstrument\n\n\nSetup steps\nBefore you begin: Ask our Support Team to:Enable the use of the  Foreign Exchange API for your merchant account.Configure the required currencies for your merchant account.\n\n\n\nHow it works\nIf the cost of the goods in the processing currency (the currency in which the customer pays) is fixed:\n\nYou calculate the amount your user receives in the settlement currency using the Foreign Exchange API.\nYou make a POST \/payments request, specifying the cost of the goods in both currencies.\nWhen Adyen receives the request, we debit the customer and credit your user in their respective currencies.\n\nCalculate the amount in the settlement currency\nTo calculate the exact amount your user receives in their currency of choice (the settlement currency):\n\n\nContact our Support Team to:\n\nEnable the use of the  Foreign Exchange API for your merchant account.\nConfigure the required currencies for your merchant account.\n\n\n\nMake sure that you have the API key for the  Foreign Exchange API. Your credential has the format ws@BalancePlatform.[YourBalancePlatform].\n\n\nMake a POST  \/rates\/calculate request with an  exchangeCalculations array. Each item in the array defines a currency and value for which you want to perform a calculation. In each item of the array, specify:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\n type\n\nSet to splitPayment\n\n\n sourceAmount.currency\n\nThe processing currency.\n\n\n sourceAmount.value\n\nThe cost of the goods in the processing currency, in minor units.\n\n\n targetCurrency\n\nThe settlement currency.\n\n\n exchangeSide\n\nThe operation performed on the fixed currency (the currency provided in the sourceAmount.currency field. Set this to sell.\n\n\n\n\n\nIn the response, note the following fields:\n\n\n\nParameter\nDescription\n\n\n\n\n type\nReturns splitPayment\n\n\n exchangeSide\nThe operation performed on the fixed currency (the currency provided in the sourceAmount.currency field). Returns sell.\n\n\n sourceAmount.currency\nThe processing currency.\n\n\n sourceAmount.value\nThe cost of the goods in the processing currency, in minor units.\n\n\n targetAmount.currency\nThe settlement currency.\n\n\n targetAmount.value\nThe cost of the goods in the settlement currency, in minor units. This is the amount your user receives.\n\n\n appliedExchangeRate\nThe exchange rate to convert the processing currency to the settlement currency that includes Adyen's Markup.\n\n\n\n\n    \n    \n        \n            \n            \n                                    Example request\n                            \n        \n        \n            \nFor example, your user sells goods worth PLN 200.00 to a customer:\n\nYour user accepts CZK (the settlement currency).\nThe customer pays in PLN (the processing currency).\nThe cost of the goods is fixed in PLN (the processing currency).\nYou must calculate the cost of the goods in CZK (the settlement currency). This is the amount your user receives.\n\nHere is a POST  \/rates\/calculate request to calculate the amount your user receives, when the cost of the goods is fixed at PLN 200.00 (the processing currency).\n\n\n\nYou receive the following response:\n\n\n\nThe  targetAmount.value field returns the amount your user receives in CZK when the customer pays PLN 200.00. Here, your user receives CZK 1015.31 when the customer pays PLN 200.00.\n\n        \n    \n\n\n\n\nSend a payment request with the calculated amount\n\n\nMake sure that you have the API key for the Checkout API. Your credential has the format ws@Company.[YourCompanyAccount].\n\n\nSend a POST  \/payments,  \/sessions, or  \/payments\/{paymentPspReference}\/captures request, specifying the following fields for the currency conversion:\n\n\n\nParameter\nRequired\nDescription\nExample\n\n\n\n\namount.value\n\nThe cost of the goods in the processing currency, calculated in step 1.\namount.value: 20000\n\n\namount.currency\n\nThe currency in which the customer pays.\namount.currency: \"PLN\"\n\n\nsplits.amount.value\n\nThe cost of the goods in the settlement currency. In case of multiple splits, the sum of the split amounts in the splits array must equal the cost of the goods in the settlement currency. Any mismatch is booked to the balance account you specify in the split item with type Remainder.\nsplits.amount.value: 101531\n\n\nsplits.amount.currency\n\nThe settlement currency.This is the currency in which your user receives the funds.\nsplits.amount.currency: \"CZK\"\n\n\nsplits.type\n\nThe type of the split item. We recommend to always add a split item for the Remainder and the transaction fees.\nsplit.type: BalanceAccountsplit.type: PaymentFeesplit.type: Remainder\n\n\n\n\n\n\n\n\n\nYou receive the following response:\n\n\n\n\n\nThe splits are guaranteed, and the payment is booked according to the data you provide in the splits array. Any mismatch or miscalculation is booked to the balance account you specify in the split item with type Remainder. You can reconcile these mismatches per transaction using the Balance Platform Accounting Report.","type":"page","locale":"pt","boost":15,"hierarchy":{"lvl0":"Home","lvl1":"Platforms","lvl2":"Process online payments","lvl3":"Currency conversion","lvl4":"Convert the currency of a payment","lvl5":"Fix the cost of goods in the processing currency"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/platforms","lvl2":"https:\/\/docs.adyen.com\/pt\/platforms\/online-payments","lvl3":"https:\/\/docs.adyen.com\/pt\/platforms\/online-payments\/currency-conversion","lvl4":"https:\/\/docs.adyen.com\/pt\/platforms\/online-payments\/currency-conversion\/payments","lvl5":"\/pt\/platforms\/online-payments\/currency-conversion\/payments\/fix-processing-currency"},"levels":6,"category":"Platforms","category_color":"green","tags":["goods","processing","currency"]}}
