Sample Code

This sample code is provided solely for reference and is not intended to represent any real consumers or businesses.

Initialize

// Request
    ({
            client: {
                id: "mOYSSfG9VQonnTRZ8Zct5h2GnAeNj38lGHQy0xIeCWsrmE1LY",
                name: "Orchid Bonanza",
                profileId: "orchidBonanzaMain",
                externalSubMerchantId: “019718e7 - dbc1 - 74 b5 - 9019 - 032260 d9f074”,
                merchantCategoryCode: “0303”,
                brandName: “Orchid West”,
                statementDescriptor: “PAZE ORCHID 0303 $13 .00”,
                url: “ < https: //www.example.com/myapp”}})
//Response>: 
    {}

CanCheckout

// Request
canCheckout ({
emailAddress: "[email protected]"
})

// Response: 
{
    "consumerPresent": true
  }

Checkout

//Request:
    checkout({
            emailAddress: "[email protected]",
            sessionId: "YSr6zUH6gsAs3riQMhTL",
            actionCode: "START_FLOW",
            intent: "REVIEW_AND_PAY",
            transactionValue: {
                transactionCurrencyCode: "USD",
                transactionAmount: "73.29"
            },
            shippingPreference: "ALL",
            billingPreference: "ZIP_COUNTRY",
            cobrand: {
                [
                    cobrandName: "Orchid Bonanza Optimum",
                    benefitsOffered: true,
                ]
            },
            acceptedShippingCountries: [
                "US",
                "CA",
                "MX"
            ],
            acceptedPaymentCardNetworks: [
                "VISA",
                "MASTERCARD", “DISCOVER”
            ],
            enhancedTransactionData: {
                ecomData: {
                    cartContainsGiftCard: true,
                    orderForPickup: true,
                    orderQuantity: "3",
                    orderHighestCost: "54.17",
                    finalShippingAddress: {
                        name: "Another Customer",
                        line1: "1234 Main St.",
                        line2: "Apt. 3A",
                        city: "Evansville",
                        state: "Indiana",
                        zip: "47705",
                        countryCode: "US"
                    }
                }
            })

     // Response: 
             {
            "result": "COMPLETE",
            "checkoutResponse": "eyJhdWQiOiJmaWxlOlwvXC8iLCJraWQiOi……..sAxxsSgJtrteqa3QadRQ"
        }

Complete

//Request:
    complete({
            sessionId: "YSr6zUH6gsAs3riQMhTL",
            transactionType: "BOTH",
            transactionOptions: {
                merchantCategoryCode: "5193",
                billingPreference: "ZIP_COUNTRY",
                payloadTypeIndicator: "ID",
            },
            transactionValue: {
                transactionCurrencyCode: "USD",
                transactionAmount: "73.29"
            },
            enhancedTransactionData: {
                ecomData: {
                    cartContainsGiftCard: true,
                    orderForPickup: true,
                    orderQuantity: "3",
                    orderHighestCost: "54.17",
                    finalShippingAddress: {
                        name: "Another Customer",
                        line1: "1234 Main St.",
                        line2: "Apt. 3A",
                        city: "Evansville",
                        state: "Indiana",
                        zip: "47705",
                        countryCode: "US"
                    }
                },
                processingNetwork: [
                    "VISA"
                ]
            })

      //Response:  
             {
            "completeResponse": "eyJhdWQiOiJmaWxlOlwvXC…..yzt9iIGnde__dSiw4iTvYAJtMqzq8DggFD_URzvdPA"
        }