WorldFirst DocsWorldFirst Docs

Create a budget accountSignature required

POST /amsin/api/v1/business/worldcard/createBudgetAccount

Call this API to set up a budget account.

Structure

A message consists of a header and body. For details, see the following sections.

Request header

Field

Required

Sample

Description

Client-Id

Yes

Client-Id: *****

For more information about these request header fields, see Request header.

Signature

Yes

Signature: algorithm=RSA256, keyVersion=2, signature=*****

Content-Type

Yes

Content-Type: application/json; charset=UTF-8

Request-Time

Yes

Request-Time: 2019-04-04T12:08:56+08:00

Connected-CustomerId

Conditional

Connected-CustomerId: *****

Attention

Required when a partner manages a customer's account.

Access-Token

Conditional

Access-Token: ******

Attention

Required for OAUTH authorization.

Request parameters

requestId String  REQUIRED

The unique ID for creating the budget account.

More information:

  • Maximum length: 32 characters

budgetAccountName String  

The budget account name.

When unspecified, this parameter is named by a default sequence number, for example, Budget Account 2.

More information:

  • Maximum length: 50 characters

Response parameters

result Result  REQUIRED

Indicates the result of the API call.

Show child parameters

requestId String  REQUIRED

The unique ID of creating the budget account.

More information:

  • Maximum length: 32 characters

validationStatus String  REQUIRED

The validation result of whether a budget account can be created. Valid value:

ALLOW: idicates that the creation of budget account is allowed.

openStatus String  REQUIRED

The status of the budget account creation. Valid values:

  • SUCCESS​: A budget account is created successfully.
  • FAIL​: A budget account has failed to be created.

budgetAccountId String  REQUIRED

The budget account ID.

API Explorer

Request

URL
Request Body

Response

Response Body

Result processing logic

After calling the API, a response is returned. The possible responses for result.resultStatus are:

Result status

Description

S

This indicates the API call succeeded.

F

This indicates the API call failed.

For more information on why the call failed, see the result.resultCode table.

U

This indicates the API call result is unknown. The partner can call this API again.


result.resultCode

CodeValueMessageFurther action
SUCCESSSSuccess
UNKNOWN_EXCEPTIONUAPI failed due to unknown reason.

The service might be down, retry later. If the issue persists, contact our Technical Support Team.

SYSTEM_ERRORFSystem error.

Do not retry, and contact our Technical Support Team for more details.

INVALID_SIGNATUREFThe signature is invalid.

Make sure the request is properly signed with a valid signature.

REPEAT_REQUESTFRepeated request

Change the requestId and retry.

ACCESS_TOKEN_EXPIREDFThe access token expired.

Refresh token to get a new access token or contact out Technical Support Team to address it.

AUTHORIZATION_NOT_EXISTFThe authorization does not exist.

Make sure that the input is correct. If the issue persists, contact our Technical Support Team to verify the authorization status.

INSUFFICIENT_DEPOSIT_AMOUNTFThe deposit amount is insufficient to create a budget account.

Make sure that the budget account has adequate deposit and then retry.

USER_NOT_EXISTFThe user does not exist.

Retry with the correct user information.

CONTRACT_CHECK_FAILFThe contract check has failed.

Contact our Technical Support Team to check the status of your API contract. Make sure it is still valid and try again.

BUDGET_ACCOUNT_NUMBER_OVER_LIMIT FThe number of budget accounts exceeds the limit.

You cannot create more than 3 budget accounts. If you need more, contact the WorldFirst client manager.