{"title":"Result codes","category":"default","creationDate":1699892340,"content":"<p>When you submit a payment request, you get a result code that indicates the current status of the payment. You can use the result code to inform the shopper about the payment status. The status of a payment can sometimes change after you get the result code, so we recommend that you do not use the result code to update your order management system.<\/p>\n<h2>Requirements<\/h2>\n<p>Before you begin, take into account the following requirements.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">An <a href=\"\/pt\/online-payments\">online payments<\/a> 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;\">Make sure that you have the following roles: <ul><li markdown=\"1\"><strong>Merchant PAL webservice role<\/strong><\/li> <li markdown=\"1\"><strong>Checkout webservice role<\/strong><\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Getting the result code<\/h2>\n<p>How you get the result code depends on the server-side flow that your integration uses.<\/p>\n<table>\n<thead>\n<tr>\n<th>Server-side flow<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Sessions flow<\/td>\n<td>When the payment flow finishes, you get the <code>resultCode<\/code> object from Drop-in or the Component.<\/td>\n<\/tr>\n<tr>\n<td>Advanced flow<\/td>\n<td>For payments that do not require an additional action, you get the <code>resultCode<\/code> parameter in 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. <br> For payments that require an additional action, you get the <code>resultCode<\/code> parameter in the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"authentication-only\">Authentication-only result codes<\/h2>\n<p>For <a href=\"\/pt\/online-payments\/3d-secure\/standalone-authentication\/\">standalone authentication<\/a> integrations, the result codes indicate if you need to take any action before you can proceed to authorize the payment.<\/p>\n<table>\n<thead>\n<tr>\n<th><div style=\"width:175px\">resultCode<\/div><\/th>\n<th><div style=\"width:200px\">Description<\/div><\/th>\n<th><div style=\"width:200px\">Action to take<\/div><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>AuthenticationNotRequired<\/strong><\/td>\n<td>The transaction does not require 3D Secure 2 authentication. <br><br> You can check the <a href=\"\/pt\/online-payments\/3d-secure\/standalone-authentication\/#auth-not-required-reasons\">\n  <code>authenticationNotRequiredReason<\/code>\n<\/a> field to learn why authentication was not required.<\/td>\n<td>Proceed to authorize the payment.<\/td>\n<\/tr>\n<tr>\n<td><strong>AuthenticationFinished<\/strong><\/td>\n<td>The payment has been successfully authenticated with 3D Secure 2.<\/td>\n<td><a href=\"\/pt\/online-payments\/3d-secure\/standalone-authentication#get-the-3d-secure-2-authenticated-data\">Collect the 3D Secure 2 authentication data<\/a> that you need to authorize the payment.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"3d-secure-authentication\">3D Secure 2 authentication result codes<\/h2>\n<p>For payment flows that require <a href=\"\/pt\/online-payments\/3d-secure\">3D Secure 2 authentication<\/a>, the result codes indicate the action to take to authenticate the shopper.<\/p>\n<table>\n<thead>\n<tr>\n<th><div style=\"width:175px\">resultCode<\/div><\/th>\n<th><div style=\"width:200px\">Description<\/div><\/th>\n<th><div style=\"width:200px\">Action to take<\/div><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>ChallengeShopper<\/strong><\/td>\n<td>The issuer requires authentication from the shopper, for example, through facial recognition or entering a code received on their phone.<\/td>\n<td>Initiate the <a href=\"\/pt\/online-payments\/3d-secure#challenge-flow\">challenge flow<\/a> to present the challenge to the shopper, and submit the result to Adyen.<\/td>\n<\/tr>\n<tr>\n<td><strong>IdentifyShopper<\/strong><\/td>\n<td>The issuer requires authentication from the device the shopper is using.<\/td>\n<td>Initiate the <a href=\"\/pt\/online-payments\/3d-secure#frictionless-flow\">frictionless flow<\/a> to get the shopper's device fingerprint, and submit the result to Adyen.<\/td>\n<\/tr>\n<tr>\n<td><strong>RedirectShopper<\/strong><\/td>\n<td>The issuer requires the shopper to provide authentication in an an external web page or app.<\/td>\n<td><a href=\"\/pt\/online-payments\/3d-secure\/redirect-3ds2\/\">Redirect the shopper<\/a> to complete the authentication.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"intermediate\">Intermediate result codes<\/h2>\n<p>For some payment methods, you can receive an intermediate result code indicating the payment has not reached a final state yet. This happens when a payment is completed but the final status of the payment cannot be obtained, or for flows where it takes a while before the shopper can complete the payment.<\/p>\n<table>\n<thead>\n<tr>\n<th><div style=\"width:175px\">resultCode<\/div><\/th>\n<th><div style=\"width:200px\">Description<\/div><\/th>\n<th><div style=\"width:200px\">Action to take<\/div><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Received<\/strong><\/td>\n<td>Indicates the payment request was successfully received by Adyen, and will be processed. This is the initial state for all payments.<\/td>\n<td>Inform the shopper that you received their order, and are waiting for the final payment status.<\/td>\n<\/tr>\n<tr>\n<td><strong>Pending<\/strong><\/td>\n<td>The payment order was successfully received but the final status of the payment is not available yet.<br>This is common for payment methods with an asynchronous flow.<\/td>\n<td>Inform the shopper that you received their order, and are waiting for the shopper to complete the payment.<\/td>\n<\/tr>\n<tr>\n<td><strong>PresentToShopper<\/strong><\/td>\n<td>Indicates that there is additional information that you need to present to the shopper so that they can use it to complete a payment. For example, a voucher.<\/td>\n<td>Present the voucher to the shopper, and inform the shopper that you are waiting for them to complete the payment.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>When the shopper has completed the payment successfully, you receive a successful <strong>AUTHORISATION<\/strong> <a href=\"\/pt\/development-resources\/webhooks\/\">webhook<\/a>.<\/p>\n<div class=\"notices yellow\">\n<p>For some payments, it can take minutes, hours, or even days to be completed.<\/p>\n<\/div>\n<h2 id=\"partial-authorisation\">Partial authorization result codes<\/h2>\n<p>If you accept partial authorizations for card payments, you receive a result code that indicates the issuing bank authorized a partial amount instead of the full order amount.<\/p>\n<table>\n<thead>\n<tr>\n<th><div style=\"width:175px\">resultCode<\/div><\/th>\n<th><div style=\"width:200px\">Description<\/div><\/th>\n<th><div style=\"width:200px\">Action to take<\/div><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>PartiallyAuthorised<\/strong><\/td>\n<td>The payment was authorized for a partial amount. This happens when the cardholder has insufficient funds.<\/td>\n<td>Inform the shopper that their payment was partially authorized. You can now: <ul><li markdown=\"1\">Start a new transaction for the outstanding balance.<\/li><li markdown=\"1\">Cancel the transaction.<\/li><li markdown=\"1\">Capture the partial amount and take no further action.<\/li><li markdown=\"1\">For recurring payments, retry later.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"final-payment-status\">Final state result codes<\/h2>\n<p>These result codes indicate that the payment has reached a final state.<\/p>\n<table>\n<thead>\n<tr>\n<th><div style=\"width:175px\">resultCode<\/div><\/th>\n<th><div style=\"width:200px\">Description<\/div><\/th>\n<th><div style=\"width:200px\">Action to take<\/div><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span translate=\"no\"><strong>Authorised<\/strong><\/span><\/td>\n<td>The payment was successfully authorised.<\/td>\n<td>Inform the shopper that the payment was successful. You also get a webhook with an updated payment status that you can use to update your order management system. <br><br> If you are using <a href=\"\/pt\/online-payments\/capture\/#manual-capture\">manual capture<\/a>, you also need to <a href=\"\/pt\/online-payments\/capture\/\">capture<\/a> the payment.<\/td>\n<\/tr>\n<tr>\n<td><span translate=\"no\"><strong>Cancelled<\/strong><\/span><\/td>\n<td>The payment was cancelled (by either the shopper or your own system) before processing was completed.<\/td>\n<td>Inform the shopper that their payment was cancelled and check if they want to continue with their order.<\/td>\n<\/tr>\n<tr>\n<td><span translate=\"no\"><strong>Error<\/strong><\/span><\/td>\n<td>There was an error when the payment was being processed.<\/td>\n<td>Inform the shopper that there was an error processing their payment.<\/td>\n<\/tr>\n<tr>\n<td><span translate=\"no\"><strong>Refused<\/strong><\/span><\/td>\n<td>The payment was refused.<\/td>\n<td>Inform the shopper that their payment was refused and ask them to try the payment again, for example, by using a different payment method or card.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"notices green\">\n<p>For payments that are not <span translate=\"no\"><strong>Authorised<\/strong><\/span>, you will receive a <a href=\"\/pt\/development-resources\/refusal-reasons\">\n  <code>refusalReason<\/code>\n<\/a>, indicating the cause of the error. We do not recommend disclosing this refusal reason to the shopper.<\/p>\n<\/div>\n<h2 id=\"next-steps\">Next steps<\/h2>\n<div class=\"next-steps\" id=\"next-steps\" style=display:block;>\n<a href=\"\/development-resources\/testing\/result-codes\" class=\"next-steps__step\" style=\"width:45%;\" target=\"_self\"><div class=\"next-steps__title\">Test result codes<\/div><p class=\"next-steps__body\"><p>Learn how to trigger specific result codes to test how your integration handles them.<\/p><\/p><\/a><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/build-your-integration\/payment-result-codes","articleFields":{"description":"Use result codes to understand the current state of a payment.","id":"42834099","type":"page","_expandable":{"operations":""},"status":"current","feedback_component":true,"filters_component":false,"page_id":"eaed354e-47cc-4e4f-b3f5-9076034f7f3d","last_edit_on":"13-11-2023 17:19","decision_tree":"[]"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/build-your-integration\/payment-result-codes","title":"Result codes","content":"When you submit a payment request, you get a result code that indicates the current status of the payment. You can use the result code to inform the shopper about the payment status. The status of a payment can sometimes change after you get the result code, so we recommend that you do not use the result code to update your order management system.\nRequirements\nBefore you begin, take into account the following requirements.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nAn online payments integration.\n\n\nAPI credential roles\nMake sure that you have the following roles: Merchant PAL webservice role Checkout webservice role\n\n\n\nGetting the result code\nHow you get the result code depends on the server-side flow that your integration uses.\n\n\n\nServer-side flow\nDescription\n\n\n\n\nSessions flow\nWhen the payment flow finishes, you get the resultCode object from Drop-in or the Component.\n\n\nAdvanced flow\nFor payments that do not require an additional action, you get the resultCode parameter in the  \/payments response.  For payments that require an additional action, you get the resultCode parameter in the  \/payments\/details response.\n\n\n\nAuthentication-only result codes\nFor standalone authentication integrations, the result codes indicate if you need to take any action before you can proceed to authorize the payment.\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nAuthenticationNotRequired\nThe transaction does not require 3D Secure 2 authentication.  You can check the \n  authenticationNotRequiredReason\n field to learn why authentication was not required.\nProceed to authorize the payment.\n\n\nAuthenticationFinished\nThe payment has been successfully authenticated with 3D Secure 2.\nCollect the 3D Secure 2 authentication data that you need to authorize the payment.\n\n\n\n3D Secure 2 authentication result codes\nFor payment flows that require 3D Secure 2 authentication, the result codes indicate the action to take to authenticate the shopper.\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nChallengeShopper\nThe issuer requires authentication from the shopper, for example, through facial recognition or entering a code received on their phone.\nInitiate the challenge flow to present the challenge to the shopper, and submit the result to Adyen.\n\n\nIdentifyShopper\nThe issuer requires authentication from the device the shopper is using.\nInitiate the frictionless flow to get the shopper's device fingerprint, and submit the result to Adyen.\n\n\nRedirectShopper\nThe issuer requires the shopper to provide authentication in an an external web page or app.\nRedirect the shopper to complete the authentication.\n\n\n\nIntermediate result codes\nFor some payment methods, you can receive an intermediate result code indicating the payment has not reached a final state yet. This happens when a payment is completed but the final status of the payment cannot be obtained, or for flows where it takes a while before the shopper can complete the payment.\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nReceived\nIndicates the payment request was successfully received by Adyen, and will be processed. This is the initial state for all payments.\nInform the shopper that you received their order, and are waiting for the final payment status.\n\n\nPending\nThe payment order was successfully received but the final status of the payment is not available yet.This is common for payment methods with an asynchronous flow.\nInform the shopper that you received their order, and are waiting for the shopper to complete the payment.\n\n\nPresentToShopper\nIndicates that there is additional information that you need to present to the shopper so that they can use it to complete a payment. For example, a voucher.\nPresent the voucher to the shopper, and inform the shopper that you are waiting for them to complete the payment.\n\n\n\nWhen the shopper has completed the payment successfully, you receive a successful AUTHORISATION webhook.\n\nFor some payments, it can take minutes, hours, or even days to be completed.\n\nPartial authorization result codes\nIf you accept partial authorizations for card payments, you receive a result code that indicates the issuing bank authorized a partial amount instead of the full order amount.\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nPartiallyAuthorised\nThe payment was authorized for a partial amount. This happens when the cardholder has insufficient funds.\nInform the shopper that their payment was partially authorized. You can now: Start a new transaction for the outstanding balance.Cancel the transaction.Capture the partial amount and take no further action.For recurring payments, retry later.\n\n\n\nFinal state result codes\nThese result codes indicate that the payment has reached a final state.\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nAuthorised\nThe payment was successfully authorised.\nInform the shopper that the payment was successful. You also get a webhook with an updated payment status that you can use to update your order management system.  If you are using manual capture, you also need to capture the payment.\n\n\nCancelled\nThe payment was cancelled (by either the shopper or your own system) before processing was completed.\nInform the shopper that their payment was cancelled and check if they want to continue with their order.\n\n\nError\nThere was an error when the payment was being processed.\nInform the shopper that there was an error processing their payment.\n\n\nRefused\nThe payment was refused.\nInform the shopper that their payment was refused and ask them to try the payment again, for example, by using a different payment method or card.\n\n\n\n\nFor payments that are not Authorised, you will receive a \n  refusalReason\n, indicating the cause of the error. We do not recommend disclosing this refusal reason to the shopper.\n\nNext steps\n\nTest result codesLearn how to trigger specific result codes to test how your integration handles them.\n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Build your integration","lvl3":"Result codes"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"https:\/\/docs.adyen.com\/pt\/online-payments\/build-your-integration","lvl3":"\/pt\/online-payments\/build-your-integration\/payment-result-codes"},"levels":4,"category":"Online Payments","category_color":"green","tags":["Result","codes"]}}
