Frontend Specifications for UPI Payments & Autopay

Frontend Specifications for UPI Payments & Autopay

Customer Onboarding

Customer onboarding involves registering a device by verifying the user’s mobile number and linking their payment methods to enable smooth transactions. As part of this process, a device fingerprint is created—a unique identifier derived from multiple device attributes—to recognize the device in future transactions.


Generating a Device Fingerprint

A device fingerprint is a distinctive identifier generated from various device details. It ensures that the system can consistently identify the same device for subsequent operations.

Steps to generate a device fingerprint:

  1. Construct a string by combining the following attributes, separated by a pipe (|):

Attribute

Description

Attribute

Description

SSID

Subscriber ID from the device’s SIM module

APP.ID

Application package name

device.UUID

Advertising ID on Android

mobile_number

Customer’s phone number on the device

customer_reference

Unique customer reference

timestamp

Current UNIX timestamp (must match x-device-fingerprint-timestamp in request headers)

Example string format:

SSID|APP.ID|device.UUID|mobile_number|customer_reference|timestamp
  1. Compute the SHA-256 hash of the constructed string:

String deviceFingerprintPayload = "<SSID|APP.ID|device.UUID|mobile_number|customer_reference|timestamp>"; MessageDigest digest = MessageDigest.getInstance("SHA-256"); byte[] deviceFingerprint = digest.digest(deviceFingerprintPayload.getBytes(StandardCharsets.UTF_8));
  1. Include the timestamp in the request headers to ensure consistency.

This fingerprint allows secure recognition of the device for all future interactions, improving both security and user experience.


Device Binding Status

The following table summarizes the possible device binding statuses and their meanings:

Status

Step

Description

Status

Step

Description

mobile_verification_pending

mobile_verification

Mobile number verification is pending. The PSP has not yet received a callback from the verifying entity. Continue polling the API.

mobile_verification_expired

mobile_verification

No callback was received within the expiry period. Device binding has expired. This is a terminal failure; stop polling.

mobile_verification_mismatch

mobile_verification

The mobile number returned by the verifying entity does not match the submitted number. Terminal failure; stop polling.

verified

mobile_verification

Mobile number verification succeeded.

mobile_verification_failed

mobile_verification

Verification failed due to invalid device details.

device_already_verified

device_binding

The device has already been verified.

This table helps track the state of a device during the onboarding process and guides the necessary next actions based on the status.

References:

  1. TPAP Service provider:https://razorpay.com/docs/payments/tpap-pro/

  2. Customer onboarding:https://razorpay.com/docs/payments/tpap-pro/integration-guide/#customer-onboarding