Payload class

Constructors

Payload({required double amount, required String currency, required String cardNumber, required String cvv, required String expiryMonth, required String expiryYear, required String email, required String txRef, String? token, String? phoneNumber, required String firstname, required String lastname, String? country, bool preauthorize = false, required String redirectUrl, String? clientIp, String? deviceFingerprint, Map<String, String>? metadata, String? narration, Authorization? authorization, String? paymentPlan, String? paymentType, List<SubAccount> subaccounts = const []})
Payload.fromInitializer(PayInitializer i)
Parses a PayInitializer object to Payload object

Properties

amount double
This is the amount to be charged.
getter/setter pair
authorization Authorization?
This is an object that contains the authorization details of the card you want to charge. The authorization instructions for card charges are returned in the initiate charge call as meta.authorization
getter/setter pair
cardNumber String
This is the number on the cardholders card. E.g. 5399 6701 2349 0229.
getter/setter pair
clientIp String?
IP - Internet Protocol. This represents the current IP address of the customer carrying out the transaction
getter/setter pair
country String?
This is the cards issuing country. It is required when the suggested auth mode is avs_noauth
getter/setter pair
currency String
This is the specified currency to charge in.
getter/setter pair
cvv String
Card security code. This is 3/4 digit code at the back of the customers card, used for web payments.
getter/setter pair
deviceFingerprint String?
This is the fingerprint for the device being used. It can be generated using a library on whatever platform is being used
getter/setter pair
email String
This is the email address of the customer
getter/setter pair
expiryMonth String
Two-digit number representing the card's expiration month.
getter/setter pair
expiryYear String
Two digit number representing the card's expiration year
getter/setter pair
firstname String
This is the first name of the customer.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
lastname String
This is the last name of the customer.
getter/setter pair
metadata Map<String, String>?
This is used to include additional payment information
getter/setter pair
narration String?
This displays in the debit narration.
getter/setter pair
paymentPlan String?
This is the id of a previously created payment plan needed to add a card user to the payment plan.
getter/setter pair
paymentType String?
This specifies that the payment method being used. it should be set to - card
getter/setter pair
pbfPubKey String
The developers's public key
no setter
phoneNumber String?
This is the phone number linked to the customer's mobile money account
getter/setter pair
preauthorize bool
This should be set to true for preauthoize card transactions
getter/setter pair
redirectUrl String
This is a url you provide, we redirect to it after the customer completes payment and append the response to it as query parameters. (3DSecure only)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secKey String
The developer's secret key
no setter
subaccounts List<SubAccount>
This is an array of objects containing the subaccount IDs to split the payment into.
getter/setter pair
token String?
The default saved card token
getter/setter pair
txRef String
This is a unique reference peculiar to the transaction being carried out.
getter/setter pair
version Version
The version to use. Either Version.v2 or Version.v3
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Convert payload object to JSON
toString() String
A string representation of this object.
inherited
withToken() Map<String, dynamic>
Convert payload object to JSON when charging with token

Operators

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