Bank information

Ensuring bank details are correct

To validate BSB, BIC (aka SWIFT code) or IBAN use the bankInfo query.

The bankInfo query accepts only one of bsb, bic, or iban arguments. Otherwise, it will return an error.

The below sample queries will return null if the BSB, BIC, IBAN is not found.

Validate BSB

const bodyJSON = {
  variables: {
    input: {
      bsb: "012622",
    },
  }, 
  query: `
query ($input: BankInfoQueryInput!) {
  bankInfo(input: $input) {
    name 
    address {
      building street suburb state country postcode
    }
  }
}`,
};

Validate BIC

const bodyJSON = {
  variables: {
    input: {
      bic: "BARCGB22",
    },
  }, 
  query: `
query ($input: BankInfoQueryInput!) {
  bankInfo(input: $input) {
    name 
    address {
      building street suburb state country postcode
    }
  }
}`,
};

Validate IBAN

const bodyJSON = {
  variables: {
    input: {
      iban: "DE59500105178646768962",
    },
  }, 
  query: `
query ($input: BankInfoQueryInput!) {
  bankInfo(input: $input) {
    name 
    address {
      building street suburb state country postcode
    }
  }
}`,
};

Last updated

Was this helpful?