OnlinePayment

The description of a completed payment, returned in the success value of Payment Result. All currency amounts are specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents.

Types

Link copied to clipboard
class Builder(id: String, amountMoney: Money, status: Payment.Status, locationId: String, sourceType: Payment.SourceType)

Builder class for constructing OnlinePayment objects.

Properties

Link copied to clipboard
open override val amountMoney: Money

The base amount of money processed for this payment. This amount does not include tip. If a card surcharge was applied to this payment, the surcharge and tax on the surcharge will be included in this amount. Details on the surcharge can be found in CardPaymentDetails.

Link copied to clipboard
open override val appFeeMoney: Money?

The amount taken by the developer as a fee, not more than 90% of totalMoney.

Link copied to clipboard

Actions that can be performed on this payment.

Link copied to clipboard

Details about a card payment. These details are only populated if the sourceType is SourceType.CARD. For an online payment, this will be of type OnlineCardPaymentDetails; for an offline payment, this will be of type OfflineCardPaymentDetails.

Link copied to clipboard
open override val cashDetails: CashPaymentDetails?

Details about a cash payment. These details are only populated if the sourceType is SourceType.CASH.

Link copied to clipboard
open override val createdAt: Date

Timestamp of when the payment was created.

Link copied to clipboard

An optional customer_id to be entered by the developer when creating a payment.

Link copied to clipboard

Details about an external payment. The details are only populated if the sourceType is SourceType.EXTERNAL.

Link copied to clipboard
val id: String

Unique ID for this payment, assigned by Square.

Link copied to clipboard
open override val locationId: String

The ID of the location associated with the payment, if available.

Link copied to clipboard
val note: String?

An optional note to include when creating a payment.

Link copied to clipboard
open override val orderId: String?

The ID of the order associated with this payment.

Link copied to clipboard

Processing fees and fee adjustments assessed by Square on this payment.

Link copied to clipboard

An optional receipt number associated with this payment, assigned by Square. The field is missing if the payment is Payment.Status.CANCELED.

Link copied to clipboard

The URL for the payment's receipt, generated by Square. The field is only populated for COMPLETED payments.

Link copied to clipboard
open override val referenceId: String?

An optional ID that associates this payment with an entity in another system.

Link copied to clipboard
open override val sourceType: Payment.SourceType

The source type of the payment (card, cash, etc).

Link copied to clipboard

An override of the description line on the buyer's statement. Will be prefixed with Square's "SQ*" prefix, and may be truncated by the bank during generation.

Link copied to clipboard
Link copied to clipboard

An optional ID of the team member associated with taking the payment.

Link copied to clipboard
open override val tipMoney: Money?

The portion of totalMoney that is designated as a tip.

Link copied to clipboard

Total money is defined as base amount plus any tip; it doesn't need its own storage allocated, and definitely doesn't need an independent setter.

Link copied to clipboard
open override val updatedAt: Date

Timestamp when the payment was last updated.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard