bankAccount
Requires permission payments:bank-account:read.
Returns one bank account, with the account number masked. Fails if the account does not exist. Needs the bank accounts read permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query BankAccount($id: ID!) {
bankAccount(id: $id) {
id
accountNumber
branchCode
currencyCode
swiftCode
accountName
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query BankAccount($id: ID!) {\n bankAccount(id: $id) {\n id\n accountNumber\n branchCode\n currencyCode\n swiftCode\n accountName\n }\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"bankAccount": {
"id": "id",
"accountNumber": "string",
"branchCode": "string",
"currencyCode": "string",
"swiftCode": "string",
"accountName": "string"
}
}
}
bankAccount(
id: ID!
): BankAccount!
Arguments
bankAccount.id ● ID! non-null scalar
The ID of the bank account.
Type
BankAccount object
A bank account the organization receives money into or pays from, in one currency.