Reference Number Use Case

Overview

Tokenized FOP can support reference number use case. A user who wants to pay for goods generates a reference number through the Payment integrator. The user then takes this reference number to a convenience store, kiosk, or bank and pays the reference number.

Cash FOP also supports reference number use case. The major difference between Tokenized FOP and Cash FOP is that, Tokenized FOP requires Association and supports Refunds, Cash FOP doesn't require Association and doesn't support Refunds. This document describes how the integration will work for Reference Number Use Case.

At a high level, integration involves these flows:

  1. Authentication flow
  2. Association flow
  3. Purchase flow (Same as Cash FOP)
  4. Refund flow
  5. Remittance flow

Purchase flow will be the same as Cash FOP Purchase flow.

Example of an integration using web redirect authentication.

Authentication flow

API implemented by integrator: Web Authentication.

Association flow

API implemented by integrator: associateAccount on Payment Integrator Hosted Tokenized FOP API.

Purchase flow

API implemented by integrator: generateReferenceNumber and cancelReferenceNumber on Payment Integrator Hosted Tokenized FOP API.

API implemented by Google: referenceNumberPaidNotification on Google Hosted Tokenized FOP API.

Refund flow

API implemented by integrator: refund on Payment Integrator Hosted Tokenized FOP API.

Remittance flow

API implemented by integrator: See Payment Integrator Hosted Remittance API.

API implemented by Google: See Google Hosted Remittance API.

How all flows fit together

Create Instrument

On Google's UI, a user is redirected to an integrator hosted web page to do Web Authentication. After successful authentication, the user is redirected back to Google. And then Google will call associateAccount. The requestId in authenticationResponse will be the authenticationRequestId of associateAccount request. After successful association, Google stores googlePaymentToken(GPT) and other metadata as an instrument for the user.

Create Instrument - Authentication flow

Web Authentication Flow

Create Instrument - Association flow

Association flow diagram

Generate reference number

When the user wants to buy goods/services with the instrument, Google calls generateReferenceNumber with GPT. The requestId within the header of the generateReferenceNumber request will be used to identify the transaction for related APIs.

Cash Generate Reference Number

Pay reference number

After the user pays the reference number offline, integrator will call referenceNumberPaidNotification. The requestId within the header of the generateReferenceNumber request will be the generateReferenceNumberRequestId of referenceNumberPaidNotification request.

Pay reference number flow

Cancel a transaction

If the user decides to cancel the transaction before paying, Google will call cancelReferenceNumber. The requestId within the header of the generateReferenceNumber request will be the generateReferenceNumberRequestId of cancelReferenceNumber request.

Refund a transaction

After the reference number is paid, if the user wants the money back, Google will call refund. The requestId within the header of the generateReferenceNumber request will be the transactionId of refund request.

Refund flow

Remittance

Based on contract, Google will call remittanceStatementNotification to notify integrator when statement is ready. Then, integrator will call Google Hosted Remittance API to perform reconciliation.