Home > API > Common > Validate bank account

Validate bank account

Validates and evaluates the account and bank details in the context of direct debit payment. It is possible to transfer either the combination of BankCode and AccountNumber or IBAN and BIC

PATH:

/api/v3/validate/bank-account

REQUEST BODY SCHEMA:

bankAccount
required

string <= 34 characters

Account number

bankCode

string <= 11 characters

Account swift number

bankNumber

string <= 50 characters

Bank and branch identifier

createToken

boolean

nonce

string

Unique string provided by AfterPay if the merchant is using Hosted Fields. Contact your Integration Manager for more details.

RESPONSES:

200 OK

RESPONSE SCHEMA:

isValid

boolean

Is response valid

riskCheckMessages

array of riskCheckMessages

Risk check messages

Array () [
type

string

Enum: BusinessError TechnicalError NotificationMessage

Message type

code

string <= 100 characters

Confirmation or error code

message

string <= 4096 characters

Message content

customerFacingMessage

string <= 4096 characters

Message to display to customer

actionCode

string

Enum: Unavailable AskConsumerToConfirm AskConsumerToReEnterData OfferSecurePaymentMethods RequiresSsn AskConsumerToIdentify

Possible next action to make

fieldReference

string <= 100 characters

Reference to field that caused an error


]
token

string

400 Model validation failed.

RESPONSE SCHEMA:

Array () [
type

string

Enum: BusinessError TechnicalError NotificationMessage

Message type

code

string <= 100 characters

Confirmation or error code

message

string <= 4096 characters

Message content

customerFacingMessage

string <= 4096 characters

Message to display to customer

actionCode

string

Enum: Unavailable AskConsumerToConfirm AskConsumerToReEnterData OfferSecurePaymentMethods RequiresSsn AskConsumerToIdentify

Possible next action to make

fieldReference

string <= 100 characters

Reference to field that caused an error

]
401 Authorization has been denied for this request.
500 Internal server error.

Path

post

/api/v3/validate/bank-account

Request samples

  • {
    • "bankAccount": "string",
    • "bankCode": "string",
    • "bankNumber": "string",
    • "createToken": true,
    • "nonce": "string"
  • }

Response samples

200400
  • {
    • "isValid": true,
    • "riskCheckMessages": [ ...
      • {
        • "type": "string",
        • "code": "string",
        • "message": "string",
        • "customerFacingMessage": "string",
        • "actionCode": "string",
        • "fieldReference": "string"
        }
      ],
    • "token": "string"
    }
  • [
      ...
      • {
        • "type": "string",
        • "code": "string",
        • "message": "string",
        • "customerFacingMessage": "string",
        • "actionCode": "string",
        • "fieldReference": "string"
        }
    ]