Merchant Presents QRC

This guide outlines the process of integrating the Merchant Presents QRC workflow to enable secure, QR code-based payment processing. By following these steps, developers can streamline customer transactions, improve payment efficiency, and ensure robust handling of API, QR code generation, and webhook notifications.

This guide provides step-by-step instructions for integrating the Create QRC API into an in-store POS system to enable seamless QR code-based payment processing. In this flow, the POS system generates a QR code linked to a unique transaction, which the customer scans using their mobile digital wallet to complete the payment securely. The POS system handles the following key tasks:

  1. QR Code Generation: The POS system calls the Create QRC API to generate a transaction-specific QR code that is displayed to the customer.
  2. Webhook Handling: The POS listens for webhook notifications from Pockyt to receive real-time updates on the transaction status.
  3. Transaction Verification (Optional): The POS can query the transaction status via the tran-query API if a webhook response is delayed or not received.

🚧

Pre-Requisites

Create QRC API Credentials:merchantNo, storeNo, and `apiToken.

POS Setup:A customer-facing display capable of showing images or HTML content.

Step-by-Step In Store Payments Workflow

📘

API References for Endpoints in this Workflow:


Step 1: Customer Approaches POS

Action: The customer indicates they are ready to pay using their digital wallet (e.g., Alipay, WeChat Pay). The cashier selects the appropriate payment method on the POS system to initiate the transaction.


Step 2: Generate QR Code

Action: The POS system calls the Pockyt API to generate a QR code that the customer can scan to initiate payment.

API Endpoint:

Description: This endpoint returns a unique QR code and transaction number that the customer will use to make the payment via their digital wallet. The POS displays the QR code on a customer-facing screen.


Step 3: Customer Scans QR Code and Confirms Payment

Action: The customer uses their mobile wallet app to scan the QR code.

  1. The QR code opens a payment URL in the wallet app.
  2. The customer reviews the transaction details and confirms the payment.

🔐

The wallet provider securely processes the transaction in coordination with Pockyt.


Step 4: Handle Webhook Notifications

Action: Once the payment is processed, the Pockyt API sends a webhook notification to the POS system with the payment result.

  • The webhook contains the final transaction status (e.g., success, failed).
  • The POS should listen for this webhook and update the transaction record accordingly.

👍

Payments should only be considered complete if the webhook reports a "success" status.


Step 5: (Optional) Query Transaction Status

Action: If the webhook is delayed or not received, the POS can query the transaction status manually.

API Endpoint:

Description: Use this endpoint to confirm the status of the transaction using the transaction number provided during QR code creation.


Step 6: Complete Transaction and Print Receipt

Action: Once payment is confirmed (via webhook or status query):

  1. The POS finalizes the transaction internally.
  2. A receipt is generated and either printed or sent digitally to the customer.
  3. The customer receives a confirmation notification from their digital wallet provider.

🧾

Issuing a receipt helps provide assurance and maintain transaction records.