Links

Customer Presented Workflow

Payment Scenarios and API Endpoints

Customer Presented QRC API Call Sequence

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.
Last modified 6mo ago