6. Update a Redeemable Card / Ticket

POST /api/open/alipay/v1/ipass/pass/manage/updatePass

Use this interface to update a redeemable card / ticket.


General Headers

Name

Description

Type

Sample

Client-Id

REQUIRED

An ID provided by AlipayHK, used to identify partner and application system.

String

4Q5Y8W0WSG45P907917

Content-Type

REQUIRED

The RFC 2616 media type of the request body, the charset should be as same as the one used for cryptographic operations. 

String

application/json; charset=UTF-8

Signature

REQUIRED

A key-value pairs string separated by commas (,), which keys and values are joined by equal signs (key=value). 

Valid keys include: 

  • algorithm: The digital signature algorithm used in generating the signature, RSA256 or ECC224, uses RSA256 by default. 
  • keyVersion: The key version of the signing key configured with Client-Id, uses the latest version by default. 
  • signature: The signature value of this request. 

String

algorithm=RSA256,keyVersion=1,signature=KEhXthj4bJ801Hqw8kaLvEKc0Rii8KsNUazw7kZgjxyGSPuOZ48058UVJUkkR21iD9JkHBGR rWiHPae8ZRPuBagh2H3qu7fxY5GxVDWayJUhUYkr9m%2FOW4UQVmXaQ9yn%2Fw2dCtzwAW0htPHYrKMyrT pMk%2BfDDmRflA%2FAMJhQ71yeyhufIA2PCJV8%2FCMOa46303A0WHhH0YPJ9%2FI0UeLVMWlJ1XcBo3Jr bRFvcowQwt0lP1XkoPmSLGpBevDE8%2FQ9WnxjPNDfrHnKgV2fp0hpMKVXNM%2BrLHNyMv3MkHg9iTMOD% 2FFYDAwSd%2B6%2FEOFo9UbdlKcmodJwjKlQoxZZIzmF8w%3D%3D

Encrypt

REQUIRED when message content needs to be encrypted. 

A key-value pairs string separated by commas (,), which keys and values are joined by equal signs (key=value). 

Valid keys include: 

  • algorithmThe symmetric key algorithm used in encryptingthe signature, only RSA_AES is supported
  • keyVersionThe key version of the signing key configured with Client-Id, uses the latest version by default.
  • symmetricKey: The encrypted symmetric key.

String

algorithm=RSA_AES,keyVersion=1,symmetricKey=bqS8HSmdaRrpKSuPy7CqUlyd8lJurG93

Request-only Headers

Name

Description

Type

Sample

Request-Time

REQUIRED

The ISO-8601 datetime of this API request with timezone.

String

2024-05-22T06:42:21+05:30

Response-only Headers

Name

Description

Type

Sample

Response-Time

REQUIRED

The ISO-8601 datetime of this API response with timezone.

String

2024-05-22T06:42:21+05:30

Tracer-Id

An ID for tracing this request.

String

abcdefg135202000000000263818


Request parameters

merchantId string  REQUIRED

Merchant ID provided by AlipayHK.

userId string  

The AlipayHK user ID this pass is created for.

REQUIRED to provide either openId or userId.

openId string  

Authorization ID of AlipayHK user for merchant.

REQUIRED to provide either openId or userId.

passId string  REQUIRED

ID of the redeemable card / ticket from the create API.

status string  REQUIRED

Update status of the redeemable card / ticket.

  • USED​​: Move this pass to used page.​
  • CLOSED​: Remove this pass completely from the wallet.
  • UPDATE​: Update the content of this pass.
  • REFUND​: This pass is refunded.

updateDetailType string  

Type of update details.

Type

Value

TICKET

  • UPDATE_AIR_TICKET
  • UPDATE_TRAIN_TICKET
  • UPDATE_BUS_TICKET
  • UPDATE_SHIP_TICKET
  • UPDATE_MOVIE
  • UPDATE_PASS

REQUIRED when ​status​ is UPDATE.

bizDate number  

The update datetime of this pass in milliseconds.

REQUIRED when ​status​ is UPDATE.

endDate number  

Expiration datetime of this pass in milliseconds.

dataInfo object  

An object carries the data information of each business scenario.

Please refer to each business scenarios in create card / ticket API.

REQUIRED for TICKET.

Response parameters

resultInfo object  REQUIRED

A metadata object indicates the result of the request.

Show child parameters
API Explorer

Request

Case
TICKET
Request Body

Response

Response Body

Result/Error codes

CodeValueMessage
SUCCESSSSuccess
PARAM_ILLEGALFIllegal parameters. For example, non-numeric input, invalid date.
UNKNOWN_EXCEPTIONUAPI failed due to unknown reason.
USER_NOT_EXISTFThis user doesn't exist.
PASS_HAS_NOT_EXISTFPass not found.
PASS_USED_OCCUPIEDFThis pass is already used.
PASS_HAS_NOT_USEDFThis pass has not been used.
BIZ_NOT_SUPPORTFUnrecognized business type.
PASS_STATUS_ILLEGALFThe status of the pass is invalid.