Class SepaQrCode

Namespace
Subsembly.Sepa
Assembly
Subsembly.Sepa.dll

Represents the content of a EPC069 QR Code, and includes methods for parsing and generating EPC 069 QR Code data strings.

public class SepaQrCode
Inheritance
SepaQrCode
Inherited Members

Remarks

When generating a QR code at least BeneficiaryIBAN and BeneficiaryName must be set.

Properties

Amount

The decimal amount.

public decimal Amount { get; set; }

Property Value

decimal

The value must be in the range from 0.01 through 999,999,999.99. The initial value is zero.

Exceptions

ArgumentOutOfRangeException

An attempt was made to set a value less than 0.01, or a value greater than 999999999.99.

ArgumentException

An attempt was made to set a decimal value with more than two significant fractional digits.

BeneficiaryBIC

public SepaBIC BeneficiaryBIC { get; set; }

Property Value

SepaBIC

BeneficiaryIBAN

public SepaIBAN BeneficiaryIBAN { get; set; }

Property Value

SepaIBAN

BeneficiaryName

public string BeneficiaryName { get; set; }

Property Value

string

BeneficiaryToOriginatorInformation

public string BeneficiaryToOriginatorInformation { get; set; }

Property Value

string

CreditorReferenceInformation

Creditor reference information.

public string CreditorReferenceInformation { get; set; }

Property Value

string

Remarks

Only either this CreditorReferenceInformation or the RemittanceInformation may be set, but not both.

Exceptions

ArgumentException

An attempt was made to set a string longer than 35 characters.

See Also

Currency

The currency code of the amount.

public string Currency { get; set; }

Property Value

string

The initial value of this property is "EUR".

Exceptions

ArgumentException

An attempt was made to set a value that is not a syntactically valid currency code.

IsValid

Validates this instance.

public bool IsValid { get; }

Property Value

bool

If the contained data is valid for generating a EPC069 code, then the value is true. If some mandatory data is missing or the data is otherwise invalid, then the value is false.

PurposeCode

Purpose code.

public string PurposeCode { get; set; }

Property Value

string

Exceptions

ArgumentException

An attempt was made to set a string that is not a syntactically correct purpose code.

RemittanceInformation

Unstructured remittance information.

public string RemittanceInformation { get; set; }

Property Value

string

If no remittance information is provided, this property is null, which is also its default value. A remittance information string must not be longer than MaxRmtInfLen (140) characters.

Remarks

Only either this RemittanceInformation or the CreditorReferenceInformation may be set, but not both.

Only latin characters should be used. It is up to the caller to ensure that the provided string contains only characters allowed in the encoding used when generating the QR code data.

Exceptions

ArgumentException

An attempt was made to set a string longer than 140 characters.

See Also

Methods

Clear()

public void Clear()

Create(SepaQrCodeCharacterSet)

Creates a EPC069 data string for initiating a SEPA credit transfer to the given account.

public string Create(SepaQrCodeCharacterSet nCharacterSet = SepaQrCodeCharacterSet.ISO_8859_1)

Parameters

nCharacterSet SepaQrCodeCharacterSet

The character set value that shall be included in the QR code payload data that is produced. This parameter has no effect on the actual character set used for encoding the QR code. The character set used when encoding the QR code image, must be specified when the QR code image is created. Of course, the same character set than specified here, should be used for the actual encoding.

Returns

string

TryParse(string)

public static SepaQrCode TryParse(string sSepaQrCodeData)

Parameters

sSepaQrCodeData string

The decoded QR code data. This data was already converted from a byte sequence to a string, using some character set encoding rules, usually UTF-8. So the character set specification inside of the data is meaningless.

Returns

SepaQrCode

Exceptions

ArgumentNullException

The parameter sSepaQrCodeData was null.