Alipay+ DocsAlipay+ Docs

setCustomData

Call the setCustomData API to set custom data that is to be passed through to the card issuer via the POS machine when tapping it.

Method signature

copy
public boolean setCustomData(byte[] data);

Request parameters

Item

Type

Description

Required

data

byte[]

The custom data to be passed through to the card issuer and encapsulated into the Issuer application data. For details about custom data encoding, see Data encoding specification.

Required

Response parameters

N/A

Sample

copy
public boolean setCustomData(byte[] data) {
    if (lifeCycle.get() < CONNECTED) {
        return false;
    }
    NFCWrapperManager.INSTANCE.setIadData(data);
    return true;
}