TABLE OF CONTENTS


Introduction

Online Checkout is the process by which a customer goes through to purchase items on an online store/platform. The customer may checkout immediately, or choose to save items to their cart while pondering choices and checkout at a later time. The ACME Shopping Cart facilitates both the immediate and delayed checkout approach. Orders completed via the B2C Checkout endpoints will be associated with the “Online” sale channel.


Online checkout can either be Server based or Browser based.

  • Server Based: Server to server implementation. PCI is in scope for this approach.
  • Browser Based: Browser checkout via CORS. The advantage to this is descoped PCI.


Shopping Cart

All checkout calls require a Shopping Cart to complete.  A Shopping Cart can either be created in advance using the shopping cart endpoint, or it be sent in the checkout call itself. 


See Entitlement Validation Recommended Steps for helpful information on how to validate entitlements in the cart!


Duplicate Payment Prevention

A common issue that developers run into when building custom integrations is with users being charged twice or multiple orders being created at checkout. We have a couple of best practices to safeguard against this issue and to help avoid the need for emergency code changes in your integration. See Checkout APIs - Best Practices and Security.


In addition, ACME fingerprints the card with the amount as an added layer of transaction duplication protection on checkout. If the same card with the exact same amount is used within 5 minutes, error code 16003 will be triggered with the message "Duplicate transaction found" and type "DUPLICATE_TRANSACTION_FOUND". Should this be intentional (e.g. two subsequent orders for the same amount), the user try again after 5 minutes. (Note: Timeframes may be modified at the discretion of ACME.)


Header Parameters
B2C endpoints have required headers for all calls. See Header Parameters for more detail.

Scenarios & Endpoints

For each endpoint below, we provide a brief overview of what it does, the required and optional parameters, as well as an example request and response.



Checkout with a Shopping Cart ID

POST /v2/b2c/checkout

Checkout with a Shopping Cart Object

POST /v2/b2c/checkout




Checkout with a Shopping Cart ID

To checkout with a pre-built Shopping Cart , pass the Shopping Cart ID with the checkout call.


POST /v2/b2c/checkout


Parameters

For Required and optional parameters see ShoppingCart Object and Checkout Object


Example - Checkout with a Shopping Cart ID


Request

curl --location --request POST 'https://sandX-api.acmeticketing.net/v2/b2c/checkout' \
--header 'x-b2c-tenant-id: 123' \
--header 'x-acme-browser-ip: 255.255.255.255' \
--header 'x-acme-api-key: a4c5cfd307834890a6e1e09eb9e11b4d' \
--header 'Content-Type: application/json' \
--data-raw '{
   "shoppingCartId": "637cf533d94c836adf3916d3",
   "billingFirstName": "Jane",
    "billingLastName": "Doe",
    "billingEmail": "janeDoe@gmail.com",
    "billingPhoneNumber": "1234567890",
    "billingAddress1": "A Street 1/2",
    "billingCity": "San Jose",
    "billingState": "California",
    "billingZipCode": "95113",
    "billingCountry": "United States",
    "paymentMethod" : "CreditCard",
    "manualEntryCardNumber": "4242424242424242",
    "expDate": "1124",
    "cvc": "424"
}'


Response

Returns an Order Object (coming soon)


To get more information about an order after it has been created, pass the ID into the order details API (coming soon)

{
    "id": "39837857",
    "tenantId": 123,
    "visitorId": "1573098",
    "email": "janeDoe@gmail.com",
    "billingEmail": "janeDoe@gmail.com",
    "contactFirstName": "Jane",
    "contactLastName": "Doe",
    "billingFirstName": "Jane",
    "billingLastName": "Doe",
    "billingAddress1": "A Street 1/2",
    "billingCountry": "United States",
    "billingCity": "San Jose",
    "billingZipCode": "95113",
    "billingState": "California",
    "address1": "A Street 1/2",
    "country": "United States",
    "city": "San Jose",
    "state": "California",
    "zipCode": "95113",
    "phoneNumber": "1234567890",
    "billingPhoneNumber": "1234567890",
    "orderNumber": "100000207",
    "discountedTotalAmount": "82.00",
    "totalAmount": "82.00",
    "discountedOriginalTotalAmount": "82.00",
    "originalTotalAmount": "82.00",
    "paidAmount": "82.00",
    "balanceAmount": "0.00",
    "refundAmount": "0.00",
    "saleChannel": "Online",
    "checkInStatus": "NotCheckedIn",
    "creationDate": "2022-11-22T14:51:09-08:00",
    "paymentDueDate": "2022-11-22T14:51:09-08:00",
    "orderItems": [
        {
            "parentItemId": "58518388",
            "comboTemplateType": "fixedPrice",
            "eventId": "61f99cfb62bd1f467c397826",
            "ticketingTypeId": "6130fea5bf4aec4ef5db0dc5",
            "eventName": "Behind-the-Scenes Tour",
            "eventStartTime": 1669237200000,
            "ticketingTypeName": "Adult",
            "basicOriginalQuantity": 1,
            "originalQuantity": 1,
            "basicQuantity": 1,
            "quantity": 1,
            "unitPrice": "32.00",
            "discountedUnitPrice": "32.00",
            "discountedOriginalAmount": "32.00",
            "originalAmount": "32.00",
            "discountedAmount": "32.00",
            "amount": "32.00",
            "balanceAmount": "0.00",
            "itemType": "Event",
            "itemTypeNg": "Event",
            "conversionStatus": "NoConversion",
            "itemId": "58518388",
            "displayName": "Adult"
        },
        {
            "itemDetailId": "1581157",
            "parentItemId": "58518389",
            "comboTemplateType": "fixedPrice",
            "basicOriginalQuantity": 1,
            "originalQuantity": 1,
            "basicQuantity": 1,
            "quantity": 1,
            "unitPrice": "50.00",
            "discountedUnitPrice": "50.00",
            "discountedOriginalAmount": "50.00",
            "originalAmount": "50.00",
            "discountedAmount": "50.00",
            "amount": "50.00",
            "balanceAmount": "0.00",
            "itemType": "Inventory",
            "itemTypeNg": "Donation",
            "inventoryId": 4575,
            "inventoryName": "$50",
            "conversionStatus": "NoConversion",
            "itemId": "58518389",
            "displayName": "$50"
        }
    ],
    "createdOn": "2022-11-22T14:51:09-08:00",
    "createdBy": "null",
    "updatedOn": "2022-11-22T14:51:11-08:00",
    "updatedBy": "null",
    "legacy": false,
    "hideEventDate": false,
    "invoiceAfter": false,
    "customerId": 11169232,
    "obfuscated": false
}




Checkout with a Shopping Cart Object

To checkout without an existing/pre-built shopping cart, include a shopping cart object using the shoppingCart attribute as part of your checkout call.


POST /v2/b2c/checkout


Parameters

For Required and optional parameters see ShoppingCart Object and Checkout Object



Example - Checkout with a Shopping Cart Object


Request

curl --location --request POST 'https://sandX-api.acmeticketing.net/v2/b2c/checkout' \
--header 'x-b2c-tenant-id: 123' \
--header 'x-acme-browser-ip: 255.255.255.255' \
--header 'x-acme-api-key: a4c5cfd307834890a6e1e09eb9e11b4d' \
--header 'Content-Type: application/json' \
--data-raw '{
    "shoppingCart":{
        "items": [{
            "itemType": "Event",
            "eventId": "61f99cfb62bd1f467c397826",
            "ticketingTypeId": "6130fea5bf4aec4ef5db0dc5",
            "quantity": 2
        }]
    },
    "billingFirstName": "Jane",
    "billingLastName": "Doe",
    "billingEmail": "janeDoe@gmail.com",
    "billingPhoneNumber": "1234567890",
    "billingAddress1": "123 A Street",
    "billingCity": "San Jose",
    "billingState": "California",
    "billingZipCode": "95113",
    "billingCountry": "United States",
    "paymentMethod" : "CreditCard",
    "manualEntryCardNumber": "4242424242424242",
    "expDate": "1124",
    "cvc": "424"
}'



Response

Returns an Order Object (coming soon)


To get more information about an order after it has been created, pass the ID into the order details API (coming soon)

{
    "id": "39837863",
    "tenantId": 123,
    "visitorId": "1573098",
    "email": "janeDoe@gmail.com",
    "billingEmail": "janeDoe@gmail.com",
    "contactFirstName": "Jane",
    "contactLastName": "Doe",
    "billingFirstName": "Jane",
    "billingLastName": "Doe",
    "billingAddress1": "123 A Street",
    "billingCountry": "United States",
    "billingCity": "San Jose",
    "billingZipCode": "95113",
    "billingState": "California",
    "address1": "123 A Street",
    "country": "United States",
    "city": "San Jose",
    "state": "California",
    "zipCode": "95113",
    "phoneNumber": "1234567890",
    "billingPhoneNumber": "1234567890",
    "orderNumber": "100000211",
    "discountedTotalAmount": "64.00",
    "totalAmount": "64.00",
    "discountedOriginalTotalAmount": "64.00",
    "originalTotalAmount": "64.00",
    "paidAmount": "64.00",
    "balanceAmount": "0.00",
    "refundAmount": "0.00",
    "saleChannel": "Online",
    "checkInStatus": "NotCheckedIn",
    "creationDate": "2022-11-24T14:31:10-08:00",
    "paymentDueDate": "2022-11-24T14:31:10-08:00",
    "orderItems": [
        {
            "parentItemId": "58518396",
            "comboTemplateType": "fixedPrice",
            "eventId": "61f99cfb62bd1f467c397826",
            "ticketingTypeId": "6130fea5bf4aec4ef5db0dc5",
            "eventName": "Behind-the-Scenes Tour",
            "eventStartTime": 1669237200000,
            "ticketingTypeName": "Adult",
            "basicOriginalQuantity": 2,
            "originalQuantity": 2,
            "basicQuantity": 2,
            "quantity": 2,
            "unitPrice": "32.00",
            "discountedUnitPrice": "32.00",
            "discountedOriginalAmount": "64.00",
            "originalAmount": "64.00",
            "discountedAmount": "64.00",
            "amount": "64.00",
            "balanceAmount": "0.00",
            "itemType": "Event",
            "itemTypeNg": "Event",
            "conversionStatus": "NoConversion",
            "itemId": "58518396",
            "displayName": "Adult"
        }
    ],
    "createdOn": "2022-11-24T14:31:10-08:00",
    "createdBy": "null",
    "updatedOn": "2022-11-24T14:31:12-08:00",
    "updatedBy": "null",
    "legacy": false,
    "hideEventDate": false,
    "invoiceAfter": false,
    "customerId": 11169232,
    "obfuscated": false
}