Checkout: eventCheckout

The Checkout event API captures details of the checkout process, such as the cart ID, transaction information, and pricing details. This data is used to understand customer behavior during the purchase stage.

API Endpoint and Method

URL

Copy
https://rcdp-us-east-1.algonomy.com/callback/rest/events/{APP_API_KEY}/eventCheckout

Example URL

Copy
https://rcdp-us-east-1.algonomy.com/callback/rest/events/BESQILOBZCGHVLZTCNTGJMYGQEARWVZVCUPYVUGNCZPJRSUDAR/eventCheckout

HTTP Method

POST

Parameters

Parameter

Type Required or Optional

Description

transactionId String Optional

Unique identifier of the transaction.

Example: "777"

tenderType

String Optional

Payment method used, such as cash, card, or net banking.

Example: "Cash"

checkoutType

String Optional

Type of checkout, such as guest or logged-in user.

Example: "0"

totalPrice Float Required

Total price of the items in the cart.

Example: 227.33

shippingCost Float Optional

Shipping cost applied to the purchase.

Example: 0.0000

discount Float Optional

Discount applied during checkout.

Example: 0

couponCode String Optional

Coupon code applied during checkout.

Example: null

cartProducts

Object

Required

Details of the products in the cart (see sub-parameters).
billingInfo

Object

Optional

Billing details (see sub-parameters below).

shippingInfo

Object

Optional

Shipping details (see sub-parameters below).

cartId

String

Required

Specifies the cart ID.

Example: "cart123"

Cart Product Parameters

Parameter

Type Required or Optional

Description

productId String Required

Unique identifier of the product.

Example: "814"

productPosition Integer Optional

Position of the product in the cart.

Example: 1

action

String Optional

Action performed, such as checkout.

Example: "Checkout"

quantity

Integer Required

Quantity of the product in the cart.

Example: 1

productBasePrice

Float

Required

Base price of the product.

Example: 210.00

tax

Float

Optional

Tax applied to the product.

Example: 17.33

sku

String

Required

SKU of the product.

Example: "sku"

discount

Float

Optional

Discount applied to the product.

Example: 0.0000

couponCode

String

Optional

Coupon code applied to the product.

Example: null

Billing and Shipping Info Parameters

Parameter

Type Required or Optional

Description

firstName

String Optional

Specifies the First name of the customer.

Example: "John"

lastName

String Optional

Specifies the Last name of the customer.

Example: "Smith"

line1

String Optional

Specifies the 'address line 1' of the customer.

Example: "4/40"

line2

String Optional

Specifies the 'address line 2' of the customer.

Example: ”Boulevard Road”

cityCode

String

Optional

Specifies the city name or city code.

Example: "Chicago"

stateCode

String

Optional

Specifies the state code.

Example: "IL"

zip

String

Optional

Specifies the ZIP code.

Example: "60001"

countryCode

String

Optional

Specifies the country code.

Example: "IN"

emailAddress

String

Optional

Specifies the email ID of the customer.

Example: "john.smith@example.com"

phoneNumber

String

Optional

Specifies the phone number of the customer.

Example: "1234567890"

Request Body Schema

Copy
{
  "eventData":{
    "eventType":"eventCheckout",
    "transactionId":"String",
    "tenderType":"String",
    "checkoutType":"String",
    "totalPrice":"Float",
    "shippingCost":"Float",
    "discount":"Float",
    "couponCode":"String",
    "cartProducts":[
      {
        "productId":"String",
        "productPosition":"Integer",
        "action":"String",
        "quantity":"Integer",
        "productBasePrice":"Float",
        "tax":"Float",
        "sku":"String",
        "discount":"Float",
        "couponCode":"String",
        "childProductId":"String"
      }
    ],
    "billingInfo":{
      "firstName":"String",
      "lastName":"String",
      "line1":"String",
      "line2":"String",
      "cityCode":"String",
      "stateCode":"String",
      "zip":"String",
      "countryCode":"String",
      "emailAddress":"String",
      "phoneNumber":"String"
    },
    "shippingInfo":{
      "firstName":"String",
      "lastName":"String",
      "line1":"String",
      "line2":"String",
      "cityCode":"String",
      "stateCode":"String",
      "zip":"String",
      "countryCode":"String",
      "emailAddress":"String",
      "phoneNumber":"String"
    }
  }
}

Example Request

Copy
{
  "eventData":{
    "eventType":"eventCheckout",
    "transactionId":"727",
    "tenderType":"cash",
    "checkoutType":0,
    "totalPrice":227.33,
    "shippingCost":0.0000,
    "discount":0,
    "couponCode":null,
    "cartProducts":[
      {
        "productId":"814",
        "productPosition":1,
        "action":"Checkout",
        "quantity":1,
        "productBasePrice":210.0000,
        "tax":17.3300,
        "sku":"sku",
        "discount":0.0000,
        "couponCode":null,
        "childProductId":"605"
      }
    ],
    "billingInfo":{
      "firstName":"John",
      "lastName":"Smith",
      "line1":"4/40",
      "line2":"Boulevard Road",
      "cityCode":"Chicago",
      "stateCode":"IL",
      "zip":"60001",
      "countryCode":"IN",
      "emailAddress":"john.smith@example.com",
      "phoneNumber":"1234567890"
    },
    "shippingInfo":{
      "firstName":"John",
      "lastName":"Smith",
      "line1":"4/40",
      "line2":"Boulevard Road",
      "cityCode":"Chicago",
      "stateCode":"IL",
      "zip":"60001",
      "countryCode":"IN",
      "emailAddress":"john.smith@example.com",
      "phoneNumber":"1234567890"
    }
  }
}

Example Response

Copy
{
  "status": "success",
  "message": "Checkout event captured successfully."
}

HTTP Response Codes

Response Code

Description

202 Accepted The request has been received and validated, but processing is asynchronous and not yet complete.