Charge

@objcMembers
public final class Charge : NSObject, ChargeProtocol, IdentifiableWithString

Charge model. To charge a credit or a debit card, you create a charge object. You can retrieve and refund individual charges as well as list all charges. Charges are identified by a unique random ID.

  • Unique charge identifier.

    Declaration

    Swift

    public let identifier: String
  • API version.

    Declaration

    Swift

    public let apiVersion: String
  • Amount. The minimum amount is $0.50 US or equivalent in charge currency.

    Declaration

    Swift

    public let amount: Decimal
  • Three-letter ISO currency code, in lowercase. Must be a supported currency.

    Declaration

    Swift

    public let currency: Currency
  • Customer.

    Declaration

    Swift

    public let customer: Customer
  • Flag indicating whether the object exists in live mode or test mode.

    Declaration

    Swift

    public let isLiveMode: Bool
  • Defines if the card used in transaction was saved.

    Declaration

    Swift

    public let cardSaved: Bool
  • Objects of the same type share the same value

    Declaration

    Swift

    public let object: String
  • Charge authentication if required.

    Declaration

    Swift

    public private(set) var authentication: Authentication?
  • Information related to the payment page redirect.

    Declaration

    Swift

    public let redirect: TrackingURL
  • Post URL.

    Declaration

    Swift

    public private(set) var post: TrackingURL?
  • Saved card.

    Declaration

    Swift

    public private(set) var card: SavedCard?
  • Charge source.

    Declaration

    Swift

    public let source: Source
  • Charge destinations.

    Declaration

    Swift

    public private(set) var destinations: DestinationGroup?
  • Charge status.

    Declaration

    Swift

    public let status: ChargeStatus
  • Defines if 3D secure is required for the transaction.

    Declaration

    Swift

    public let requires3DSecure: Bool
  • Transaction details.

    Declaration

    Swift

    public let transactionDetails: TransactionDetails
  • An arbitrary string attached to the object. Often useful for displaying to users.

    Declaration

    Swift

    public private(set) var descriptionText: String?
  • Set of key/value pairs that you can attach to an object. It can be useful for storing additional information about the object in a structured format.

    Declaration

    Swift

    public private(set) var metadata: Metadata?
  • Charge reference.

    Declaration

    Swift

    public private(set) var reference: Reference?
  • Receipt settings.

    Declaration

    Swift

    public private(set) var receiptSettings: Receipt?
  • Acquirer information.

    Declaration

    Swift

    public private(set) var acquirer: Acquirer?
  • Charge response.

    Declaration

    Swift

    public private(set) var response: Response?
  • Extra information about a charge. This will appear on your customer’s credit card statement. It must contain at least one letter.

    Declaration

    Swift

    public private(set) var statementDescriptor: String?
  • Declaration

    Swift

    public convenience init(from decoder: Decoder) throws