1# @ohos.nfc.cardEmulation (Standard NFC Card Emulation) (System API)
2
3The **cardEmulation** module implements Near-Field Communication (NFC) card emulation. You can use the APIs provided by this module to determine the card emulation type supported and implement Host Card Emulation (HCE).
4HCE provides card emulation that does not depend on a secure element. It allows an application to emulate a card and communicate with an NFC card reader through the NFC service.
5
6> **NOTE**
7>
8> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
9> - This topic describes only the system APIs provided by the module. For details about its public APIs, see [@ohos.nfc.cardEmulation (Standard NFC Card Emulation)](js-apis-cardEmulation.md).
10
11
12## Modules to Import
13
14```
15import { cardEmulation } from '@kit.ConnectivityKit';
16```
17
18## getPaymentServices<sup>11+</sup>
19
20getPaymentServices(): [AbilityInfo](../apis-ability-kit/js-apis-bundleManager-abilityInfo.md)[]
21
22Obtains all payment services. If an application declares the support for the HCE feature and **payment-aid**, the application is contained in the payment service list. For details, see [HCE and AID Declaration](js-apis-cardEmulation.md#hce-and-aid-declaration).
23
24**System API**: This is a system API.
25
26**System capability**: SystemCapability.Communication.NFC.CardEmulation
27
28**Required permissions**: ohos.permission.NFC_CARD_EMULATION
29
30**Return value**
31
32| **Type** | **Description**                              |
33| ------- | ------------------------------------ |
34| [AbilityInfo](../apis-ability-kit/js-apis-bundleManager-abilityInfo.md)[] | List of payment services obtained.|
35
36**Error codes**
37
38For details about the error codes, see [NFC Error Codes](errorcode-nfc.md).
39
40| ID| Error Message|
41| -------- | ---------------------------- |
42|201 | Permission denied.                 |
43|202 | Non-system applications are not allowed to use system APIs. |
44|801 | Capability not supported.          |
45
46**Example**
47```js
48import { cardEmulation } from '@kit.ConnectivityKit';
49
50let paymentServices = cardEmulation.getPaymentServices();
51if (paymentServices == undefined || paymentServices.length == 0) {
52  console.log('paymentServices is null.');
53}
54
55```
56