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.

Note: This field must be a constructed byte array. The SDK does not perform hexadecimal string decoding or zero padding. For details on the data structure, see Issuer application data.

Yes

Response parameters

Item

Type

Description

Required

result

boolean

Indicates whether the custom data was accepted.

  • Returns true if the SDK is connected.
  • Returns false if the SDK is not connected.

Yes

Sample

copy
manager = ACTapManager.getInstance(this.getApplication());
manager.setCustomData(data); //type of data byte[] size of 10