Method, apparatus, device and storage medium for electronic payment

CN122840945APending Publication Date: 2026-09-29BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510388446.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

但是,在传统的支付码扫码方案中,用户操作繁琐,需要解锁电子设备,打开支付软件,找到付款码入口,最后展示付款码,以完成被扫支付

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122840945A_ABST
    Figure CN122840945A_ABST
Patent Text Reader

Abstract

According to embodiments of this disclosure, a method, apparatus, device, and computer-readable storage medium for electronic payment are provided. The method includes establishing a communication connection between a terminal device and a near-field communication (NFC) device connected to a cash register; receiving a first message from the NFC device via the communication connection, the first message indicating a payment identifier generated by the NFC device based on a payment request at the cash register; and, in response to receiving the first message, triggering a service device to send a second message to the NFC device, the second message indicating a payment code generated by the service device based on the payment identifier, wherein the payment code is provided to the cash register to complete the payment request using a QR code payment service. In this manner, by reusing existing QR code payment functionality, support for NFC-based payment schemes can be achieved without upgrading or modifying the software and / or hardware of the cash register.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The exemplary embodiments disclosed herein generally relate to the field of computers, and particularly to methods, apparatus, devices, and computer-readable storage media for electronic payments. Background Technology

[0002] E-commerce has become an indispensable part of people's daily lives. Through e-commerce, people can enjoy various services, including but not limited to travel services, purchasing various goods and coupons, etc. Traditional solutions offer a variety of electronic payment methods to meet users' payment needs, such as users showing a payment code to the merchant. However, in traditional payment code scanning solutions, the user operation is cumbersome, requiring them to unlock the electronic device, open the payment software, find the payment code entry, and finally show the payment code to complete the payment. Therefore, there is a need to provide a payment solution that shortens the user's operation path. Summary of the Invention

[0003] In a first aspect of this disclosure, a method for electronic payment is provided. The method includes: establishing a communication connection between a terminal device and a near-field communication (NFC) device, the NFC device being connected to a payment terminal; receiving, via the communication connection, a first message from the NFC device, the first message indicating a payment identifier generated by the NFC device based on a payment request at the payment terminal; and, in response to receiving the first message, triggering a service device to send a second message to the NFC device, the second message indicating a payment code generated by the service device based on the payment identifier, wherein the payment code is provided to the payment terminal to complete the payment request using a QR code payment service.

[0004] In a second aspect of this disclosure, a method for electronic payment is provided. The method includes: generating a payment identifier corresponding to the payment request at a near-field communication device in response to a payment request at a cash register; sending a first message indicating the payment identifier to a terminal device via the near-field communication device in response to a terminal device establishing a communication connection with the near-field communication device; receiving a second message from a service device, the second message indicating a payment code generated by the service device based on the payment identifier received from the terminal device; and the cash register providing the payment code to complete the payment request using a QR code payment service.

[0005] In a third aspect of this disclosure, an apparatus for electronic payment is provided. The apparatus includes: a first connection module configured to establish a communication connection between a terminal device and a near-field communication (NFC) device connected to a cash register; a first receiving module configured to receive a first message from the NFC device via the communication connection, the first message indicating a payment identifier generated by the NFC device based on a payment request at the cash register; and a first triggering module configured to, in response to receiving the first message, trigger a service device to send a second message to the NFC device, the second message indicating a payment code generated by the service device based on the payment identifier, wherein the payment code is provided to the cash register to complete the payment request using a QR code payment service.

[0006] In a fourth aspect of this disclosure, an apparatus for electronic payment is provided. The apparatus includes: a first generating module configured to generate a payment identifier corresponding to a payment request at a near-field communication device in response to a payment request at a cash register; a first sending module configured to send a first message indicating the payment identifier to a terminal device via the near-field communication device in response to a terminal device establishing a communication connection with the near-field communication device; a second receiving module configured to receive a second message from a service device, the second message indicating a payment code generated by the service device based on the payment identifier received from the terminal device; and a second sending module configured to provide the payment code to the cash register to complete the payment request using a QR code payment service.

[0007] In a fifth aspect of this disclosure, an electronic device is provided. The device includes at least one processor; and at least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor. When executed by the at least one processor, the instructions cause the device to perform the method of the first aspect.

[0008] In a sixth aspect of this disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program that can be executed by a processor to implement the method of the first aspect.

[0009] It should be understood that the content described in this content section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0011] Figure 1A schematic diagram is shown of an example environment in which embodiments of the present disclosure may be implemented;

[0012] Figure 2 A flowchart illustrating an example interaction process for electronic payment according to some embodiments of this disclosure is shown;

[0013] Figures 3A to 3H Schematic diagrams of several example electronic payment interfaces according to some embodiments of the present disclosure are shown;

[0014] Figure 4 A flowchart of a process for electronic payment according to some embodiments of the present disclosure is shown;

[0015] Figure 5 A flowchart of a process for electronic payment according to some embodiments of the present disclosure is shown;

[0016] Figure 6 A schematic structural block diagram of an example device for electronic payment according to some embodiments of the present disclosure is shown;

[0017] Figure 7 A schematic structural block diagram of an example device for electronic payment according to some embodiments of the present disclosure is shown; and

[0018] Figure 8 A block diagram of an electronic device capable of implementing several embodiments of the present disclosure is shown. Detailed Implementation

[0019] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0020] It should be noted that the headings of any section / subsection provided herein are not limiting. Various embodiments are described throughout this document, and embodiments of any type may be included under any section / subsection. Furthermore, embodiments described in any section / subsection may be combined in any way with any other embodiments described in the same section / subsection and / or different sections / subsections.

[0021] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below. The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0022] The embodiments of this disclosure may involve user data, data acquisition, and / or use. All of these aspects comply with applicable laws, regulations, and relevant provisions. In the embodiments of this disclosure, all data collection, acquisition, processing, manipulation, forwarding, and use are conducted with the user's knowledge and confirmation. Accordingly, in implementing the embodiments of this disclosure, the type, scope of use, and usage scenarios of any data or information that may be involved should be communicated to the user and their authorization obtained in accordance with relevant laws and regulations through appropriate means. The specific methods of notification and / or authorization may vary depending on the actual situation and application scenario, and the scope of this disclosure is not limited in this respect.

[0023] In this specification and the embodiments, any processing of personal information will be carried out only under the premise of legality (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be carried out within the scope stipulated or agreed upon. A user's refusal to process personal information other than that necessary for basic functions will not affect the user's use of basic functions.

[0024] As mentioned above, traditional solutions offer various electronic payment methods to meet users' payment needs, such as users showing a payment code to the merchant. Currently, the most common payment technology on the market is QR code payment, which is divided into active QR code payment and passive QR code payment. For active QR code payment, merchants typically have a fixed QR code for receiving payments, and users scan the code, enter the amount, and complete the payment. The main steps include: the user unlocks their phone, opens the payment application, opens the scan function, enters the amount, and interacts with the server to complete the payment. For passive QR code payment, merchants typically enter the product amount and then use a payment code reader to scan the user's payment QR code to complete the payment. The main steps on the user's side include: the user unlocks their phone, opens the payment application, finds the payment code entry, and displays the payment code.

[0025] As can be seen, in traditional QR code payment solutions, users need to unlock their electronic devices, open the payment software, find the payment code entry, and display the payment code to complete the payment, which is a rather cumbersome process. This lengthy process not only reduces payment efficiency but also affects the user experience to some extent, especially during peak hours or in scenarios where quick transactions are required. NFC (Near Field Communication) technology, on the other hand, is a short-range, high-frequency wireless communication technology that allows electronic devices to transmit data without contact when they are close to each other. Applying this technology to electronic payments to replace QR code payments offers advantages such as ease of use, high security, and low power consumption.

[0026] Near-Field Communication (NFC)-based payment solutions need to address at least two core issues. One is user retrieval, specifically the identification of the payment code from user to recipient. In payment code transactions, a key aspect is retrieving the corresponding user information based on a payment code value. The other core issue is code value transmission. In traditional payment code scanning solutions, the transmission of the payment code from user to merchant is accomplished by a payment code reader. However, in NFC-based payment solutions, the absence of a payment code reader and the inability of the POS device to directly read the payment code from the user's device prevents the cashier from obtaining the code. Therefore, how to transmit the payment code to the POS terminal is a crucial problem that needs to be solved in NFC payment models—that is, resolving the issue of the code value's transmission from user to NFC device to POS terminal.

[0027] Current technologies have proposed payment solutions based on near-field communication (NFC). However, these solutions require not only the additional deployment of NFC equipment but also hardware and software modifications and upgrades to the merchant's existing POS systems. In other words, POS systems already deployed by merchants that support QR code payments cannot be reused for NFC-based payment solutions. This significantly increases the merchant's costs.

[0028] Therefore, a payment solution based on near-field communication is needed. This solution can maximize the reuse of equipment already deployed on the merchant side, thereby reducing the cost for merchants to upgrade and modify the software and hardware of the cash register.

[0029] According to various embodiments of this disclosure, a scheme for electronic payment is proposed. The scheme includes: establishing a communication connection between a terminal device and a near-field communication (NFC) device, the NFC device being connected to a cash register device; receiving a first message from the NFC device via the communication connection, the first message indicating a payment identifier generated by the NFC device based on a payment request at the cash register device; and, in response to receiving the first message, triggering a service device to send a second message to the NFC device, the second message indicating a payment code generated by the service device based on the payment identifier, wherein the payment code is provided to the cash register device to complete the payment request using a QR code payment service.

[0030] In this way, the embodiments of this disclosure enable users to achieve an efficient payment solution using near-field communication (NFC) technology without manually unlocking the device or opening the payment application. This shortens the user's operation path and improves the user's payment experience. Users only need to trigger the communication connection through NFC to automatically complete the transmission of the payment identifier and the generation of the payment code, greatly simplifying the operation steps and significantly improving the convenience and response speed of payment, making it suitable for fast-paced consumption scenarios. More importantly, the various embodiments of this disclosure can maximize the reuse of the cashier functions already deployed on the merchant side that support QR code payment solutions. In other words, merchants do not need to upgrade or modify the software and hardware of their existing cashier devices to support NFC-based payment solutions, thereby greatly reducing the software and hardware costs for merchants to support NFC-based payment solutions.

[0031] The following section provides a detailed description of various example implementations of this scheme, with reference to the accompanying drawings.

[0032] Example Environment

[0033] Figure 1 A schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented is shown. For example... Figure 1 As shown, example environment 100 may include electronic device 110.

[0034] In this example environment 100, terminal device 110 may run an application 120 that supports electronic payments. Application 120 may be any suitable type of application for electronic payments, and examples may include, but are not limited to: local life service applications, social applications, audio / video applications, media playback applications, broadcast applications, or other suitable applications. User 140 may interact with application 120 via terminal device 110 and / or its attached devices.

[0035] exist Figure 1 In environment 100, if application 120 is active, terminal device 110 can present interface 150 for supporting electronic payments through application 120.

[0036] In some embodiments, terminal device 110 communicates with service device 130 to provide services to application 120. Terminal device 110 can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, handheld computers, portable gaming terminals, VR / AR devices, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination thereof, including accessories and peripherals of these devices or any combination thereof. In some embodiments, terminal device 110 can also support any type of user-facing interface (such as "wearable" circuitry).

[0037] In some embodiments, terminal device 110 can communicate with near-field communication devices, cash register device 160, and service device 130. Specifically, user 140 may have a tripartite service agreement with service device 130. Based on this tripartite service agreement, user 140 enjoys various services provided by service device 130 through terminal device 110 and authorizes service device 130 to complete payments for various services.

[0038] Service device 130 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, and big data and artificial intelligence platforms. Service device 130 may include, for example, computing systems / servers such as mainframes, edge computing nodes, and computing devices in a cloud environment. Service device 130 can provide backend services for the application 120 supporting electronic payment in terminal device 110.

[0039] A communication connection can be established between the service device 130 and the terminal device 110. This communication connection can be established via wired or wireless means. The communication connection may include, but is not limited to, Bluetooth, mobile network, Universal Serial Bus (USB), Wireless Fidelity (WiFi), NFC (Near Field Communication), etc., and the embodiments of this disclosure are not limited in this respect. In the embodiments of this disclosure, the cash register device 160, the service device 130, the near field communication device 170, and the terminal device 110 can achieve signaling interaction through their respective communication connections.

[0040] It should be understood that the structure and function of the various elements in environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.

[0041] Example Interaction

[0042] Next, we will combine Figure 2 The flowcharts illustrating an example interaction process 200 for electronic payment according to some embodiments of this disclosure describe an example interaction of this disclosure. It should be understood that the interaction process 200 does not imply or limit the order of operations, jump logic, or necessary operation steps of this disclosure. In fact, the operation logic of the various embodiments of this disclosure can be arbitrarily set, the order of the various operation steps can be adjusted according to actual needs, and the illustrated operations can also be added or reduced according to actual needs. Figures 3A to 3H Example interfaces 300A to 300H according to some embodiments of the present disclosure are shown. It should be understood that... Figures 3A to 3H The illustrated user interface is merely an example; various designs are possible in practice. For instance, the various graphical elements and / or controls in the user interface can have different arrangements and visual representations, one or more elements and / or controls can be omitted or replaced, and one or more other elements and / or controls may also be present. Furthermore, the user interface can contain any suitable content. The scope of this disclosure is not limited in this respect. Interfaces 300A to 300H, for example, can be derived from… Figure 1 The terminal device 110 shown is provided.

[0043] To facilitate discussion, we will combine Figure 1 To describe the example interaction process 200, for example, by utilizing Figure 1The terminal device 110, service device 130, cash register device 160, and near-field communication device 170 are included. It should be understood that the subject of the operation described in conjunction with process 200 is not unique. Specifically, while the terminal device 110 is described as the executing subject in some embodiments, in other embodiments, the operation can also be performed by the near-field communication device 170 (or both the terminal device 110 and the near-field communication device 170). In short, the various embodiments of this disclosure are not limited in terms of the executing subject of the operation.

[0044] During operation, the terminal device 110, service device 130, cash register device 160, and near-field communication device 170 can communicate with each other through any type of communication method, including but not limited to wired communication, wireless communication, and short-range communication. In some embodiments, the terminal device 110 can exchange data with the near-field communication device 170 through near-field communication.

[0045] In some scenarios, the near-field communication device 170 can be connected to the POS device 160 via a wired connection, such as via a Universal Serial Bus (USB). In other scenarios, the near-field communication device 170 can be connected to the POS device 160 wirelessly, such as via cellular communication, local area network, Bluetooth, etc.

[0046] like Figure 2 As shown, in some scenarios, such as shopping checkout scenarios in offline supermarkets, shopping malls, and convenience stores, cashiers enter product or service information through the POS device 160, generate an order to be paid, and initiate a payment request (Action 1).

[0047] In some embodiments, in addition to payment requests, the POS device 160 can organize order information (e.g., transaction amount, product details, etc.) into a fixed-format data packet according to pre-agreed communication rules and send it to the near-field communication device 170. Additionally, in some embodiments, the POS device 160 can use a verification and retransmission mechanism to send the order information to the near-field communication device 170 to ensure accurate delivery of the information.

[0048] In some embodiments, in response to a payment request at the cash register 160, the near-field communication device 170 can generate a payment identifier corresponding to the payment request. As an example, such as... Figure 2 As shown, the near-field communication device 170 generates a payment identifier based on the payment request initiated by the cash register device 160 (Action 2).

[0049] In some embodiments, the payment identifier is a random number generated by the near-field communication device 170. In some scenarios, this random number is a one-time random number, meaning it is a random value used only once in a specific scenario. As an example, when the cash register device 160 initiates a payment request, the near-field communication device 170 generates a random string such as "random number = 123" as the payment identifier. This payment identifier is used to ensure the uniqueness and security of payment information. This identifier is not only uniquely bound to the current payment request, but also, furthermore, the random number can be written to the secure storage area of ​​the near-field communication device 170.

[0050] In one embodiment, the payment identifier is generated by the near-field communication device 170 based on the payment request initiated by the cashier device 160, and corresponds one-to-one with the payment request. As a unique digital representation of the payment request, the payment identifier can be accurately associated with the corresponding order to be paid, ensuring the traceability and data consistency of the transaction chain. According to the embodiments of this disclosure, by establishing a communication connection between the terminal device 110 and the near-field communication device 170, the terminal device 110 accurately receives the payment identifier generated by the near-field communication device 170 based on the payment request from the cashier device 160. This ensures reliable end-to-end transmission of payment information, laying the foundation for the secure and accurate execution of subsequent payment processes.

[0051] As discussed below, according to some embodiments of this disclosure, terminal device 110 may be brought close to communication device 170 to trigger a payment operation.

[0052] During operation, a communication connection is established between the terminal device 110 and the near-field communication device 170. As an example embodiment, with the terminal device 110 unlocked, the user 140 brings the terminal device 110 close to the near-field communication device 170. By approaching / touching the signal recognition area of ​​the near-field communication device 170, a short-range communication connection is established with the near-field communication device 170. Based on the established communication connection, the terminal device 110 can read data stored in the near-field communication device 170, thereby enabling data interaction between the terminal device 110 and the near-field communication device 170.

[0053] In some embodiments, via a communication connection between the terminal device 110 and the near-field communication device 170, the terminal device 110 receives a first message from the near-field communication device 170, the first message indicating a payment identifier generated by the near-field communication device 170 based on a payment request at the cash register device 160.

[0054] In some embodiments, in response to the terminal device 110 establishing a communication connection with the near-field communication device 170, the near-field communication device 170 sends a first message indicating a payment identifier to the terminal device 110 via the communication connection. As an example, the terminal device 110 reads the payment identifier stored in the near-field communication device 170 via near-field communication.

[0055] In some embodiments, in response to receiving a first message, a first payment interface is presented, displaying the payment pending status corresponding to the payment request.

[0056] As an example, when terminal device 110 touches near-field communication device 170 and receives the first message, it automatically invokes application 120 for electronic payment and presents a first payment interface on terminal device 110. This first payment interface can be, for example, a payment waiting interface. This payment waiting interface primarily indicates that payment is in progress. The interface is simple and clear, without any other extra messages interfering. By using indicators representing payment in progress, such as a dynamic progress bar or a rotating loading icon, the user is able to focus on the current status of the payment operation. This ensures the smooth progress of the payment process while providing the user with a clear and intuitive interactive experience. In some embodiments, the first payment interface includes a cancellation control. Terminal device 110 receives a trigger operation on the cancellation control, triggering the cancellation of the payment completion request; and presents a second payment interface, displaying the payment cancellation status corresponding to the payment request. As an example, the first payment interface includes a cancellation control.

[0057] See Figure 3A The example user interface 300A shown indicates that a payment operation is being processed. Furthermore, example user interface 300A presents a "Cancel" control. When a user needs to cancel the payment, they can do so by triggering the "Cancel" control. The triggering method could be, for example, clicking, swiping, or pressing for a certain time threshold to activate the control. This method further encompasses the following workflow: once the system receives the user's trigger operation on the cancel control, it will immediately respond and present a second payment interface.

[0058] like Figure 3B As shown, the second payment interface displays the payment cancellation status corresponding to the current payment request. To enable users to intuitively and accurately understand the payment cancellation situation, the interface displays clear prompts such as "Payment cancelled." Furthermore, a "back" control can be set on the second payment interface to allow users to return to the main interface or the main page of the invoked electronic payment application. In some scenarios, the invoked electronic payment application may be one of the following: local life service applications, social applications, audio / video applications, media playback applications, or broadcast applications. Before payment, this application is in the foreground and displays the current interactive interface for user interaction through the terminal device 110. Through the "back" operation, users can return to the interactive interface of the invoked electronic payment application to continue the interaction before the payment operation or trigger a new payment operation. In this way, the interactive experience between the user and the payment system can be enhanced, ensuring that users can promptly and accurately grasp changes in the payment status.

[0059] In some embodiments, in response to receiving the first message, a third message is sent to the service device 130, the third message including a payment identifier and a payment authentication message associated with the terminal device 110.

[0060] In some embodiments, in response to receiving a first message, the terminal device 110 may automatically invoke a payment application that can be used to complete the payment request.

[0061] In some embodiments, in response to receiving a first message, the service device 130 is triggered to send a second message to the near-field communication device 170, wherein the second message indicates a payment code generated by the service device 130 based on a payment information identifier. For example, the terminal device 110 simultaneously sends the payment identifier obtained from the near-field communication device 170 and the payment authentication message associated with the terminal device 110 to the service device 130 (Action 3). In this way, the payment code can be provided to the cash register device 160 to complete the payment request using the QR code payment service.

[0062] In some embodiments, the second message includes a payment code and a payment identifier, indicating that the payment code is bound to a payment request corresponding to the payment identifier. For example, after receiving the payment identifier and user authentication information sent by the terminal device 110, the service device 130 generates a unique payment code based on a preset algorithm. In some embodiments, the service device 130 can bind the payment code to the corresponding payment identifier to form an associated data pair. Subsequently, the service device 130 sends the second message containing the payment code and payment identifier back to the near-field communication device 170 via a communication link. Figure 2 As shown, after generating a payment code based on the above information, the service device 130 simultaneously sends the payment identifier and the payment code to the near-field communication device 170 (Action 4.1). In this way, a direct mapping relationship is established between the payment code and the payment request.

[0063] By uniquely binding the payment code to the payment request, the consistency and traceability of transaction data are ensured, guaranteeing that each payment code corresponds to only one payment request. According to embodiments of this disclosure, even in high-concurrency scenarios, the uniqueness of random numbers can effectively distinguish different orders, preventing mismatches between payment instructions and orders. Embodiments of this disclosure effectively avoid order confusion caused by missing identifiers or mismatches during the payment process. This ensures the accuracy and security of the QR code payment service, improves the reliability of the payment process and user experience, and utilizes the unpredictability of random numbers to prevent payment information from being tampered with or replayed, ensuring the uniqueness and security of transactions.

[0064] In some embodiments, the near-field communication device 170 receives a second message from the service device 130, the second message indicating a payment code generated by the service device 130 based on a payment identifier received from the terminal device 110.

[0065] As an example, the near-field communication device 170 obtains the payment code and payment identifier from the service device 130 through polling, ensuring timely and accurate information acquisition. In some application scenarios, the near-field communication device 170 can receive the payment code and payment identifier actively pushed by the service device 130 through a long-term connection maintained with the service device 130, enabling real-time data transmission between the near-field communication device 170 and the service device 130.

[0066] In some embodiments, the near-field communication device 170 provides a payment code to the cash register device 160, enabling the cash register device 160 to complete the payment request using a QR code payment service. For example... Figure 2 As shown, the near-field communication device 170 provides the payment code and payment identifier to the cash register device 160 (Action 4.2).

[0067] During this process, the payment code and payment identifier can be simultaneously transmitted to the POS device 160. The payment identifier, as a unique index of the payment request, helps the POS device 160 quickly locate the corresponding order to be paid. (Continue to refer to...) Figure 2 The payment code serves as a payment credential, and is triggered by the POS device 160 after being recognized. The POS device 160 sends a deduction request (Action 5) containing the payment code and payment amount to the service device 130. This completes a payment process equivalent to scanning a QR code with a barcode scanner.

[0068] It should be noted that the core function of the payment identifier is to establish a precise mapping between the payment code and the original payment request, ensuring that the POS device 160 can clearly identify the specific transaction order corresponding to the payment code. The following examples further illustrate embodiments of this disclosure.

[0069] In one example scenario, service device 130 generates an online payment code N0002 (it should be understood that N0002 is only a simplified example value for illustrative purposes), and encapsulates the generated online payment code and the corresponding payment identifier (such as random number = 123, similarly 123 is only a simplified example) into a second message. According to embodiments of this disclosure, by strongly binding the payment code with a unique random value, it can be ensured that when the cash register device 160 receives the payment code, it can accurately match the order corresponding to the original payment request based on random number = 123. For example, if near-field communication device 170 receives a new payment request before the payment code is issued, and generates a new payment identifier such as (random number = 456) based on the new payment request, the payment code information returned by service device 130 based on random number = 123 will not be able to match the random value of the new order. This effectively avoids payment errors caused by order confusion by cash register device 160. This mechanism, which establishes order association through dual identifiers (payment code and random number), ensures the uniqueness and traceability of the payment process while enhancing the system's fault tolerance through redundant checks. It ensures that each payment code corresponds only to a specific payment request, fundamentally eliminating the risk of cross-order payments. Simultaneously, throughout the payment process, the random number 123 merely represents the payment request and contains no sensitive information. The binding of the payment code and payment identifier is completed at the service device 130, ensuring information security and reliability throughout the binding process. In some scenarios, to reduce merchant access costs, the payment solution based on near-field communication technology, as described above, reuses the payment code interface, making the near-field communication device 170 technically equivalent to a payment code reader. The terminal device 110 simulates being scanned by a barcode scanner through a tap-to-swipe action. This allows for seamless payment process integration while maintaining complete consistency between the merchant-side interface and the payment code, ensuring merchants can upgrade without modification and guaranteeing compatibility of the payer's payment experience with existing solutions.

[0070] Unlike traditional solutions that require manual generation of payment QR codes, embodiments of this disclosure do not require manually opening the application 120 for electronic payments. In this disclosure, after the terminal device 110 receives the first message via near-field communication, particularly after acquiring the payment identifier, the application 120 for electronic payments is automatically invoked. This triggers the service device 130 to generate a payment code based on the payment identifier. The service device 130 then sends the payment code to the near-field communication device 170, ensuring accurate delivery of the payment code to the payment terminal and guaranteeing efficient execution of the QR code payment service.

[0071] In traditional scenarios, users need to complete payment authorization before using a payment QR code for the first time, such as selecting a default payment method, binding a bank card, and verifying a payment password. Afterward, when generating the payment QR code, the terminal device 110 automatically sends the required user authentication information to the service device 130, eliminating the need for repeated verification. Similarly, in this embodiment, users also need to authorize payment before completing a payment via near-field communication (NFC). When the first message received via NFC triggers the payment application, the terminal device 110 automatically calls the binding code interface. The payment identifier and pre-stored payment authentication information are transmitted synchronously to the service device 130 via encrypted transmission. This achieves seamless transmission of authorization information, ensuring payment security while avoiding the cumbersome process of repeated verification. It should be noted that in some scenarios, the terminal device 110 can use a quick card to call the aforementioned payment application after reading the payment identifier and other information. A quick card is a convenient way to call functions in a mobile terminal operating system, supporting triggering via scanning an NFC tag. Quick cards provide a seamless "tap and play" experience. When using a quick card to access a payment application, users simply need to touch their terminal device 110 to the NFC recognition area of ​​the near-field communication device 170 to trigger the quick card. Tapping the "Open" button on the quick card quickly launches the corresponding payment application, initiating the payment process without having to manually search for and open the application on the phone screen.

[0072] In some embodiments, in response to a payment request corresponding to a payment amount greater than a preset value, an authentication interface is displayed, which is used to receive the user's payment credentials.

[0073] As an example, terminal device 110 receives a specific payment amount message from service device 130. When the payment amount exceeds a preset threshold, terminal device 110 will trigger the display of the authentication interface. Figure 3C As shown, this interface is used to collect the password entered by the user. In some scenarios, this interface can also be used to collect the user's fingerprint or facial recognition authentication information to enhance payment security in large-value transaction scenarios. By dynamically comparing the payment amount with a preset threshold, and forcing the user to authenticate their identity when the threshold is exceeded, this embodiment of the present disclosure achieves a balance between convenience and security. According to this embodiment of the present disclosure, it ensures both the rapid processing of small-value payments and effectively prevents the risks of large-value transactions through a tiered authentication mechanism. It should be noted that the preset threshold can be flexibly configured by the system administrator or the user according to actual business needs. For example, differentiated amount limits can be set for different payment scenarios (such as small-value fast payments or large-value secure payments), risk levels, or user preferences, thereby achieving a dynamic balance between payment convenience and transaction security.

[0074] In some embodiments, in response to receiving a payment amount, the terminal device 110 may present a payment method selection interface, which provides a set of candidate payment methods. In response to one of the candidate payment methods being selected, the terminal device 110 may present a rights description message corresponding to the payment method, wherein the rights description message is used to indicate the target rights corresponding to the payment method.

[0075] As an example, such as Figure 3D As shown, upon receiving a payment amount message, terminal device 110 will automatically present a payment method selection interface. This interface will list a set of candidate payment methods for the user to choose from. Simultaneously, when the user selects a payment method, the system will synchronously display a description of the benefits associated with that payment method. The benefit description explains the exclusive discounts or benefits the user can enjoy using that payment method. This embodiment of the disclosure, through real-time linkage between payment method selection and benefit display, provides users with diverse payment options and enhances their sense of control over payment decisions through transparent benefit disclosure. This effectively improves the user experience and interaction efficiency of the payment process. After the user selects a payment method and completes identity authentication, terminal device 110 will trigger a payment instruction to complete the transaction processing. At this time, terminal device 110 will automatically redirect and display the following... Figure 3E The payment success interface shown is clearly displayed. This interface presents key transaction information, such as the transaction amount, payment method, and payee information. In some other scenarios, convenient options such as "Continue Payment" may also be provided. It should be noted that regardless of the payment method used, as long as the payment process verification is successful, the terminal device 110 will display the payment success interface after successful payment. For example, in the aforementioned example of this disclosure, if the payment amount does not exceed a preset threshold, the terminal device 110 will not trigger the display of the user authentication message input interface. The service device 130 directly triggers the payment process and completes the transaction, then returns a payment success instruction to the terminal device 110 via the communication link, driving the interface to display the successful transaction result.

[0076] In some embodiments, in response to receiving an anomaly report associated with a payment request, an alert message is presented indicating a payment anomaly.

[0077] As an example, terminal device 110 receives an anomaly report from service device 130, which carries a payment anomaly status message corresponding to the payment request. When service device 130 detects an anomaly in the payment chain through its risk control engine, it immediately pushes the payment anomaly status message to terminal device 110 via an encrypted communication link. Terminal device 110 responds to the payment anomaly status message trigger and displays a corresponding reminder message. The reminder message visually displays the anomaly type and specific cause. In some scenarios, it can provide help information and operation prompts to help users quickly understand and handle payment anomaly issues. As an example, such as... Figure 3F As shown, payment anomalies may include poor network signal. When a poor network signal is detected causing a payment interruption, the alert message will clearly display "Poor network signal." At this time, the interface will prompt "Please go to 'My Wallet - Bills' to check the payment result." In some scenarios, the alert message may simultaneously provide one or more operation options such as "Retry Payment," "View Bill," and "Contact Customer Service." According to the embodiments of this disclosure, clear interface feedback and convenient operation guidance improve the efficiency of users in handling abnormal situations, ensuring the stability of the payment process and the user experience.

[0078] According to embodiments of this disclosure, a standardized anomaly feedback mechanism and intelligent guidance strategy enable accurate communication and rapid response to abnormal states. On the one hand, clear anomaly type identification helps users accurately pinpoint the root cause of the problem; on the other hand, integrated operation options shorten the path from recognizing the anomaly to resolving the problem, effectively improving anomaly handling efficiency.

[0079] As an example, such as Figure 3G-3H As shown, payment anomalies also include tap-to-pay timeouts and service errors. In addition, device hardware malfunctions (such as a damaged NFC module), merchant POS system failures or restricted payment permissions, and service interruptions of the payment system itself (such as system maintenance or network attacks) can all lead to payment anomalies. It should be noted that the above-mentioned anomalies are merely examples and are not intended to limit the key or important features of the embodiments of this disclosure, nor are they intended to restrict the scope of this disclosure.

[0080] In this way, users can complete the payment simply by touching the near-field communication device 170, thereby reducing the number of user steps in the entire payment process and making it convenient for users to efficiently complete the payment.

[0081] Example process

[0082] Figure 4 A flowchart of an example process 400 for electronic payment according to some embodiments of the present disclosure is shown. Process 400 can be implemented at terminal device 110. Reference is made below. Figure 1 To describe process 400.

[0083] like Figure 4 As shown, in box 410, terminal device 110 establishes a communication connection with near-field communication device 170, and near-field communication device 170 is connected to cash register device 160.

[0084] In box 420, terminal device 110 receives a first message from near-field communication device 170 via a communication connection. The first message indicates a payment identifier generated by near-field communication device 170 based on a payment request at cash register device 160.

[0085] In box 430, in response to receiving the first message, terminal device 110 triggers service device 130 to send a second message to near-field communication device 170. The second message indicates a payment code generated by service device 130 based on a payment identifier, wherein the payment code is provided to cash register device 160 to complete the payment request using the QR code payment service.

[0086] In some embodiments, in response to receiving the first message, a third message is sent to the service device 130, the third message including a payment identifier and a payment authentication message associated with the terminal device 110.

[0087] In some embodiments, process 400 further includes: in response to receiving the first message, sending a third message to service device 130, the third message including a payment identifier and a payment authentication message associated with terminal device 110.

[0088] In some embodiments, the service device 130 is configured to generate a payment code based on a payment authentication message and a payment identifier.

[0089] In some embodiments, the payment identifier is a random number generated by the near-field communication device 170.

[0090] In some embodiments, the second message includes a payment code and a payment identifier to indicate that the payment code is bound to a payment request corresponding to the payment identifier.

[0091] In some embodiments, process 400 further includes: in response to receiving a first message, presenting a first payment interface and displaying a payment pending status corresponding to the payment request on the first payment interface.

[0092] In some embodiments, the first payment interface includes a cancellation control, and process 400 further includes: receiving a trigger operation on the cancellation control to trigger a cancellation of the payment completion request; and presenting a second payment interface to display the payment cancellation status corresponding to the payment request.

[0093] In some embodiments, process 400 further includes: in response to the payment amount corresponding to the payment request being greater than a preset value, presenting an authentication interface, the authentication interface being used to receive the user's payment credentials.

[0094] In some embodiments, process 400 further includes: in response to receiving an anomaly report associated with a payment request, presenting an alert message indicating a payment anomaly.

[0095] Figure 5 A flowchart of an example electronic payment process 500 according to some embodiments of the present disclosure is shown. Process 500 can be implemented at a near-field communication device 170. Reference is made below. Figure 1To describe process 500.

[0096] like Figure 5 As shown in box 510, in response to a payment request at the cash register 160, the near-field communication device 170 generates a payment identifier corresponding to the payment request at the near-field communication device 170.

[0097] In box 520, in response to the establishment of a communication connection between the near-field communication device 170 and the terminal device 110, the near-field communication device 170 sends a first message indicating a payment identifier to the terminal device 110 via the communication connection.

[0098] In box 530, near-field communication device 170 receives a second message from service device 130, the second message indicating a payment code generated by service device 130 based on a payment identifier received from terminal device 110.

[0099] In frame 540, near-field communication device 170 provides a payment code to cash register device 160 to complete the payment request using the QR code payment service.

[0100] In some embodiments, the terminal device 110 is configured to send a third message to the service device 130 in response to receiving a first message, the third message including a payment identifier and a payment authentication message associated with the terminal device 110.

[0101] In some embodiments, the service device 130 is configured to generate a payment code based on a payment authentication message and a payment identifier.

[0102] In some embodiments, the payment identifier is a random number generated by the near-field communication device 170.

[0103] In some embodiments, the second message includes a payment code and a payment identifier to indicate that the payment code is bound to a payment request corresponding to the payment identifier.

[0104] Example devices and equipment

[0105] Embodiments of this disclosure also provide corresponding apparatus for implementing the above methods or processes. Figure 6 A schematic structural block diagram of an example device 600 for electronic payments according to certain embodiments of the present disclosure is shown. Device 600 may be implemented as or included in terminal device 110. Various modules / components in device 600 may be implemented by hardware, software, firmware, or any combination thereof.

[0106] like Figure 6As shown, the device 600 includes: a first connection module 610 configured to establish a communication connection between the terminal device 110 and the near-field communication device 170, the near-field communication device 170 being connected to the cash register device 160; a first receiving module 620 configured to receive a first message from the near-field communication device 170 via the communication connection, the first message indicating a payment identifier generated by the near-field communication device 170 based on a payment request at the cash register device 160; and a first triggering module 630 configured to, in response to receiving the first message, trigger a service device 130 to send a second message to the near-field communication device 170, the second message indicating a payment code generated by the service device 130 based on the payment identifier, wherein the payment code is provided to the cash register device 160 to complete the payment request using a QR code payment service.

[0107] In some embodiments, the first receiving module 620 is further configured to send a third message to the service device 130 in response to receiving the first message, the third message including a payment identifier and a payment authentication message associated with the terminal device 110.

[0108] In some embodiments, the service device 130 is configured to generate a payment code based on a payment authentication message and a payment identifier.

[0109] In some embodiments, the payment identifier is a random number generated by the near-field communication device 170.

[0110] In some embodiments, the second message includes a payment code and a payment identifier to indicate that the payment code is bound to a payment request corresponding to the payment identifier.

[0111] In some embodiments, the first receiving module 620 is further configured to present a first payment interface in response to receiving a first message, and to display the payment pending status corresponding to the payment request on the first payment interface.

[0112] In some embodiments, the first payment interface includes a cancellation control, and the first receiving module 620 is further configured to receive a trigger operation on the cancellation control to trigger a cancellation of the payment completion request; and to present a second payment interface, displaying the payment cancellation status corresponding to the payment request on the second payment interface.

[0113] In some embodiments, the first receiving module 620 is further configured to present an authentication interface in response to a payment request whose corresponding payment amount is greater than a preset value. The authentication interface is used to receive the user's payment credentials.

[0114] In some embodiments, the first receiving module 620 is further configured to present an alert message in response to receiving an anomaly report associated with a payment request, the alert message indicating a payment anomaly.

[0115] Figure 7A schematic structural block diagram of an example device 700 for electronic payments according to certain embodiments of the present disclosure is shown. Device 700 may be implemented as or included in near-field communication device 170. Various modules / components in device 700 may be implemented by hardware, software, firmware, or any combination thereof.

[0116] like Figure 7 As shown, the device 700 includes: a first generation module 710 configured to generate a payment identifier corresponding to the payment request at a near-field communication device 170 in response to a payment request at a cash register device 160; a first sending module 720 configured to send a first message indicating the payment identifier to a terminal device 110 via the near-field communication device 170 in response to a terminal device 110 establishing a communication connection with the near-field communication device 170; a second receiving module 730 configured to receive a second message from a service device 130, the second message indicating a payment code generated by the service device 130 based on the payment identifier received from the terminal device 110; and a second sending module 740 configured to provide the payment code to the cash register device 160 to complete the payment request using a barcode payment service.

[0117] In some embodiments, the terminal device 110 is configured to send a third message to the service device 130 in response to receiving a first message, the third message including a payment identifier and a payment authentication message associated with the terminal device 110.

[0118] In some embodiments, the service device 130 is configured to generate a payment code based on a payment authentication message and a payment identifier.

[0119] In some embodiments, the payment identifier is a random number generated by the near-field communication device 170.

[0120] In some embodiments, the second message includes a payment code and a payment identifier to indicate that the payment code is bound to a payment request corresponding to the payment identifier.

[0121] like Figure 8 As shown, electronic device 800 is in the form of a general-purpose electronic device. Components of electronic device 800 may include, but are not limited to, at least one processor 810 or processing unit, memory 820, storage device 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. Processor 810 may be a physical or virtual processor and is capable of performing various processes according to programs stored in memory 820. In a multiprocessor system, multiple processors execute computer-executable instructions in parallel to improve the parallel processing capability of electronic device 800.

[0122] Electronic device 800 typically includes multiple computer storage media. Such media can be any accessible media that is accessible to electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 820 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 830 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data and can be accessed within electronic device 800.

[0123] Electronic device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not explicitly stated... Figure 8 As shown, disk drives for reading from or writing to removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading from or writing to removable, non-volatile optical disks can be provided. In these cases, each drive can be connected to a bus (not shown) via one or more data media interfaces. Memory 820 may include computer program product 825 having one or more program modules configured to perform various methods or actions of various embodiments of this disclosure.

[0124] The communication unit 840 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 800 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 800 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0125] Input device 850 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 860 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 800 can also communicate with one or more external devices (not shown) via communication unit 840 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 800, or with any device that enables electronic device 800 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).

[0126] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.

[0127] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0128] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0129] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0131] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims

1. A method for electronic payment, comprising: Establish a communication connection between the terminal device and the near-field communication device, wherein the near-field communication device is connected to the cash register device; A first message is received from the near-field communication device via the communication connection, the first message indicating a payment identifier generated by the near-field communication device based on a payment request at the cash register. as well as In response to receiving the first message, the service device is triggered to send a second message to the near-field communication device. The second message indicates a payment code generated by the service device based on the payment identifier, wherein the payment code is provided to the cashier device to complete the payment request using the QR code payment service.

2. The method according to claim 1, further comprising: In response to receiving the first message, a third message is sent to the service device, the third message including the payment identifier and a payment authentication message associated with the terminal device.

3. The method of claim 2, wherein the service device is configured to generate the payment code based on the payment authentication message and the payment identifier.

4. The method according to claim 1, wherein the payment identifier is a random number generated by the near-field communication device.

5. The method of claim 1, wherein the second message includes the payment code and the payment identifier to indicate that the payment code is bound to the payment request corresponding to the payment identifier.

6. The method according to claim 1, further comprising: In response to receiving the first message, a first payment interface is presented, displaying the payment pending status corresponding to the payment request.

7. The method according to claim 6, wherein the first payment interface includes a cancellation control, and the method further includes: Receive a trigger operation on the cancel control to trigger the cancellation of the payment request; as well as A second payment interface is presented, displaying the payment cancellation status corresponding to the payment request.

8. The method according to claim 1, further comprising: In response to the payment request being greater than a preset value, an authentication interface is displayed, which is used to receive the user's payment credentials.

9. The method according to claim 1, further comprising: In response to receiving an anomaly report associated with the payment request, an alert message is presented indicating a payment anomaly.

10. A method for electronic payment, comprising: In response to a payment request at the cash register, a payment identifier corresponding to the payment request is generated at the near-field communication device; In response to the terminal device establishing a communication connection with the near-field communication device, a first message indicating the payment identifier is sent to the terminal device via the communication connection; Receive a second message from the service device, the second message indicating a payment code generated by the service device based on the payment identifier received from the terminal device; as well as Provide the payment code to the POS device to complete the payment request using the QR code payment service.

11. The method of claim 10, wherein the terminal device is configured to: In response to receiving the first message, a third message is sent to the service device, the third message including the payment identifier and a payment authentication message associated with the terminal device.

12. The method of claim 11, wherein the service device is configured to generate the payment code based on the payment authentication message and the payment identifier.

13. The method of claim 11, wherein the payment identifier is a random number generated by the near-field communication device.

14. The method of claim 10, wherein the second message includes the payment code and the payment identifier to indicate that the payment code is bound to the payment request corresponding to the payment identifier.

15. A device for electronic payment, comprising: The first connection module is configured to establish a communication connection between the terminal device and the near-field communication device, wherein the near-field communication device is connected to the cash register device; A first receiving module is configured to receive a first message from the near-field communication device via the communication connection, the first message indicating a payment identifier generated by the near-field communication device based on a payment request at the cash register. as well as A first triggering module is configured to, in response to receiving the first message, trigger a service device to send a second message to the near-field communication device, the second message indicating a payment code generated by the service device based on the payment identifier, wherein the payment code is provided to the cashier device to complete the payment request using a QR code payment service.

16. A device for electronic payment, comprising: The first generation module is configured to generate a payment identifier corresponding to the payment request at the near-field communication device in response to a payment request at the cash register device. The first sending module is configured to send a first message indicating the payment identifier to the terminal device via the communication connection in response to the terminal device establishing a communication connection with the near-field communication device. The second receiving module is configured to receive a second message from the service device, the second message indicating a payment code generated by the service device based on the payment identifier received from the terminal device; as well as The second sending module is configured to provide the payment code to the cashier device to complete the payment request using the QR code payment service.

17. An electronic device comprising: At least one processor; as well as At least one memory coupled to the at least one processor and storing instructions for execution by the at least one processor, the instructions causing the electronic device to perform the method according to any one of claims 1 to 14 when executed by the at least one processor.

18. A computer-readable storage medium having stored thereon computer-executable instructions that can be executed by a processor to implement the method according to any one of claims 1 to 14.