Account Inquiry

On this page, we’ll dive into the account inquiry endpoint you can use to inquire bank accounts programmatically.

The account inquiry model

The account inquiry model is the data structure that represents an account inquiry in WePay. The following attributes are associated with the account inquiry model:

Properties

FieldTypeDescription
accountNamestring

The owner name of the account.

accountNumberstring

The number of the account.

isValidboolean

The validity flag of the account.


POST/v1/disbursement/fiat/inquiry

Request Account Inquiry

This endpoint is used to initiate a request account inquiry. In order to initiate an account inquiry, you must provide the bank code and the account number.

Read the statusCode field in the response body rather than the HTTP status code.

Please ensure that the account number is a positive number and that you are using valid bank codes.

Required attributes

FieldTypeDescription
bankCodestring

The bank code in which the account number is coming from.

accountNumberstring

The number of the account.

Request

POST
/v1/disbursement/fiat/inquiry
curl --location \
https://staging.wepay.to/v1/disbursement/fiat/inquiry \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
    "bankCode": "bank_central_asia",
    "accountNumber": "6124125124",
}'

Response

{
  "statusCode": 200,
  "message": "Successfully request fiat disbursement inquiry",
  "data": {
      "accountName": "John Green",
      "accountNumber": "6124125124",
      "isValid": true,
  }
}

HTTP Status 400 Example

Error Response

{
    "statusCode": 400,
    "error": "Bad request",
    "message": "Failed to validate account"
}

Did this page help you ship?