Block Funds

An escrow function to prevent clients from withdrawing or transferring a specified amount. The remaining amount users can still make a withdrawal or transfer.

Create

/api/block/create

POST https://sandbox.walletengine.io

Headers

Name
Type
Description

Content-Type*

string

application/json

Authorization*

string

Bearer {{token}}

Request Body

Name
Type
Description

app_id*

string

This is the unique App ID assigned to you by Wallet Engine.

amount*

number

block amount

amount is <= min(available_balance, debit_remainder_allowance)

notes

text

{
  "request_id": "619245bf7cffd"
}

Example Request

{
  "app_id": "5db2a50be7626",
  "amount": "30",
  "notes": "text"
}

Errors This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing.

Error

Description

invalid_arguments

The method was called with invalid arguments.

invalid_arg_name

The method was passed an argument whose name falls outside the bounds of accepted or expected values.

invalid_block_amount

The block amount exceeds the allowed values.

Cancel

/api/block/cancel

POST https://sandbox.walletengine.io

Headers

Name
Type
Description

Content-Type*

string

application/json

Authorization*

string

Bearer {{token}}

Request Body

Name
Type
Description

app_id*

string

This is the unique App ID assigned to you by Wallet Engine.

request_id*

string

The previoustly blocked fund request id from /api/block/create.

{
  "valid": true
}

Example Request

{
  "app_id": "5db2a50be7626",
  "request_id": "619245bf7cffd"
}

Errors This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing.

Error

Description

invalid_arguments

The method was called with invalid arguments.

invalid_arg_name

The method was passed an argument whose name falls outside the bounds of accepted or expected values.

invalid_request_id

Block fund id does not found.

invalid_block_state

Invalid block fund state.

Action

/api/block/action

POST https://sandbox.walletengine.io

Headers

Name
Type
Description

Content-Type*

string

application/json

Authorization*

string

Bearer {{token}}

Request Body

Name
Type
Description

app_id*

string

This is the unique App_ID provided by Wallet Engine for your App.

request_id*

string

The previoustly blocked fund request id from /api/block/create.

amount

number

*required when action=transfer

target_id

string

*required when action=transfer

action*

string

seize or transfer

notes

string

{
    "valid": true
}

Example Request

{
    "app_id": "5db2a50be7626",
    "request_id": "619245bf7cffd",
    "action": "transfer",
    "target_id": "655666794",
    "amount": "30",
    "notes": "text"
}

Errors This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing.

Error

Description

invalid_arguments

The method was called with invalid arguments.

invalid_arg_name

The method was passed an argument whose name falls outside the bounds of accepted or expected values.

invalid_request_id

Block fund id does not found.

invalid_block_state

Invalid block fund state.

invalid_target_id

The recipient's deposit account was not found.

invalid_transfer_amount

Invalid transfer amount.

invalid_remainder_allowance

The transfer amount exceeds the allowed values.

Query

/api/block/query

POST https://sandbox.walletengine.io

Headers

Name
Type
Description

Content-Type*

string

application/json

Authorization*

string

Bearer {{token}}

Request Body

Name
Type
Description

app_id*

string

This is the unique App_ID provided by Wallet Engine for your App.

date_from

date("yyyy-mm-dd")

offset

number

Paging by limit offset.

limit

number

Paging by limit offset. Default 10 max 99 records. Return the first 10 records by default.

state

string

Block Funds State. PENDING: block/create. REMOVED: block/cancel. SEIZED: block/action.

date_to

date("yyyy-mm-dd")

{
  "total": 3,
  "transactions": [
    {
      "amount": 10.0,
      "request_id": "619245bf7cff1",
      "state": "REMOVED",
      "creation_date": "2021-11-18 16:57:51",
      "modified_date": "2021-11-19 00:24:19",
      "notes": "notes"
    },
    {
      "amount": 10.0,
      "request_id": "619245bf7cff2",
      "state": "PENDING",
      "creation_date": "2021-11-12 16:28:08",
      "modified_date": "2021-12-12 16:28:08",
      "notes": "notes"
    },
    {
      "amount": 10.0,
      "request_id": "619245bf7cff3",
      "state": "SEIZED",
      "creation_date": "2021-11-12 16:30:29",
      "modified_date": "2021-12-12 16:30:29",
      "notes": "notes"
    }
  ]
}

Example Request

{
    "app_id": "5db2a50be7626",
    "limit": 10,
    "offset": 0,
    "date_from": "2021-11-31",
    "date_to": "2021-12-31"
}

Errors This table lists the expected errors that this method could return. However, other errors can be returned in the case where the service is down or other unexpected factors affect processing.

Error

Description

invalid_arguments

The method was called with invalid arguments.

invalid_arg_name

The method was passed an argument whose name falls outside the bounds of accepted or expected values.

invalid_client_id

The client account was not found.

Last updated

Was this helpful?