7. Update Budget

1 API Path

/api/open/alipay/v1/ipass/template/manage/updateBudget

Sample:https://open.alipay.hk/api/open/alipay/v1/ipass/template/manage/updateBudget

Scenario:Budget management, add or reduce budget, orverwrite AlipayHK remaining budget.

2 API Request

2.1 Request

2.1.1 Header

Name

Description

Type

Length

Required

Remarks

Sample

client-id

Client ID

String

M

211020000000000000044

signature

Message signature information

String

M

algorithm=RSA256,keyVersion=2,signature=xxxxxxxxxxxyyyyyyyyyyyyyyzzzzzzzzz==

encrypt

Message encryption information

String

O

algorithm=rsa, keyVersion=2

Content-type

Http content type

String

M

application/json; charset=UTF-8

request-time

Request time

String

M

2023-12-18T02:33:31Z

2.1.2 Body

Name

Description

Type

Length

Required

Remarks

Sample

templateCode

Card template code

String

32

M

82022031000135000000000000624234

number

The number to be added, reduced or overwriten.

Integer

1~999999

M

To add budget: the total budget after addition cannot exceed 1,000,000

To reduce budget: the remaining amount is not allowed to be less than the number of issued cards, and negative numbers are not allowed

1000

updateType

Types of budget to be updated

String

32

M

APPEND_BUDGET - Add budget

SUBTRACT_BUDGET - Reduce budget

OVERRIDE_BUDGET - Overwrite ALIPAYHK remaining budget, the actual budget depends on the budget provided by ISV.

*If the template status is closed or expired, the budget can't be updated

APPEND_BUDGET

merchantId

The merchant id, which identifies the settlement target that Alipay would settle to.

String

64

M

2160120041113167

requestId

Request unique ID

String

128

M

22022091900135505000000000214447

2.2 Response

2.2.1 Body

Name

Description

Type

Length

Required

Remarks

Sample

ResultInfo

Result info

Object

/

2.2.2 ResultInfo

Name

Description

Type

Length

Required

Remarks

Sample

resultCode

Result code

String

SUCCESS

resultStatus

Result status

String

F- Fail

S- Success

S

resultMessage

Result message

String

SUCCESS

2.2.3 Result Code

Result Code

Result Status

Description

SUCCESS

S

Success.

PARAM_ILLEGAL

F

Illegal parameters. For example, non-numeric input, invalid date.

PASS_TEMPLATE_HAS_NOT_EXIT

F

Pass template has not exist

PASS_TEMPLATE_STATUS_ILLEGAL

F

Pass templatestatus is illegal

3 Request Sample

3.1 Request

copy
{
    "templateCode": "82022031100135000000000000626075",
    "number": 1000000,
    "updateType": "OVERRIDE_BUDGET",
    "merchantId": "2160120041113167",
    "requestId": "22022091900135505000000000214447"
}

3.2 Response

copy
{
    "resultInfo":{
        "resultCode": "SUCCESS",
        "resultMessage":"success",
        "resultStatus": "S"
    }
}