- go-sample-frontend: the React front end, shared by all three sample apps.
- go-sample-backend-java: the Java backend.
- go-sample-backend-typescript: the TypeScript backend.
What this tutorial covers
By the end, you’ll have a player sign-up application that:- Starts a verification journey through the Go Journey API v2.
- Renders each screen from the journey’s own configuration, rather than from hardcoded forms.
- Collects identity details, contact details, a current and previous address, a photo ID, and a selfie.
- Confirms the player meets the age requirement and screens them for financial vulnerability.
- Polls for the outcome and shows the decision, including a referral to manual review.
This is the API sample app tutorial. It covers the API-first integration only, and does not cover the SDK or hosted journeys. For how the sample apps are built and what they share, see the Sample applications overview.
Prerequisites
- Access to the Go dashboard, with permission to create and publish journeys.
- Licences for the modules this tutorial uses. Licences are assigned to your department by GBG, and an unlicensed module shows a warning icon in the Journey builder.
- An API client. See Manage API clients for how to create one and get your client ID and secret.
- Node.js v18 or higher, for the front end and the TypeScript backend.
- JDK 21 and Maven, only if you choose the Java backend.
- Git, to clone the sample repositories.
Part 1: Build the journey
The application renders its screens from whatever your journey collects, so the journey comes first. A gaming journey has two obligations beyond confirming identity. It has to establish that the player is old enough, and it has to flag signs of financial vulnerability so that safer gambling measures can follow. The finished journey looks like this. Nine modules run in sequence, then one evaluation node routes the player to accept, reject, or manual review.
The gaming age verification journey
1
Add the modules
In the Journey builder, add these modules in order:For instructions, see Configure modules.
Select the v2 variant of each document module, for example Document Classification v2 rather than Document Classification. The v2 variants are built for this API.
2
Set the country on Address Verification
Address Verification takes the country from its own settings rather than from the player’s address, so it needs setting before the journey runs.
- Click the Address Verification (Global) module in the journey.
- Click Settings.
- In the Country field, enter the ISO3 code for the country you verify addresses in, for example
GBR. - Click Save all settings.
ISO3 codes are the GO platform convention, so
GBR, FRA or DEU. An ISO2 code such as GB is also accepted. For US addresses, use the dedicated US variant instead, which is certified for USPS DPV and CASS.3
Add the evaluation
Add an Evaluation node after the modules and configure these three decisions. For how to add and configure one, see Set up evaluation.
Set the classification on each decision as shown. The application reads it to choose a result screen, where
positive renders an approval, negative a decline, and neutral a referral to manual review.Give each decision branch an End of journey node.4
Publish to Preview
Click Publish to Preview. You’ll see the confirmation message Delivery deployed successfully.Use Preview while you build and test. Publish to Production when you’re ready for real players. The application works the same against either, and only the resource ID changes.
5
Copy the resource ID and version
Go to Dashboard in the Journey builder and copy the Resource ID and Version number.You’ll combine them as
<resourceId>@<version>, for example:Part 2: Set up the backend
Clone the backend in the language you prefer. Both expose the same HTTP API, so the front end works with either.- Java
- TypeScript
.env.local in the repository root:src/main/resources/application-ridgeline-play.yml and set your journey:http://localhost:8083. The script finds JDK 21, loads .env.local, and starts the right profile.live command is what switches them to your real journey.
Set your region
The samples default to the EU platform. If your tenant was provisioned elsewhere, then change the base URL and the region together:- Java
- TypeScript
In
application-ridgeline-play.yml:Part 3: Set up the front end
The front end is one repository holding three applications. This tutorial uses the gaming one.apps/ridgeline-play/.env.local:
NEXT_PUBLIC_* values are compiled into the browser bundle. Never put credentials here. They belong in the backend’s .env.local.http://localhost:3002. With the backend already running, you’ll land on the first screen of your own journey.
If you see the Sign up screen, the whole chain is working, from the browser through the front end and backend to GBG Go.
Troubleshooting
The address screen keeps coming back
The address screen keeps coming back
This journey asks for six address components rather than the three some journeys use, so a screen plan written against a shorter address submits an incomplete element and the journey stays on that screen.
The app shows a generic 'A few more details' form
The app shows a generic 'A few more details' form
The screen plan doesn’t recognise something the journey collects, so the app falls back to a plain form rather than stalling.This usually means the journey changed after the plan was written. Check the backend log for
No screen mapped for outstanding elements, which names the unmapped elements, then add them to the screen plan.A screen asks for details the customer already entered
A screen asks for details the customer already entered
The journey’s required fields changed under the same resource ID. A republish can add required elements, so an address that needed three components can come back needing six, and a screen plan written against the old shape submits an incomplete element.Re-read
collects after every republish rather than assuming the shape holds.Every request fails with an expired session
Every request fails with an expired session
The backend keeps sessions in memory, so restarting it invalidates every session in progress. Start a new journey.For the same reason, the samples run one journey per browser tab. The session ID lives in
sessionStorage, so reloading resumes the journey, but a new tab starts a fresh one.Authentication succeeds but journey calls fail
Authentication succeeds but journey calls fail
The region is mismatched. The token endpoint is global, so authentication works regardless, but journey calls go to a regional host. Check that
region and base-url name the same region.A module returns an error rather than a decision
A module returns an error rather than a decision
A module that errors is different from one that declines, because nothing was decided about the customer.Open the journey in the Investigation portal and look at the failing step. It carries an error code, a problem description, a suggested action, and a correlation ID. Quote the correlation ID when contacting support, because it identifies the exact execution.
Next steps
Review the outcome
See the journeys you ran, module by module, in the Investigation portal.
Configure outcomes
Change what each module reports, and how your evaluation turns those into decisions.
Publish to Production
Move from Preview to Production when you’re ready for real customers.
Explore the API
The full Journey API v2 reference.