7. Update Budget

1 API Path

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

Production domain: https://open.alipay.hk

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

Scenario:Budget management,add or reduce stock

2 API Request

2.1 Request

2.1.1 Header

Name

Description

Type

Length

Required

Remarks

Sample

clientId

Client ID

String

M

211020000000000000044

signature

Message signature information

String

M

algorithm=sha256withrsa,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

2.1.2 Body

Name

Description

Type

Length

Required

Remarks

Sample

templateCode

Card template code

String

32

M

82022031000135000000000000624234

number

Card template number

Integer

1~999999

M

The budget to be added: the total budget after the addition cannot exceed 1,000,000

The reduced budget: the reduced 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

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

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",
    "appendNum": 100,
    "updateType": "APPEND_BUDGET",
    "merchantId": "2160120041113167",
    "requestId": "22022091900135505000000000214447"
}

3.2 Response

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