Embedded Acquisition
Learn how to embed our Acquisition Journey onto your website within an iFrame.
Overview
Background
Under current GDPR and CPRA regulations, browsers are required to automatically block cookies set by third-party domains. Our acquisition application relies on cookies. If you want to embed it within an iFrame, there are some pre-requisites for the application to be functional.
If the domain setting the cookie in the browser (the iFrame src) differs from the hosting domain (your website, where the iFrame is embedded), the browser prevents the cookie from being set. This can be avoided by making some adjustments at the DNS record and certificate levels, as documented in the step-by-step guide below.
Step-by-Step Guide
Suppose your website's root domain is www.mywebsite.co.uk, and you want to embed our Acquisition Journey into an iFrame on a specific page, such as www.mywebsite.co.uk/apply.
Choose a Subdomain for the Embedded App
Select a subdomain within your domain, such as apply.mywebsite.co.uk
. This will host our application securely in an iFrame.
Add a Verification CNAME Record
Name: afdverify.apply
Points to: the Front Door resource we provide, e.g.,afdverify.apply.newdaycards.co.uk
This is a one-time setup for verification.
NewDay Provides a Certificate Signing Request (CSR)
NewDay will send you a Certificate Signing Request (CSR) file, which you can use to obtain a digital certificate (SSL/TLS) for apply.mywebsite.co.uk
.
Purchase the SSL/TLS Certificate
Coordinate with your account manager for the purchase an SSL/TLS certificate for apply.mywebsite.co.uk
using the CSR provided. Once the certificate is ready, we will upload it into our deployment system, and configure it to work with apply.mywebsite.co.uk
.
Create a CNAME to Route Your Subdomain to NewDay’s Service
apply.mywebsite.co.uk
to our Front Door:Name: apply
Points to: the Front Door resource we provide, e.g.,apply.newdaycards.co.uk
apply.mywebsite.co.uk
is directed to our application.Additional Information
Repeat for Each Environment: You’ll need to repeat these steps for any additional environments (such as testing or production).
Ownership: DNS and SSL/TLS certificate management is handled by you, the root domain owner.
SSL/TLS Certificates: These certificates secure your subdomain, enabling encrypted (HTTPS) connections, which ensures data privacy and allows cookies to function properly across browsers.
Embed our Acquisition Journey
To embed the application, copy and paste the code below into the UI where you want the widget to be displayed.
Javascript
1<iframe src="https://apply.mywebsite.co.uk/<brand>/online/<product>/quote"></iframe>
Parameter | Description |
---|---|
brand (required) | Your brand in a lowercased string format |
product (required) | Your product in a lowercased string format |
Communication from our widget to the parent page
End of journey update
We will send a post message to the parent page to notify of the end of the journey in the following format.
Code Sample
Node + Request
1{
2 success: <false|true>,
3 status: <status>,
4 message: <message>,
5 appId: <applicationId>,
6 customerRef: <customerRef>,
7}
Status | Meaning |
---|---|
techError | Unexpected Technical Error |
quotedecline | Applicant declined at check eligibility |
dupeapplication | An application with for the same applicant already exists |
decline | Applicant declined at apply |
adverseBureau | Applicant declined at apply |
affordability | Applicant declined at apply |
otherBureau | Applicant declined at apply |
score | Applicant declined at apply |
refer | Not possible to onboard the applicant, more checks required |
appexpired | The application has expired |
appcomplete | The application has been completed, but boarding failed |
appboarded | The application has been completed and boarded (only successful scenario) |
Giving back control
Our widget will request the parent to take back control and redirect the user to a different screen (e.g. change payment method) using a post message in the following format.
Code Sample
Node + Request
1{
2 action: <action>,
3 appId: <applicationId>,
4 customerRef: <customerRef>,
5}
Action | Meaning |
---|---|
changePaymentMethod | The application could not be completeted and the user has clicked on the button to go back to the payment method screen |
amendMyBasket | The application has been completeted but the basket amount is bigger than the credit limit. The user has clicked the button to change the content of the basket. |
redirectToCheckout | The application has been completeted and the checkout page should be displayed to the user |
You may also like:
Was this page helpful?