{"title":"Dynamic sales day closing time","category":"default","creationDate":1776961629,"content":"<p>Every day, Adyen automatically closes the sales day at the same, static time. If in your own systems you often close the sales day at different times, you can dynamically change the sales day closing time with an API request whenever needed. This prevents reconciliation issues.<\/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;\">Any payments integration.<\/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;\">To <a href=\"#change-eod\">set the closing time for this night<\/a>, make sure that you have the following role: <ul><li markdown=\"1\"><strong>Management API\u2014Sales Day Payout read and write<\/strong><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/account\/user-roles\">Customer Area roles<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">To <a href=\"#set-static\">set the static closing time<\/a>, make sure that you have one of the following roles: <ul><li markdown=\"1\"><strong>Change payout schedule<\/strong><\/li> <li markdown=\"1\"><strong>Merchant admin<\/strong><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Limitations<\/strong><\/td>\n<td style=\"text-align: left;\">In some cases you <a href=\"#limitations\">cannot benefit from this feature<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Solution to reconciliation problems<\/h2>\n<p>Hotels and restaurants use a nightly process called the 'Night Audit'. The night auditor closes the sales day in the business application that the hotel or restaurant uses, like a Property Management System (PMS), and opens the next sales day. The time when this takes place can be different each night based on the activity in the hotel or restaurant.<\/p>\n<p>Your Adyen merchant account also has a sales day closing time. This determines in which settlement details report and payable batch the payments of the day end up. The closing time for your account is a <strong>static time<\/strong>, by default set to midnight, which is the earliest possible closing time. It is possible to change this static time, but not every day.<\/p>\n<p>If the sales day closing time of your merchant account and the sales day closing time in your business application do not correspond, this causes reconciliation problems. To prevent reconciliation problems, you can send an API request every night to set the sales day closing time to the time you send the request.<\/p>\n<p>If on a particular night you do not send a request to close the sales day, or if you send the request too late, we close the sales day at the static closing time.<\/p>\n<h2 id=\"limitations\">When dynamic closing times do not help<\/h2>\n<p>To benefit from dynamic sales day closing times:<\/p>\n<ul>\n<li>Your merchant account must be set to <a href=\"\/pt\/account\/sales-day-payout\/\">Sales day payout<\/a> <strong>T+1<\/strong> or <strong>T+2<\/strong>.<br \/>\nBecause Sales day payout is not available in Africa, Brazil, and Turkey, dynamic sales day closing is also not available in those regions.<\/li>\n<li>There must be a one-on-one relation between your merchant account and the business application where you close the sales day.<\/li>\n<\/ul>\n<p>Dynamic sales day closing times <strong>do not solve reconciliation problems<\/strong> in the following situation:<\/p>\n<ul>\n<li>You use several business applications, for example, a Food &amp; Beverage POS system as well as a PMS.<br \/>\n<em>AND<\/em><\/li>\n<li>You consolidate the payments from those applications to a single merchant account.<br \/>\n<em>AND<\/em><\/li>\n<li>You close the sales day in those applications at different times.<\/li>\n<\/ul>\n<h2 id=\"set-static\">Preparation: set the static closing time<\/h2>\n<p>To be able to use dynamic sales day closing times, you need to change the static closing time for your merchant account to a time after midnight. We recommend using the latest possible time, which is 6:00&nbsp;AM. This ensures the sales day is not already closed when you try to close it through your API request.<\/p>\n<p>Complete the following one-off task:<\/p>\n<ol>\n<li>Log in to your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>.<\/li>\n<li>Go to <strong>Finance<\/strong> &gt; <strong>Payout model<\/strong>&gt;<\/li>\n<li>Select <strong>Change<\/strong> and follow the instructions using the following settings:\n<ul>\n<li>At <strong>Payout model<\/strong>, select <strong>Sales day payout<\/strong>, and <strong>T+1<\/strong> or <strong>T+2<\/strong>.<\/li>\n<li>At <strong>Timezone configuration<\/strong>, set the <strong>Closing time<\/strong> to, for example, <strong>06:00<\/strong>.<\/li>\n<\/ul><\/li>\n<li>Accept the <strong>Terms &amp; Conditions<\/strong> and select <strong>Submit<\/strong>.<\/li>\n<\/ol>\n<h2 id=\"change-eod\">Set the closing time for this night<\/h2>\n<p>To set the sales day closing time for a particular night, you need to send your request on time: after midnight, but before 6:00&nbsp;AM in your time zone or the static closing time for your merchant account if that is earlier than 6:00&nbsp;AM.<\/p>\n<p>To close the sales day:<\/p>\n<ol>\n<li>\n<p>Make a POST request to the <code>\/merchants\/{merchantId}\/closeSalesDay<\/code> endpoint of  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Management\/latest\/overview\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Management API<\/a>.<\/p>\n<p>It is optional to add a request body. If you want, you can specify:<\/p>\n<ul>\n<li><code>closeNow<\/code>: <strong>true<\/strong>.<\/li>\n<\/ul>\n<p>Sending the request without request body, with <code>closeNow<\/code>: <strong>true<\/strong>, or with <code>closeNow<\/code>: <strong>false<\/strong> will have the same effect: the sales day is closed at the time of sending the request.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Request to close the sales day'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/management-test.adyen.com\\\/v3\\\/merchants\\\/YOUR_MERCHANT_ACCOUNT\\\/closeSalesDay \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;closeNow\\&quot;: true\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Check if your request succeeded.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response when the request succeeded'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"salesDayClosed\\\": true\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>If your request failed, see <a href=\"#troubleshooing\">Troubleshooting<\/a>.<\/p>\n<\/li>\n<\/ol>\n<p>The next day, the sales day closing time for that night defaults to the static closing time of your merchant account, unless you send a new request.<\/p>\n<h2>Troubleshooting<\/h2>\n<p>If the <code>\/merchants\/{merchantId}\/closeSalesDay<\/code> request fails, the <code>title<\/code> and <code>detail<\/code> in the error response indicate what happened. The following example shows the most common error:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Not allowed to close the sales day now'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"type\\\": \\\"https:\\\/\\\/docs.adyen.com\\\/errors\\\/validation\\\",\\n   \\\"title\\\": \\\"Not allowed to close the sales day now.\\\",\\n   \\\"status\\\": 422,\\n   \\\"detail\\\": \\\"The closing time is 6:00 AM at the latest; or you already closed the sales day.\\\",\\n   \\\"requestId\\\": \\\"JDD6LKT8MBLZNN84\\\",\\n   \\\"errorCode\\\": \\\"36_001\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>This error can mean the following:<\/p>\n<ul>\n<li>You already sent a sales day closing request for the same night.<\/li>\n<li>You sent the request <strong>before midnight<\/strong>. To be precise: you sent the request between 6:00 AM or the static closing time for your account, and the earliest possible closing time of midnight. This can happen, for example, when you test the feature during the day.<\/li>\n<\/ul>\n<h2>Booking of payments<\/h2>\n<p>When you send a request to close the sales day:<\/p>\n<ul>\n<li>Any payments captured before the time you sent the request to close the sales day, end up in the settlement details report for that sales day.<\/li>\n<li>Any payments captured after the time you sent the request to close the sales day, are booked to the payable pending batch for the next sales day. That means they end up in the settlement details report for the next day.<\/li>\n<\/ul>\n<h2>See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/account\/getting-paid\"\n                        target=\"_self\"\n                        >\n                    Getting paid\n                <\/a><\/li><li><a href=\"\/account\/sales-day-payout\"\n                        target=\"_self\"\n                        >\n                    Sales day payout\n                <\/a><\/li><li><a href=\"\/reporting\/settlement-detail-report\"\n                        target=\"_self\"\n                        >\n                    Settlement details report\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/reporting\/dynamic-sales-day","articleFields":{"description":"Change the sales day closing time for a specific night.","feedback_component":true,"type":"page"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/reporting\/dynamic-sales-day","title":"Dynamic sales day closing time","content":"Every day, Adyen automatically closes the sales day at the same, static time. If in your own systems you often close the sales day at different times, you can dynamically change the sales day closing time with an API request whenever needed. This prevents reconciliation issues.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nAny payments integration.\n\n\nAPI credential roles\nTo set the closing time for this night, make sure that you have the following role: Management API\u2014Sales Day Payout read and write\n\n\nCustomer Area roles\nTo set the static closing time, make sure that you have one of the following roles: Change payout schedule Merchant admin\n\n\nLimitations\nIn some cases you cannot benefit from this feature.\n\n\n\nSolution to reconciliation problems\nHotels and restaurants use a nightly process called the 'Night Audit'. The night auditor closes the sales day in the business application that the hotel or restaurant uses, like a Property Management System (PMS), and opens the next sales day. The time when this takes place can be different each night based on the activity in the hotel or restaurant.\nYour Adyen merchant account also has a sales day closing time. This determines in which settlement details report and payable batch the payments of the day end up. The closing time for your account is a static time, by default set to midnight, which is the earliest possible closing time. It is possible to change this static time, but not every day.\nIf the sales day closing time of your merchant account and the sales day closing time in your business application do not correspond, this causes reconciliation problems. To prevent reconciliation problems, you can send an API request every night to set the sales day closing time to the time you send the request.\nIf on a particular night you do not send a request to close the sales day, or if you send the request too late, we close the sales day at the static closing time.\nWhen dynamic closing times do not help\nTo benefit from dynamic sales day closing times:\n\nYour merchant account must be set to Sales day payout T+1 or T+2.\nBecause Sales day payout is not available in Africa, Brazil, and Turkey, dynamic sales day closing is also not available in those regions.\nThere must be a one-on-one relation between your merchant account and the business application where you close the sales day.\n\nDynamic sales day closing times do not solve reconciliation problems in the following situation:\n\nYou use several business applications, for example, a Food &amp; Beverage POS system as well as a PMS.\nAND\nYou consolidate the payments from those applications to a single merchant account.\nAND\nYou close the sales day in those applications at different times.\n\nPreparation: set the static closing time\nTo be able to use dynamic sales day closing times, you need to change the static closing time for your merchant account to a time after midnight. We recommend using the latest possible time, which is 6:00&nbsp;AM. This ensures the sales day is not already closed when you try to close it through your API request.\nComplete the following one-off task:\n\nLog in to your Customer Area.\nGo to Finance &gt; Payout model&gt;\nSelect Change and follow the instructions using the following settings:\n\nAt Payout model, select Sales day payout, and T+1 or T+2.\nAt Timezone configuration, set the Closing time to, for example, 06:00.\n\nAccept the Terms &amp; Conditions and select Submit.\n\nSet the closing time for this night\nTo set the sales day closing time for a particular night, you need to send your request on time: after midnight, but before 6:00&nbsp;AM in your time zone or the static closing time for your merchant account if that is earlier than 6:00&nbsp;AM.\nTo close the sales day:\n\n\nMake a POST request to the \/merchants\/{merchantId}\/closeSalesDay endpoint of  Management API.\nIt is optional to add a request body. If you want, you can specify:\n\ncloseNow: true.\n\nSending the request without request body, with closeNow: true, or with closeNow: false will have the same effect: the sales day is closed at the time of sending the request.\n\n\n\n\n\nCheck if your request succeeded.\n\n\n\nIf your request failed, see Troubleshooting.\n\n\nThe next day, the sales day closing time for that night defaults to the static closing time of your merchant account, unless you send a new request.\nTroubleshooting\nIf the \/merchants\/{merchantId}\/closeSalesDay request fails, the title and detail in the error response indicate what happened. The following example shows the most common error:\n\n    \n\nThis error can mean the following:\n\nYou already sent a sales day closing request for the same night.\nYou sent the request before midnight. To be precise: you sent the request between 6:00 AM or the static closing time for your account, and the earliest possible closing time of midnight. This can happen, for example, when you test the feature during the day.\n\nBooking of payments\nWhen you send a request to close the sales day:\n\nAny payments captured before the time you sent the request to close the sales day, end up in the settlement details report for that sales day.\nAny payments captured after the time you sent the request to close the sales day, are booked to the payable pending batch for the next sales day. That means they end up in the settlement details report for the next day.\n\nSee also\n\n\n                    Getting paid\n                \n                    Sales day payout\n                \n                    Settlement details report\n                \n","type":"page","locale":"pt","boost":18,"hierarchy":{"lvl0":"Home","lvl1":"Reporting","lvl2":"Dynamic sales day closing time"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/reporting","lvl2":"\/pt\/reporting\/dynamic-sales-day"},"levels":3,"category":"Reporting","category_color":"green","tags":["Dynamic","sales","closing"]}}
