e2e

Spend (Unknown Customer PSD2)

Learn how to enable spending for an unknown customer. This is PSD2 compliant journey.

1

SSO Widget - Log in

Authenticate customer to retrieve their log in token to continue the spend journey. The widget will return a token which will be used in the Customer Journey API and later in spend SCA widget.

2

GetCustomerJourneyDetailsUsingToken

Use the log in token to retrieve the account status, credit limit and balances of the customer. This enables checks on the customer account status and eligibility to spend prior to starting the spend journey.

3

retrieveSpendOptionsForCustomerRef

This endpoint is optional and only applicable If you have multiple spend plans such as instalments. Calling this endpoint with the basket value will return the eligible plans for the customer in the specified order.

4

initiate

This endpoint is only required for PSD2 journeys. It allows you to check if the transaction requires a PSD2 step-up. If it does not, it returns a transaction-exempt token. It also allows for merchant overriding of an exemption. The endpoint will return the SCA widget URL.

5

SCA Widget

This widget is only required for PSD2 journeys. It is hosted as an iframe that enables the initiation, re-issue, and entry of SMS OTPs. It returns the end result of the OTP journey back to the parent frame. Passing the OTP validation will result in an upgraded authorisation token being passed to the parent frame for use within the authorise endpoint.

6

authorise

Authorise a transaction once a spend option has been chosen by completing the required fields for the endpoint. Some fields may have been provided as part of previous responses in the journey, e.g. spend option (optional, defaults to revolving credit if not provided) and PSD2 authorisation token.

7

settle

Settle the authorisation once the order has been received using the authorisation ID passed from the previous endpoint.

Request Example

Request

HTML

1<iframe src="https://id.newdaytechnology.com/newpay/login?sessionId=f925a9d8-53b5-47bd-854e-a9f31e7aa299&redirect_uri="https://pay.deko.finance"></iframe>

Response Example

Response

JSON

1{
2  "hashedUserId": "n5XU5zccSSMVSDlqAiQEqWYgq4pVAzr6AkT9Je8rj7k=",
3  "identityToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ijg2QjdERjk1Q0VBRDJBNzAyMzJBMjUxRTY4MjZGODJFREZCMEVGNzUiLCJ4NXQiOiJocmZmbGM2dEtuQWpLaVVlYUNiNEx0LXc3M1UiLCJ0eXAiOiJhdCtqd3QifQ.eyJpc3MiOiJodHRwczovL2lkcC1hMDYuc3RnLW5ld2RheXRlY2hub2xv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aa299",
8  "success": true
9}