Create a Bank account

To create a bank account, specify the basic account properties.

$bankAccountReq = Pencepay_Request_BankAccount::build()
    ->accountHolder('John Hancock')
    ->accountNumber('1111112222')
    ->iban('GB0000000000000')
    ->bic('GB001BIC')
    ->countryCode('HR')
    ->customData(array('my' => 'value'));

$bankAccount = Pencepay_BankAccount::create('customer_uid', $bankAccountReq);

Notice that countryCode is required, although it seems redundant (it can be determined from IBAN). The reason for requiring this property is so that we can do a proper validation on the full set of bank account details you provide, as per the rules for the given country.