# OfflinePayment

class OfflinePayment : Payment

The description of a completed payment, that was taken while Offline. All currency amounts are specified in the smallest denomination of the applicable currency. For example, US dollar amounts are specified in cents.

## Types

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

Builder class for constructing OfflinePayment objects.

## Properties

amountMoney
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.

appFeeMoney
Link copied to clipboard
open override val appFeeMoney: Money?

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

cardDetails
Link copied to clipboard
open override val cardDetails: CardPaymentDetails.OfflineCardPaymentDetails?

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.

cashDetails
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.

createdAt
Link copied to clipboard
open override val createdAt: Date

Timestamp of when the payment was created.

externalDetails
Link copied to clipboard
open override val externalDetails: ExternalPaymentDetails?

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

id
Link copied to clipboard
val id: String?

Unique ID for this payment, assigned by Square. Value stays `null` until payment is uploaded and gets a server-side ID.

localId
Link copied to clipboard
val localId: String

Unique ID for this payment, generated when device is offline. Can be used to identify this Payment until it is uploaded to server and id becomes available.

locationId
Link copied to clipboard
open override val locationId: String

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

orderId
Link copied to clipboard
open override val orderId: String?

The ID of the order associated with this payment.

referenceId
Link copied to clipboard
open override val referenceId: String?

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

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

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

status
Link copied to clipboard
val status: Payment.OfflineStatus

Indicates the OfflineStatus of the payment.

tipMoney
Link copied to clipboard
open override val tipMoney: Money?

The portion of totalMoney that is designated as a tip.

totalMoney
Link copied to clipboard
val totalMoney: Money

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.

updatedAt
Link copied to clipboard
open override val updatedAt: Date

Timestamp when the payment was last updated.

uploadedAt
Link copied to clipboard
val uploadedAt: Date?

Timestamp of when the payment was uploaded for processing.

## Functions

asOfflinePayment
Link copied to clipboard
fun asOfflinePayment(): Payment.OfflinePayment
asOnlinePayment
Link copied to clipboard
fun asOnlinePayment(): Payment.OnlinePayment
buildUpon
Link copied to clipboard
fun buildUpon(): Payment.OfflinePayment.Builder
isOfflinePayment
Link copied to clipboard
fun isOfflinePayment(): Boolean
isOnlinePayment
Link copied to clipboard
fun isOnlinePayment(): Boolean