{"title":"Manage consent","category":"default","creationDate":1776961628,"content":"<p>After an account holder gives their consent, the third-party provider can check if it is still valid and see what they consented to. If an account holder wants to withdraw their consent, the third party provider can make a call to revoke that consent.<\/p>\n<p>This page explains how you, as a third-party provider, use the <code>\/consents<\/code> endpoint to:<\/p>\n<ul>\n<li>Check if an account holder's consent is still valid and how a third party provider can use the consent.<\/li>\n<li>Revoke consent on the account holder's behalf.<\/li>\n<\/ul>\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;\">Not applicable; this documentation is intended for third-party providers.<\/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, you must: <ul><li> Complete the <a href=\"\/pt\/business-accounts\/open-banking#onboard-with-adyen\">Adyen onboarding steps<\/a>.<\/li><li>Complete the <a href=\"\/pt\/business-accounts\/oauth-flow\">get account holder consent<\/a> steps.<\/li><\/ul>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Check if the account holder granted consent<\/h2>\n<p>To get the status of a previously granted consent:<\/p>\n<ol>\n<li>\n<p>Make a GET <code>\/consents\/{consent_id}\/status<\/code> request, where <code>consent_id<\/code> is a unique identifier for a specific consent. This is the <code>consent_id<\/code> you saved in the <a href=\"\/pt\/business-accounts\/oauth-flow#create-a-consent\">create a consent<\/a> step. In the headers, include a UUID for the <code>X-Request-ID<\/code> and the <code>access_token<\/code> you saved in the <a href=\"\/pt\/business-accounts\/oauth-flow#get-an-access-token\">get and access token<\/a> step.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Get consent status'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl  'https:\\\/\\\/openbanking-psd2-test.adyen.com\\\/obeu\\\/consent\\\/v1\\\/consents\\\/{consent-id}\\\/status' \\\\\\n--header 'X-Request-ID: {your-request-id}' \\\\\\n--header 'Authorization: Bearer {access-token}'&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, check the <code>consentStatus<\/code>. This value indicates your current stage in the consent process. See the <code>consentStatus<\/code> for all possible values.<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>consentStatus<\/code><\/td>\n<td>Status of consent. Possible values: <ul><li><strong>received<\/strong>: The consent data have been received. The request will need to be repeated to check if its status updates to \"valid\" for use.<\/li><li><strong>rejected<\/strong>: The consent data have been rejected. This is a final status.<\/li><li><strong>valid<\/strong>: The consent is accepted and valid.<\/li><li><strong>revokedByPsu<\/strong>: The consent has been revoked by the account holder.<\/li><li><strong>expired<\/strong>: The consent expired.<\/li><li><strong>terminatedByTpp<\/strong>: The third-party provider has terminated the consent.<\/li><\/td>\n<\/tr>\n<tr>\n<td><code>psuMessage<\/code><\/td>\n<td>Details regarding the account holder's consent.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"consentStatus\\\": \\\"valid\\\",\\n    \\\"psuMessage\\\": \\\"The consent is accepted and valid for GET account data calls and others as specified in the consent object.\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2>Check the authorization status of an account holders consent<\/h2>\n<p>To get information about consent authorization and to determine where your account holder is in the authentication flow, for accessing account information, or to initiate payments:<\/p>\n<ol>\n<li>\n<p>Make a GET <code>\/consents\/{consentId}\/authorisations\/{authorization-id-consent}<\/code> request, where <code>consent_id<\/code> is a unique identifier for a specific consent and <code>authorization-id-consent<\/code> is a unique identifier for a specific consent authorization.<\/p>\n<ul>\n<li>Note that this <code>authorization-id-consent<\/code> can be found in the <a href=\"\/pt\/business-accounts\/oauth-flow#create-a-consent\">create a consent<\/a> response. This is the last set of characters at the end of the<code>scaStatus<\/code> link.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Get authorization details'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl  'https:\\\/\\\/openbanking-psd2-test.adyen.com\\\/obeu\\\/consent\\\/v1\\\/consents\\\/{consent-id}\\\/authorisations\\\/{authorization-id-consent}' \\\\\\n--header 'X-Request-ID: {your-request-id}' \\\\\\n--header 'Authorization: Bearer {access-token}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>The response contains the authorization status, use this to determine what part of the authentication flow your account holder is currently in. See <code>scaStatus<\/code> for all possible values.<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>scaStatus<\/code><\/td>\n<td>Status of authorization. Possible values: <ul><li><strong>scaMethodSelected<\/strong>: The account holder\/third-party provider has selected the related Strong Customer Authentication (SCA) routine.<\/li><li><strong>started<\/strong>: The addressed SCA routine has been started.<\/li><li><strong>finalised<\/strong>: The SCA routine has been finalized successfully (including a potential confirmation command). This is a final status of the authorization resource. <\/li><li><strong>failed<\/strong>: The SCA routine failed. This is a final status of the authorization resource.<\/li><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"scaStatus\\\": \\\"finalised\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2>Check consent details of an account holder<\/h2>\n<p>To retrieve the details of a previously granted consent, such as the consent status, expiration date, scope, and other related information:<\/p>\n<ol>\n<li>\n<p>Make a GET <code>\/consents\/{consent_id}<\/code> request, where <code>consent_id<\/code> is a unique identifier for a specific consent.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Get consent details'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl  'https:\\\/\\\/openbanking-psd2-test.adyen.com\\\/obeu\\\/consent\\\/v1\\\/consents\\\/{consent-id}' \\\\\\n--header 'X-Request-ID: {your-request-id}' \\\\\\n--header 'Authorization: Bearer {access-token}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Check the response for details about account access, validity period, consent status, and links to available resources.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"access\\\": {\\n        \\\"accounts\\\": [\\n            {\\n                \\\"iban\\\": \\\"NL57INGB4654188101\\\"\\n            }\\n        ],\\n        \\\"balances\\\": [\\n            {\\n                \\\"iban\\\": \\\"NL57INGB4654188101\\\"\\n            }\\n        ],\\n        \\\"transactions\\\": [\\n            {\\n                \\\"iban\\\": \\\"NL57INGB4654188101\\\"\\n            }\\n        ]\\n    },\\n    \\\"recurringIndicator\\\": true,\\n    \\\"validUntil\\\": \\\"2023-10-12\\\",\\n    \\\"frequencyPerDay\\\": 10,\\n    \\\"lastActionDate\\\": \\\"2023-07-14\\\",\\n    \\\"consentStatus\\\": \\\"valid\\\",\\n    \\\"_links\\\": {\\n        \\\"account\\\": {\\n            \\\"href\\\": \\\"aisp\\\/v1\\\/accounts\\\"\\n        }\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2>Delete a consent<\/h2>\n<p>Revoking consent withdraws the account holder's authorization to access account information or initiate payments. To revoke a previously granted consent:<\/p>\n<ol>\n<li>\n<p>Make a DELETE <code>\/consents\/{consent_id}<\/code> request, where <code>consent_id<\/code> is a unique identifier for a specific consent.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Delete a consent'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl  --request DELETE 'https:\\\/\\\/openbanking-psd2-test.adyen.com\\\/obeu\\\/consent\\\/v1\\\/consents\\\/{consent-id}' \\\\\\n--header 'X-Request-ID: {your-request-id}' \\\\\\n--header 'Authorization: Bearer {access-token}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>If the deactivation was successful, you'll get an <strong>HTTP 200 OK<\/strong> response. The <code>revokedByPsu<\/code> status will appear in future calls when you <a href=\"#check-if-the-account-holder-granted-consent\">check if the account holder granted consent<\/a>.<\/p>\n<\/li>\n<\/ol>","url":"https:\/\/docs.adyen.com\/pt\/business-accounts\/consent","articleFields":{"description":"Learn how to manege user consent with our dedicated API endpoints.","feedback_component":true,"id":"31504141","type":"page","_expandable":{"operations":""},"status":"current","next_steps":[{"title":"AISP interface","description":"Learn how to consume our dedicated AISP endpoints.","url":"\/business-accounts\/aisp","required":false},{"title":"PISP interface","description":"Learn how to consume our dedicated PISP endpoints.","url":"\/business-accounts\/pisp","required":false},{"title":"PIISP interface","description":"Learn how to consume our dedicated PIISP endpoints.","url":"\/business-accounts\/piisp","required":false}],"parameters":{"directoryPath":"\/business-accounts","model":"balance platform"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/business-accounts\/consent","title":"Manage consent","content":"After an account holder gives their consent, the third-party provider can check if it is still valid and see what they consented to. If an account holder wants to withdraw their consent, the third party provider can make a call to revoke that consent.\nThis page explains how you, as a third-party provider, use the \/consents endpoint to:\n\nCheck if an account holder's consent is still valid and how a third party provider can use the consent.\nRevoke consent on the account holder's behalf.\n\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nNot applicable; this documentation is intended for third-party providers.\n\n\nSetup steps\nBefore you begin, you must:  Complete the Adyen onboarding steps.Complete the get account holder consent steps..\n\n\n\nCheck if the account holder granted consent\nTo get the status of a previously granted consent:\n\n\nMake a GET \/consents\/{consent_id}\/status request, where consent_id is a unique identifier for a specific consent. This is the consent_id you saved in the create a consent step. In the headers, include a UUID for the X-Request-ID and the access_token you saved in the get and access token step.\n\n\n\n\n\nIn the response, check the consentStatus. This value indicates your current stage in the consent process. See the consentStatus for all possible values.\n\n\n\nParameter\nDescription\n\n\n\n\nconsentStatus\nStatus of consent. Possible values: received: The consent data have been received. The request will need to be repeated to check if its status updates to \"valid\" for use.rejected: The consent data have been rejected. This is a final status.valid: The consent is accepted and valid.revokedByPsu: The consent has been revoked by the account holder.expired: The consent expired.terminatedByTpp: The third-party provider has terminated the consent.\n\n\npsuMessage\nDetails regarding the account holder's consent.\n\n\n\n\n\n\n\n\nCheck the authorization status of an account holders consent\nTo get information about consent authorization and to determine where your account holder is in the authentication flow, for accessing account information, or to initiate payments:\n\n\nMake a GET \/consents\/{consentId}\/authorisations\/{authorization-id-consent} request, where consent_id is a unique identifier for a specific consent and authorization-id-consent is a unique identifier for a specific consent authorization.\n\nNote that this authorization-id-consent can be found in the create a consent response. This is the last set of characters at the end of thescaStatus link.\n\n\n\n\n\n\nThe response contains the authorization status, use this to determine what part of the authentication flow your account holder is currently in. See scaStatus for all possible values.\n\n\n\nParameter\nDescription\n\n\n\n\nscaStatus\nStatus of authorization. Possible values: scaMethodSelected: The account holder\/third-party provider has selected the related Strong Customer Authentication (SCA) routine.started: The addressed SCA routine has been started.finalised: The SCA routine has been finalized successfully (including a potential confirmation command). This is a final status of the authorization resource. failed: The SCA routine failed. This is a final status of the authorization resource.\n\n\n\n\n\n\n\n\nCheck consent details of an account holder\nTo retrieve the details of a previously granted consent, such as the consent status, expiration date, scope, and other related information:\n\n\nMake a GET \/consents\/{consent_id} request, where consent_id is a unique identifier for a specific consent.\n\n\n\n\n\nCheck the response for details about account access, validity period, consent status, and links to available resources.\n\n\n\n\n\nDelete a consent\nRevoking consent withdraws the account holder's authorization to access account information or initiate payments. To revoke a previously granted consent:\n\n\nMake a DELETE \/consents\/{consent_id} request, where consent_id is a unique identifier for a specific consent.\n\n\n\n\n\nIf the deactivation was successful, you'll get an HTTP 200 OK response. The revokedByPsu status will appear in future calls when you check if the account holder granted consent.\n\n","type":"page","locale":"pt","boost":18,"hierarchy":{"lvl0":"Home","lvl1":"Business accounts","lvl2":"Manage consent"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/business-accounts","lvl2":"\/pt\/business-accounts\/consent"},"levels":3,"category":"","category_color":"","tags":["Manage","consent"]}}
