BUYCheckout Class Reference
| Inherits from | BUYObject : NSObject |
|---|---|
| Conforms to | BUYSerializable |
| Declared in | BUYCheckout.h |
Overview
The checkout object. This is the main object that you will interact with when creating orders on Shopify.
Note: Do not create a BUYCheckout object directly. Use initWithCart: to transform a BUYCart into a BUYCheckout.
Other Methods
email
The customer’s email address
@property (nonatomic, copy) NSString *emailDeclared In
BUYCheckout.h
token
Unique token for the checkout on Shopify
@property (nonatomic, copy, readonly) NSString *tokenDeclared In
BUYCheckout.h
cartToken
Unique token for a cart which can be used to convert to a checkout
@property (nonatomic, copy, readonly) NSString *cartTokenDeclared In
BUYCheckout.h
requiresShipping
States whether or not the fulfillment requires shipping
@property (nonatomic, assign, readonly) BOOL requiresShippingDeclared In
BUYCheckout.h
taxesIncluded
States whether or not the taxes are included in the price
@property (nonatomic, assign, readonly) BOOL taxesIncludedDeclared In
BUYCheckout.h
currency
The three letter code (ISO 4217) for the currency used for the payment
@property (nonatomic, copy, readonly) NSString *currencyDeclared In
BUYCheckout.h
subtotalPrice
Price of the order before shipping and taxes
@property (nonatomic, strong, readonly) NSDecimalNumber *subtotalPriceDeclared In
BUYCheckout.h
totalTax
The sum of all the taxes applied to the line items in the order
@property (nonatomic, strong, readonly) NSDecimalNumber *totalTaxDeclared In
BUYCheckout.h
totalPrice
The sum of all the prices of all the items in the order, taxes and discounts included
@property (nonatomic, strong, readonly) NSDecimalNumber *totalPriceDeclared In
BUYCheckout.h
paymentSessionId
The Payment Session ID associated with a credit card transaction
@property (nonatomic, strong, readonly) NSString *paymentSessionIdDeclared In
BUYCheckout.h
paymentURL
URL to the payment gateway
@property (nonatomic, strong, readonly) NSURL *paymentURLDeclared In
BUYCheckout.h
reservationTime
Reservation time on the checkout in seconds. Setting to @0 and updating the checkout will release inventory reserved by the checkout (when product inventory is not infinite).
@property (nonatomic, strong) NSNumber *reservationTimeDiscussion
300 seconds is default and maximum. reservationTime is reset to @300 on every
updateCheckout:completion: call.
Note: This can also be done with removeProductReservationsFromCheckout:completion
found in the BUYClient.
Declared In
BUYCheckout.h
reservationTimeLeft
Reservation time remaining on the checkout in seconds
@property (nonatomic, strong, readonly) NSNumber *reservationTimeLeftDeclared In
BUYCheckout.h
paymentDue
Amount of payment due on the checkout
@property (nonatomic, strong, readonly) NSDecimalNumber *paymentDueDeclared In
BUYCheckout.h
lineItems
Array of BUYLineItem objects in the checkout Note: These are different from BUYCartLineItems in that the line item objects do not include the BUYProductVariant
@property (nonatomic, readonly, copy) NSArray<__kindofBUYLineItem*> *lineItemsDeclared In
BUYCheckout.h
taxLines
Array of tax line objects on the checkout
@property (nonatomic, readonly, copy) NSArray<BUYTaxLine*> *taxLinesDeclared In
BUYCheckout.h
billingAddress
The mailing address associated with the payment method
@property (nonatomic, strong) BUYAddress *billingAddressDeclared In
BUYCheckout.h
shippingAddress
The mailing address to where the order will be shipped
@property (nonatomic, strong) BUYAddress *shippingAddressDeclared In
BUYCheckout.h
shippingRate
The shipping rate chosen for the checkout
@property (nonatomic, strong) BUYShippingRate *shippingRateDeclared In
BUYCheckout.h
shippingRateId
Shipping rate identifier
@property (nonatomic, readonly) NSString *shippingRateIdDeclared In
BUYCheckout.h
discount
A discount added to the checkout
Only one discount can be added to a checkout. Call updateCheckout:completion:
after adding a discount to apply the discount code to the checkout.
@property (nonatomic, strong) BUYDiscount *discountDeclared In
BUYCheckout.h
giftCards
An array of BUYGiftCard objects applied to the checkout
@property (nonatomic, strong, readonly) NSArray<BUYGiftCard*> *giftCardsDeclared In
BUYCheckout.h
channelId
Channel ID where the checkout was created
@property (nonatomic, strong) NSString *channelIdDeclared In
BUYCheckout.h
marketingAttribution
Attributions for the checkout, containing the application name and platform (defaults to applicationName set on the BUYClient, and “iOS” respectively
@property (nonatomic, strong) NSDictionary *marketingAttributionDeclared In
BUYCheckout.h
webCheckoutURL
URL which is used for completing checkout. It is recommended to open the URL in Safari to take advantage of its autocompletion and credit card capture capabilities
@property (nonatomic, strong, readonly) NSURL *webCheckoutURLDeclared In
BUYCheckout.h
webReturnToURL
The URL Scheme of the host app. Used to return to the app from the web checkout
@property (nonatomic, strong) NSString *webReturnToURLDeclared In
BUYCheckout.h
webReturnToLabel
The button title that will appear after checkout to return to the host app. Defaults to “Return to ‘application’”,
where ‘application’ is the applicationName set on the BUYClient
@property (nonatomic, strong) NSString *webReturnToLabelDeclared In
BUYCheckout.h
createdAtDate
Creation date of the checkout
@property (nonatomic, copy, readonly) NSDate *createdAtDateDeclared In
BUYCheckout.h
updatedAtDate
Last updated date for the checkout
@property (nonatomic, copy, readonly) NSDate *updatedAtDateDeclared In
BUYCheckout.h
privacyPolicyURL
The website URL for the privacy policy for the checkout
@property (nonatomic, strong, readonly) NSURL *privacyPolicyURLDeclared In
BUYCheckout.h
refundPolicyURL
The website URL for the refund policy for the checkout
@property (nonatomic, strong, readonly) NSURL *refundPolicyURLDeclared In
BUYCheckout.h
termsOfServiceURL
The website URL for the terms of service for the checkout
@property (nonatomic, strong, readonly) NSURL *termsOfServiceURLDeclared In
BUYCheckout.h
sourceName
The name of the source of the checkout: “mobile_app”
@property (nonatomic, copy, readonly) NSString *sourceNameDeclared In
BUYCheckout.h
sourceIdentifier
The unique identifier for the source: the channelId
@property (nonatomic, copy, readonly) NSString *sourceIdentifierDeclared In
BUYCheckout.h
creditCard
Credit card stored on the checkout
@property (nonatomic, strong, readonly) BUYMaskedCreditCard *creditCardDeclared In
BUYCheckout.h
customerId
Customer ID associated with the checkout
@property (nonatomic, copy, readonly) NSString *customerIdDeclared In
BUYCheckout.h
note
An optional note attached to the order
@property (nonatomic, copy) NSString *noteDeclared In
BUYCheckout.h
order
The BUYOrder for a completed checkout
@property (nonatomic, strong, readonly) BUYOrder *orderDeclared In
BUYCheckout.h
partialAddresses
Flag used to inform server that the shipping address is partially filled, suitable to retrieve shipping rates with partial shipping addresses provided by PKPaymentAuthorizationViewController. Note: This should only ever be set to YES. Setting it to NO throws an exception.
@property (nonatomic, assign) BOOL partialAddressesDeclared In
BUYCheckout.h
– init
It is recommended to instantiate a checkout with a cart, or cart token
- (instancetype)initReturn Value
Checkout
Declared In
BUYCheckout.h
– initWithCart:
Creates a new checkout
- (instancetype)initWithCart:(BUYCart *)cartParameters
cart |
a Cart with line items on it |
|---|
Return Value
a checkout object
Declared In
BUYCheckout.h
– initWithCartToken:
Creates a new checkout
- (instancetype)initWithCartToken:(NSString *)cartTokenParameters
cartToken |
a token for a previously created cart |
|---|
Return Value
a checkout object
Declared In
BUYCheckout.h
ApplePay Methods
– buy_summaryItems
Returns an array of summary items for all Apple Pay requests. Will use ‘PAY TOTAL’ as the summary label. Apple recommends
including the business name in the summary label, so it is recommended to use buy_summaryItemsWithShopName instead.
- (nonnull NSArray<PKPaymentSummaryItem*> *)buy_summaryItemsDeclared In
BUYApplePayAdditions.h
– buy_summaryItemsWithShopName:
Returns an array of summary items for all Apple Pay requests using the shop name in the “PAY” section
- (nonnull NSArray<PKPaymentSummaryItem*> *)buy_summaryItemsWithShopName:(nullable NSString *)shopNameParameters
shopName |
the shops name |
|---|
Return Value
An array of PKPaymentSummaryItems
Declared In
BUYApplePayAdditions.h