Transaction ID and Its Generation
TransactionId
For calling List endpoint, a mandatory transactionId is required. A transactionId (UUID) would be generated by client and same will be used until the address is selected. Once address is selected, same transactionId will be passed to the listselect endpoint and credit will be charged.
Format of transactionId
transactionId is 36 characters UUID (32 hexadecimal characters and 4 hyphens).
In its canonical textual representation, the 16 octets of a UUID are represented as 32 hexadecimal (base-16) digits, displayed in five groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 hexadecimal characters and 4 hyphens).
For Hexadecimal there are 16 symbols or possible digit values from 0 to 9, followed by six alphabetic characters - A, B, C, D, E and F (not case sensitive).
123e4567-e89b-12d3-a456-426614174000
Examples of Generating transactionId
-
JavaScript
Refer to the following package in the NPM (https://www.npmjs.com/package/uuid).
The following example illustrates the creation of random UUID using UUID package mentioned in the above link:const { v4: uuidv4 } = require('uuid'); var randomUUID = uuidv4(); console.log(randomUUID);
-
Java
In Java , UUID is a class present in java.util. For documentation, refer to the link https://docs.oracle.com/javase/7/docs/api/java/util/UUID.html.
The following example illustrates the creation of random UUID using UUID class present in the java.util package:import java.util.*; class TestClass { public static void main(String[] args) { // Creating the UUID UUID randomUUID = UUID.randomUUID(); // Displaying the UUID System.out.println(" Randomly Generated UUID Is = " + randomUUID.toString()); } }
To generate UUID version 4 for calling APIs from postman, you can use https://www.uuidgenerator.net/version4.