TypeScript

Description

Only registered partners can use this feature. Unregistered partners may test on the testnet using the secret key provided in the sample code.

This is a feature required to build the point payment system. Please create a wallet to be used for payments, and provide its address to the loyalty system operations team.

Please create a wallet to be used with this feature and provide the wallet address to the loyalty system operations team.

  • For the testnet, the wallet's secret key to be used is: 0xa0dcffca22f13363ab5d109f3a51ca99754cff4ce4c71dccc0c5df7f6492beee

  • For the mainnet, create a wallet independently and deliver only its public address to the operations team.


Development and Operation

Follow the steps below to proceed:

Development and Testing:

  1. First, install the user app and set the network to testnet.

  2. Review the test code and implement the necessary features. When creating PaymentClient, use the wallet's private key: 0xa0dcffca22f13363ab5d109f3a51ca99754cff4ce4c71dccc0c5df7f6492beee (for testnet).

  3. Note: Testnet store IDs begin with “0x0003”.

Switching to Mainnet:

  1. Generate a new wallet and use its private key to create PaymentClient. You may use a wallet generated using MetaMask.

  2. Send the wallet address created in step 1 to the KIOS operations team.

Cautions:

  1. Both testnet and mainnet are always active, so ensure the system can handle both networks in the future.

  2. If the store ID of the POS or KIOSK starts with "0x0003", use testnet information for PaymentClient. If the store ID starts with "0x0004", use mainnet information.

  3. SMS functionality is available only in Korea.


SDK

Sample Code

1. Define the private keys for a wallet by network

Please use the registered value for the test net, generate the key to be used on the main net, and pass only the address to the KIOS operation team

2. To determine the type of network

The type of network is determined by the shopID.

3. Creating a Client

4. Implementing a PaymentEventListener

This is the part that implements logic when an event that occurs in the point payment process is received.

5. Creating a TaskEventCollector

This is all about collecting events that occur during the point payment process.

6. Starting Event Collector

7. Starting New Payment

8. Stopping New Payment

9. Starting Cancel Payment

10. Stopping Cancel Payment

11. Stopping Event Collector

Last updated