SwishPaymentData class

Swish Payment Data

A class for representing all data used in a Swish payment request. payeeAlias, amount, currency, and callbackUrl are all required and mustn’t be null

payerAlias, payeePaymentReference, payerSSN, and ageLimit are all optional. Use only if you know what you are doing!

message is also optional but is recommended.

Constructors

SwishPaymentData({required String payeeAlias, required String amount, required String currency, required String callbackUrl, String? payeePaymentReference, String? payerAlias, String? payerSSN, String? ageLimit, String? message})
const

Properties

ageLimit String?
Minimum age (in years) that the individual connected to the payerAlias has to be in order for the payment to be accepted. Value has to be in the range of 1 to 99. Note: Since MSS is a stand-alone test system it can not verify the payerAlias age against the ageLimit value.
final
amount String
The amount of money to pay. The amount cannot be less than 0.01 SEK and not more than 999999999999.99 SEK. Valid value has to be all digits or with 2 digit decimal separated with a period.
final
callbackUrl String
URL that Swish will use to notify caller about the result of the payment request. The URL has to use HTTPS.
final
currency String
The currency to use. Currently the only supported value is 'SEK'.
final
hashCode int
The hash code for this object.
no setterinherited
message String?
Merchant supplied message about the payment/order. Max 50 characters. Allowed characters are the letters a-ö, A-Ö, the numbers 0-9 and any of the special characters :;.,?!()-”.
final
payeeAlias String
The Swish number of the payee. It needs to match with Merchant Swish number.
final
payeePaymentReference String?
Payment reference supplied by theMerchant. This is not used by Swish but is included in responses back to the client. This reference could for example be an order id or similar. If set the value must not exceed 35 characters and only the following characters are allowed: a-ö, A-Ö, 0-9, -
final
payerAlias String?
The registered Cell phone number of the person that makes the payment. It can only contain numbers and has to be at least 8 and at most 15 digits. It also needs to match the following format in order to be found in Swish: country code + cell phone number (without leading zero). E.g.: 46712345678 If set, request is handled as E-Commerce payment. If not set, request is handled as M- Commerce payment
final
payerSSN String?
The social security number of the individual making the payment, should match the registered value for payerAlias or the payment will not be accepted. The value should be a proper Swedish social security number (personnummer or sammordningsnummer). Note: Since MSS is a stand-alone test system it can not verify if payerSSN match registered value for payerAlias.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert SwishPaymentData into a JSON object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited