Prerequisites
Before you start, you need to have a Hellgate Cloud account. If you don’t have one yet, you can sign up here. Once you have an account in place, you need to set up an API key, which you can configure in your settings section.Sample project
If you want a quick start, you can use our sample project as a reference. The sample project is a simple web application that demonstrates how to tokenize cardholder data using the Commerce Web SDK. It is also prepared to handle 3D Secure in case the tokenization is set up with Identification & Verification (ID&V) enabled. You can find the sample project on our GitHub.Implementation walkthrough
The following sections walk you through the sample integration of a web project using the Commerce Web SDK. It is intentionally kept simpler than the sample repository, but we keep enough references to understand both.Step 1 - Setup the project
This sample integration will require both server-side and client-side implementation.- On the server-side, you will need to create a session to tokenize cardholder data using the Web SDK.
- On the client-side, you will make use of the session (which is a client-sharable secret) to initialize the Web SDK and request a Commerce token.
Project template
You can use the following template to get started with an implementation.- index.html
- server.js
Step 2 - Create a session
In order to tokenize cardholder data, you need to create a session on the server-side. This session will be used to initialize the Web SDK on the client-side.- server.js
Step 3 - Render the form
Once you have the session, you can render the form on the client-side.- index.js
Step 4 - Tokenize cardholder data
When the form is submitted, you can tokenize the cardholder data using the Web SDK.- index.js