Skip to main content
Beta

In-Car Wallet Implementation

This document goal is to get you started into implementing your brand in-car wallet solution based on Hellgate's technology.

info

If you haven't done so, please refer to the In-Car Payments for an in depth overview and instructions of how to setup your account.

Overview

To have the full experience, we will need a few components:

  • Somewhere where your users will manage their payment methods. This is for example your driver payment profile
  • A consumer application, leveraging the Wallet Consumer SDK. These are the apps collecting payments through your wallet
  • A wallet application, leveraging the In-Car Wallet SDK. This is your branded wallet.

Our focus here is the third bullet, but we will hook you up with the first two.

Your driver cards

The purpose of this document is not to teach you how to manage your users cards on file. For this purpose, we ship a small docker image that will let you simulate that experience and get your cards into hellgate.

info

You can always dive deeper into tokenization by referring to the Hellgate® Tokens documentation.

Make sure you have Docker installed and running in your system.

Create a file somewhere safe in your file system, named hellgate.env, with the following content:

HELLGATE_API_KEY=hg_sndbx_XXX
HELLGATE_BACKEND=https://sandbox.hellgate.io

Replace hg_sndbx_XXX with your actual Hellgate® key.

Now run the image with:

docker run --rm --env-file path/to/your/hellgate.env -p 4711:4711 hgate2sdk.azurecr.io/hellgate-tokenization-app:latest

If everything is running correct you should now be able to use the card management interface, by going to http://localhost:4711. You should be able to see all the cards in your account, if you have any, remove or add more cards, including going through the 3DS authentication process. Please refer to our Test Card Data page to view available test cards.

Card Management Interface

info

This app leverages the Hellgate® Web SDK and the Tokens Management API and is connected with your Hellgate® account as a whole. In a real life scenario, a similar interface would only manage a specific user's cards.

The consumer application

The consumer application is used by your users to buy products in their car. Here they can search for products, browse through them and add them to their shopping basket. To get started this can be as simple as a single button to trigger a predefined payment process. Such a simple app is described in details in the In-Car Payments/Your app documentation. As you will receive the wallet-template archive you will be able to use it as a base for your consumer application. It is part of the android project and can be found in the simpleshop folder, to get you started right away.

The wallet application

The wallet application is the one that will be used by your users to manage their payment methods, create device bindings and view their transactions. In the wallet-template package we are providing you with a simple implementation of the wallet application.

Setup variables

In the MyApplication.kt file there are multiple constants that should be set according to your Hellgate® account. The baseUrl can stay untouched for now as we are aiming to run against the sandbox environment. The API key should be set according to your Hellgate® account / wallet account. Device id and customer id should be set to unique values for your testing, in a production environment the device id need to be identical with the vin number of the car. The customer id also needs to unique in the context of your wallet account, so make sure to use a different one for each customer. The customer email and name can be set to artificial values for the sandbox testing but needs to be provided correctly in a production environment. The customer name should also be aligned with the cardholder name that you used for tokenization since the PaymentMethodClient will filter payment methods that are displayed in the app according to the customer name provided.

info

If you are not seeing any payment methods in the wallet app, please check the customer name you provided in the MyApplication.kt file.

const val BASE_URL = "https://in-car-wallet.fly.dev"

const val API_KEY = "wallet-api-key"
const val DEVICE_ID = "756f65d7d1464719abe9fbdf"

const val CUSTOMER_ID = "customer-tester2-001"
const val CUSTOMER_EMAIL = "tester2@hellgate.io"
const val CUSTOMER_NAME = "Tester2"

class MyApplication : Application() {
...
}