Customer Presented QRC
API Endpoints Mentioned in this Guide
Customer-Presented QR Code Payment Scenario: In-Store User Workflows and API Interactions
This scenario outlines the steps involved in a customer-presented QR Code payment process, typically occurring in an in-store retail setting with a Point-of-Sale (POS) system.
-
Transaction Initiation:
- A customer approaches the checkout with their selected items. The POS manager prepares an itemized bill for these items.
-
Payment Method Selection:
- When asked for the preferred payment method, the customer opts to pay via a digital wallet. The POS manager selects the 'Digital Wallet' option on the POS system.
-
API Call for Transaction ID:
- The POS system initiates a call to Pockyt’s "/add" API to generate a transaction ID.
POST https://mapi.yuansfer.com/app-instore/v3/add
- The system then analyzes the response to retrieve and store the transaction number.
-
QR Code Presentation and Scanning:
- The customer presents their digital wallet’s QR code for the POS manager to scan.
-
Processing the Payment:
- The POS system calls Pockyt’s “/prepay” API to process the payment through the digital wallet.
POST https://mapi.yuansfer.com/app-instore/v3/prepay
-
Polling for Transaction Status:
- The POS system continuously checks the transaction status using the “/tran-query” API.
POST https://mapi.yuansfer.com/app-data-search/v3/tran-query
- Meanwhile, the customer is prompted on the POS interface to confirm the transaction.
-
Payment Confirmation and Notification:
- After the customer confirms, the digital wallet server completes the payment and informs Pockyt.
- Pockyt then updates the POS system with the transaction status.
See the Guide to Handling Payment Notifications Here:
-
Completion and Receipt Generation:
- A 'success' message is displayed to the customer, and the POS system generates a receipt documenting the transaction details.
This workflow demonstrates the seamless integration of Pockyt's APIs in an in-store retail environment, enabling efficient and secure digital wallet transactions.
User Workflows and API Interactions
Imagine an in-store retail environment that features a customer checkout Point-of-Sale (POS) system.
- A customer approaches the POS manager who drafts an itemized bill for the ‘outgoing merchandise’.
- Upon inquiry, the consumer reveals that they would like to pay using a digital wallet. The POS manager selects ‘Digital Wallet’ which prompts the Point-of-Sale to call the "/add” API for the creation of a transaction ID.
POST https://mapi.yuansfer.com/app-instore/v3/add
curl -XPOST -d '{
"merchantNo": "200043",
"storeNo": "300014",
"verifySign": "c29c8240bf99510d4d53a0ca36f9c135",
"amount": "13",
"currency": "USD",
"settleCurrency": "USD",
"reference": "test202001011206"
}' '<https://mapi.yuansfer.com/app-instore/v3/add'>
- At the same time, the Point-of-Sale analyzes the response message from the /add API to identify and store the transaction number.
Once the transaction ID is created, the customer will present a QR code to the POS manager for scanning. - As the QR code is scanned, the POS system calls Pockyt’s “/prepay” API to process the digital wallet payment.
POST https://mapi.yuansfer.com/app-instore/v3/prepay
curl -XPOST -H "Content-type: application/json" -d '{
"merchantNo": "200043",
"storeNo": "300014",
"verifySign": "f38965887c5676e2fb19d951251eb613",
"transactionNo": "297553636764407286", "paymentBarcode": "286498530672949108",
"vendor": "alipay"
}' '<https://mapi.yuansfer.com/app-instore/v3/pay'>
- The POS manager now polls for the transaction status using the “/tran-query” API and the customer sees a UI prompting them to confirm the transaction.
POST https://mapi.yuansfer.com/app-data-search/v3/tran-query
curl -XPOST -H "Content-type: application/json" -d '{
"merchantNo": "200043",
"storeNo": "300014",
"transactionNo": "297553638300708562",
"verifySign": "0df745088d7202a6d186596acdc82c6a"
}' '<https://mapi.yuansfer.com/app-data-search/v3/tran-query'>
- Upon confirmation, the digital wallet server processes the payment and notifies Pockyt about the completed transaction.
- Pockyt relays the transaction status to the POS system and a ‘success’ message appears on a customer-facing display.
- It is now time for the POS system to generate a customer receipt that records the entire transaction information.
Updated 11 months ago