Payment class

Represents a payment processed by the Square API.

Annotations
  • @JsonSerializable()

Constructors

Payment({String? id, Money? amountMoney, Money? appFeeMoney, Money? approvedMoney, BankAccountPaymentDetails? bankAccountDetails, Address? billingAddress, String? buyerEmailAddress, List<String>? capabilities, CardPaymentDetails? cardDetails, CashPaymentDetails? cashDetails, String? createdAt, String? customerId, String? delayAction, String? delayedUntil, String? employeeId, ExternalPaymentDetails? externalDetails, String? locationId, String? note, String? orderId, List<ProcessingFee>? processingFee, String? receiptNumber, String? receiptUrl, String? referenceId, List<String>? refundIds, Money? refundedMoney, RiskEvaluation? riskEvaluation, Address? shippingAddress, String? sourceType, String? statementDescriptionIdentifier, String? status, Money? tipMoney, Money? totalMoney, String? updatedAt, String? versionToken, String? delayDuration})
@macro Represents a payment processed by the Square API.
const
Payment.fromJson(Map<String, dynamic> json)
Converts a Map to an Payment
factory

Properties

amountMoney Money?
Read only A unique ID for the payment.
final
appFeeMoney Money?
The amount the developer is taking as a fee for facilitating the payment on behalf of the seller. This amount is specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see Take Payments and Collect Fees. The amount cannot be more than 90% of the total_money value.
final
approvedMoney Money?
The initial amount of money approved for this payment.
final
bankAccountDetails BankAccountPaymentDetails?
Read only Details about a bank account payment. These details are only populated if the source_type is BANK_ACCOUNT.
final
billingAddress Address?
Read only The buyer's billing address.
final
buyerEmailAddress String?
Read only The buyer's email address.
final
capabilities List<String>?
Read only Actions that can be performed on this payment: EDIT_AMOUNT_UP - The payment amount can be edited up. EDIT_AMOUNT_DOWN - The payment amount can be edited down. EDIT_TIP_AMOUNT_UP - The tip amount can be edited up. EDIT_TIP_AMOUNT_DOWN - The tip amount can be edited down.
final
cardDetails CardPaymentDetails?
EDIT_TIP_AMOUNT_DOWN - The tip amount can be edited down.
final
cashDetails CashPaymentDetails?
Details about a cash payment. These details are only populated if the source_type is CASH.
final
createdAt String?
Read only The timestamp of when the payment was created, in RFC 3339 format. Examples for January 25th, 2020 6:25:34pm Pacific Standard Time: UTC: 2020-01-26T02:25:34Z Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00
final
customerId String?
Read only The Customer ID of the customer associated with the payment.
final
delayAction String?
Read only The action to be applied to the payment when the delay_duration has elapsed. This field is read-only. Current values include CANCEL.
final
delayDuration String?
Read only The duration of time after the payment's creation when Square automatically applies the delay_action to the payment. This automatic delay_action applies only to payments that do not reach a terminal state (COMPLETED, CANCELED, or FAILED) before the delay_duration time period. This field is specified as a time duration, in RFC 3339 format. Notes: This feature is only supported for card payments. Default: Card-present payments: "PT36H" (36 hours) from the creation time. Card-not-present payments: "P7D" (7 days) from the creation time. Example for 2 days, 12 hours, 30 minutes, and 15 seconds: P2DT12H30M15S
final
delayedUntil String?
Read only The read-only timestamp of when the delay_action is automatically applied, in RFC 3339 format. Note that this field is calculated by summing the payment's delay_duration and created_at fields. The created_at field is generated by Square and might not exactly match the time on your local machine. Examples for January 25th, 2020 6:25:34pm Pacific Standard Time: UTC: 2020-01-26T02:25:34Z Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00
final
employeeId String?
Read only An optional ID of the employee associated with taking the payment.
final
externalDetails ExternalPaymentDetails?
Read only Details about an external payment. The details are only populated if the source_type is EXTERNAL.
final
hashCode int
The hash code for this object.
no setterinherited
id String?
Read only A unique ID for the payment.
final
locationId String?
Read only The ID of the location associated with the payment.
final
note String?
Read only An optional note to include when creating a payment.
final
orderId String?
Read only The ID of the order associated with the payment.
final
processingFee List<ProcessingFee>?
Read only The processing fees and fee adjustments assessed by Square for this payment.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
receiptNumber String?
Read only The payment's receipt number. The field is missing if a payment is canceled.
final
receiptUrl String?
Read only The URL for the payment's receipt. The field is only populated for COMPLETED payments.
final
referenceId String?
Read only An optional ID that associates the payment with an entity in another system.
final
refundedMoney Money?
Read only A list of refund_ids identifying refunds for the payment.
final
refundIds List<String>?
Read only A list of refund_ids identifying refunds for the payment.
final
riskEvaluation RiskEvaluation?
Read only Provides information about the risk associated with the payment, as determined by Square. This field is present for payments to sellers that have opted in to receive risk evaluations.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shippingAddress Address?
Read only The buyer's shipping address.
final
sourceType String?
Read only The source type for this payment. Current values include CARD, BANK_ACCOUNT, CASH, or EXTERNAL.
final
statementDescriptionIdentifier String?
Read only Additional payment information that gets added to the customer's card statement as part of the statement description. Note that the statement_description_identifier might get truncated on the statement description to fit the required information including the Square identifier (SQ *) and the name of the seller taking the payment.
final
status String?
Read only Indicates whether the payment is APPROVED, PENDING, COMPLETED, CANCELED, or FAILED.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
tipMoney Money?
The amount designated as a tip. This amount is specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see Working with Monetary Amounts.
final
totalMoney Money?
Read only The total amount for the payment, including amount_money and tip_money. This amount is specified in the smallest denomination of the applicable currency (for example, US dollar amounts are specified in cents). For more information, see Working with Monetary Amounts.
final
updatedAt String?
Read only The timestamp of when the payment was last updated, in RFC 3339 format. Examples for January 25th, 2020 6:25:34pm Pacific Standard Time: UTC: 2020-01-26T02:25:34Z Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00
final
versionToken String?
Used for optimistic concurrency. This opaque token identifies a specific version of the Payment object.
final

Methods

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

Operators

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