Skip to main content
A consent is the customer’s explicit permission for your application to either access their financial data or make a payment from their account. Unlike traditional payment methods that rely on stored credentials, open banking requires explicit, time-bound customer authorisation for each data access or payment interaction. In Yapily’s API, a consent is an object that represents this permission. It has a status, a token, and a scope. You need a valid consent-token before calling any data or payment endpoint. No data or payment endpoint can be accessed without a valid consent token. Pass it in the Consent header on each request. With Hosted Pages, you receive the consent token automatically at the end of the flow. With the Direct API, you manage the consent flow yourself.
AIS Consent (Data Access)PIS Consent (Payment)
PurposeAccess accounts, balances, transactionsExecute a payment
ValidityReusable for up to 90 days (UK) or 180 days (EEA)Single-use only
ScopeCovers multiple API calls to financial data endpointsCovers one payment execution plus status checks
ReconfirmationRequired every 90 days in UK (new regulation)Not applicable
Re-authorisationPossible when consent expires or failsNot applicable. Create a new consent.
Obtaining via HostedHosted handles the flow, returns consent tokenHosted handles the entire payment including consent
Obtaining via APIPOST /account-auth-requestsPOST /payment-auth-requests
Token used inGET /accounts, GET /accounts/{id}/transactions, enrichment endpointsPOST /payments, GET /payments/{id}
Despite the differences, the authorisation flow is the same for both. See Open Banking 101 for an overview of the flow.
A consent moves through several stages from creation to completion. The exact statuses differ between AIS and PIS consents and depend on the authorisation flow.
1

Create

Your app requests a consent (for data access or a payment).
2

Authorise

The user is redirected to their bank, logs in, and approves. If the user declines, the consent is rejected. If something goes wrong during authentication, the consent fails.
3

Receive token

On success, you receive a consent token to use in API calls.
4

Use

Pass the token in the Consent header to access data or execute a payment.
5

Consent ends

AIS consents expire after 90 days (UK) or 180 days (EEA). PIS consents are single-use. Users can revoke at any time.
AIS and PIS consents follow different status paths after authorisation. See the detailed lifecycles:

Status reference

StatusMeaningWhat to do
AWAITING_AUTHORIZATIONConsent created, waiting for user to approve at bankRedirect user to authorisationUrl
AUTHORIZEDUser has approved. Consent token is valid.Use the token to make API calls
REJECTEDUser declined consent at the bankShow user-friendly message, offer to retry
FAILEDError during authorisationCheck error details, may be retryable
EXPIREDConsent has reached its time limitRequest re-authorisation
AWAITING_SCA_CODEEmbedded flow: waiting for SCA code from userSubmit the code via update endpoint
AWAITING_SCA_METHODEmbedded flow: user must select SCA methodPresent options, submit selection
AWAITING_DECOUPLINGDecoupled flow: user must approve on another devicePoll for status change
AWAITING_RE_AUTHORIZATIONRe-authorisation in progressRedirect user to the bank to re-authorise
AWAITING_FURTHER_AUTHORIZATIONConsent is authorised by one of the account holdersWait for all users complete the flow
AWAITING_DECOUPLED_PRE_AUTHORIZATIONDecoupled flow: Authentication initiatedRedirect user to the bank
AWAITING_PRE_AUTHORIZATIONPre-Auth flow: Authentication initiatedRedirect user to the bank
AWAITING_DECOUPLED_AUTHORIZATIONDecoupled flow: Authentication initiatedWait for user to complete the flow on another device
PRE_AUTHORIZEDPre-Auth flow: User has approved. Consent token is validContinue on the Pre Auth flow steps
CONSUMEDPayment is executedThis is a terminal state of a payment
INVALIDInvalid consentCheck the consent details. Create a new consent if needed
REVOKEDUser revoked consent directly at their bankCannot be restored. Create a new consent.
UNKNOWNDefault enum valueShould not occur in normal flows
If you are using Hosted Pages, status transitions are managed for you. You receive the final outcome (authorised consent token, or a failure status) via webhook or polling.

Managing AIS consents

AIS consents have limited validity: 90 days in the UK, 180 days in the EEA. Use the re-authorisation endpoint to request the user re-approve access. Re-auth follows the same redirect flow as the original consent. Important: Re-auth is only supported for redirect flows, not embedded flows. See: Re-authorise Account Consent

Reconfirmation (UK only)

FCA regulation requires UK AISPs to reconfirm consent every 90 days. This is separate from re-authorisation. Reconfirmation does not require the user to visit their bank. If using Yapily Connect: Call the Extend Consent endpoint with lastConfirmedAt to record when you last confirmed with the user that they still want data access. If you are a regulated AISP: Capture reconfirmation in your own UI (a simple “yes, I still want you to access my data” prompt), then call the same endpoint. Key fields:
  • lastConfirmedAt: Timestamp when the user last confirmed
  • reconfirmBy: Deadline for the next reconfirmation
If reconfirmation is not received by the reconfirmBy date, Yapily will block further data access for Yapily Connect customers. Reconfirm before this deadline to avoid interruption.
Learn more:

Historical data window

Some banks limit historical transaction access to the first 5 minutes after consent creation. This is a bank-level restriction that Yapily cannot override. Recommendation: Retrieve and store historical data immediately after receiving the consent token. Do not wait hours or days to make your first data request if you need historical transactions. See: Data Restrictions

Revoked consents

Users can revoke consent at their bank at any time, bypassing your application entirely. When this happens, the consent status may still show AUTHORIZED in Yapily’s system, but API calls will return 403 Forbidden. If you get persistent 403 errors on an AUTHORIZED consent, the consent has likely been revoked at the bank. You cannot restore a revoked consent. Create a new consent to regain access.

Managing PIS consents

Single-use nature

PIS consent tokens are single-use. Once used to execute a payment, the token can only be used to check payment status. You cannot use the same consent token to make another payment. For each new payment, you need a new consent. This is a regulatory requirement, not a Yapily limitation.

Multiple authorisations

Some business and joint accounts require more than one person to approve a payment. When this happens, the payment remains in PENDING status until all authorisations are received. The multiAuthorisationStatus object on the payment shows progress. You can see how many authorisations are required and how many have been completed. Additional authorisations happen offline (phone, email, SMS) and are outside Yapily’s control. You cannot trigger or expedite these. Monitor via GET /payments/{paymentId} or webhooks. See: Payment Consents
FieldWhat it meansWhen you’ll use it
idUnique identifier for this consentStore this to manage the consent lifecycle
consentTokenThe token you pass as the Consent header in API callsRequired for every data or payment API call
statusCurrent state of the consent (see status table above)Check before making API calls
institutionIdThe bank this consent is forA consent is bank-specific, one per institution
featureScopeWhat the consent covers (e.g., ACCOUNT, ACCOUNT_TRANSACTIONS)Determines which API endpoints you can call
lastConfirmedAt(AIS, UK) When the user last reconfirmed consentUse to manage reconfirmation schedule
reconfirmBy(AIS, UK) Deadline for next reconfirmationSet reminders to avoid access interruption
createdAtWhen the consent was createdTrack consent age
expiresAtWhen the consent will expirePlan re-auth before this date
For the complete field-by-field schema, see the Consent object in the API Reference.

Common pitfalls

The following issues are frequently encountered during integration:
  • AUTHORIZED but getting 403 errors: The consent was likely revoked at the bank. Create a new consent.
  • Cannot retrieve historical transactions: Many banks limit historical access to 5 minutes after consent creation. Retrieve data immediately.
  • Consent expired unexpectedly: UK consents last 90 days, EEA 180 days. Re-authorise proactively before expiry.
  • Multiple consent tokens returned: Some banks return one consent per account. See Multiple Consents.
  • Reconfirmation vs re-authorisation: Reconfirmation (UK only) does not require bank login. Re-authorisation does.