Payment process

Init page

The figure above shows the interaction between customer, merchant and the payment system to process a payment. The payment proceeds in the following steps:

  1. The customer selects items to buy in the merchant service. Next, the customer finalize the busket and initiate a payment process.
  2. The merchant collects the data about selected items and assigns a price and currency which the customer has to pay. For instance, the merchant wants the customer pay 100 THB for subscription for VPN service. Next, the merchant makes API call to the Thai Digital Wallet that creates an invoice with that information.
  3. The merchant service redirects the customer to the invoice page using the URL that is returned at invoice’s creation time.
  4. The customer views the invoice and selects a cryptocurrency which they want to pay with. Thai Digital Wallet allocates a corresponding address to the selected currency.
  5. The customer makes the payment in the selected currency. Thai Digital Wallet detects this payment and waits until the payment is finalized. At the point the customer can refund or send missing funds if they send wrong amount.
  6. When the invoice is fully paid the customer is redirected back to the merchant. Merchant can check the status of invoice by API call.