Checkout

Invoking Checkout causes consumers to enter the PazeSM user interface (UI) via popup.

  • The SDK will render the following screens:
    • Consumer authentication
    • Card selection
    • Shipping address selection or entry (if configured in the Checkout request)
  • The response of Checkout will contain masked card, consumer, and billing & shipping address, per the corresponding Checkout API request.

Checkout Request Parameters

Seq. # Field Name Field TypeField UsageDescription
1emailAddressStringOptionalEmail address as consumer identity.

Underlying email address value MUST conform to the RFC 5322 address-spec syntax simplified to all lowercase characters.
2sessionIdStringOptionalSession reference identifier generated by the Merchant. If present here, it will be returned in the Checkout response. (Maximum length 255 characters)
3actionCodeEnumOptionalValid values:

START_FLOW (default)
CHANGE_CARD
\ CHANGE_SHIPPING_ADDRESS
4intentEnumOptionalValid values:

REVIEW_AND_PAY (default)
EXPRESS_CHECKOUT
\ ADD_CARD

Consider the primary intent of the API call when setting this value.
5transactionValueObject(TransactionValue)ConditionalCurrency code and amount of transaction.

See Transaction Value Data Elements for more information.

Condition: Required if intent is EXPRESS_CHECKOUT.
7shippingPreferenceEnumOptionalWhether Merchant wants to have shipping address collected.

Valid values:
ALL (default)
NONE
8billingPreferenceEnumOptionalVerbosity of billing address required by the Merchant.

Valid values:
ALL (default)
ZIP_COUNTRY (scoped for future release)
\ NONE
9cobrandList(Cobrand)OptionalDetails for cobranded cards offered by the Merchant. If the Merchant has multiple cobranded cards, the list should be ordered from highest to lowest display priority.
10acceptedShippingCountriesListOptionalArray of country codes in ISO 3166-1 alpha-2 format as Shipping restrictions.
11acceptedPaymentCardNetworksListOptionalAn array of payment card networks.

Valid values:
VISA
MASTERCARD

Checkout Response Attributes

Field TypeField StatusDescription
1resultEnum
2checkoutResponseObject(CheckoutResponse)

Checkout Promise – Resolve and Reject

FunctionDescription
resolve()This is the JS Promise (fulfilled) call when the request is successfully processed by the PazeSM SDK.

A JSON object with attributes will be passed in the response.
Reject()This is the JS Promise call when there is an error. The object passed in is an error.

Checkout Business Errors

Reason CodeDescription
ACCT_INACCESSIBLEThe wallet exists but is not currently accessible (e.g., is suspended) or User Not Found.
CLIENT_DATA_INVALIDInvalid client data.

actionCode CHANGE_CARD will be conditionally invalid if the consumer’s wallet only has one card.

actionCode CHANGE_SHIPPING_ADDRESS will be conditionally invalid if shippingPreference is NONE.
shippingPreference ALL will be conditionally invalid if intent is ADD_CARD.

transactionValue being provided will be conditionally invalid if intent is ADD_CARD.

transactionValue not being provided will be conditionally invalid if intent is EXPRESS_CHECKOUT.

Checkout Code Examples

// Response dictionary {
required String result;
conditional JWS<CheckoutResponse> checkoutResponse;
}
checkout({
  optional String emailAddress;
  optional String sessionId;
  optional Enum actionCode;
  optional Enum intent;
  conditional TransactionValue transactionValue;
  optional Enum shippingPreference;
  optional Enum billingPreference;
  optional List<Cobrand> cobrand;
  optional List<String> acceptedShippingCountries;
  optional List<String> acceptedPaymentCardNetworks;
})