PayByBankAccountRequest

public struct PayByBankAccountRequest : Codable

Request model for bank account.

  • Format of the account identification text.

    Note

    Enum: “SortCode” “Iban” “Bban”

    Declaration

    Swift

    public let type: PayByBankAccountType
  • Account identification. If type = “SortCode” then a 6-digit SortCode appended with a 8-digit Account Number merged into a 14-digit value, with no dashes in between. For type = “IBAN” the IBAN of the account (compliant with ISO 13616-1) and for type = “BNAN” the BBAN of the account must be set.

    Declaration

    Swift

    public let identification: String
  • Full legal name of the account owner.

    Declaration

    Swift

    public let name: String
  • Currency code of the account in ISO 4217 format.

    Note

    Enum: “GBP” “USD” “EUR”

    Declaration

    Swift

    public let currency: PayByBankCurrency
  • bic

    A standard ISO 9362 compliant Bank Identifier Code.

    Warning

    It is required for international payments (if either sender or the creditor account is outside the SEPA region).

    Declaration

    Swift

    public let bic: String?
  • Creates an instance from the specified parameters.

    Declaration

    Swift

    public init(type: PayByBankAccountType,
                identification: String,
                name: String,
                currency: PayByBankCurrency,
                bic: String? = nil)

    Parameters

    type

    Instance’s PayByBankAccountType, which is format of the account identification text.

    identification

    Account identification.

    name

    Full legal name of the account owner.

    currency

    Instance’s PayByBankCurrency, which is currency code of the account in ISO 4217 format.

    bic

    A standard ISO 9362 compliant Bank Identifier Code.

Decodable & Encodable

  • Creates a new instance by decoding from the given decoder.

    Declaration

    Swift

    init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder to read data from.

  • Encodes instance into the given encoder.

    Declaration

    Swift

    func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to write data to.