# Checkout Sessions Notification

This is an outbound HTTP POST message from the Shift4 gateway to the merchant's environment that provides a status of the checkout session. This notification request is sent to the `webhookUrl` set on the Checkout Session. For a Checkout Session created by opening a Payment Link, the link's `webhookUrl` is used instead.
This requires the interface vendor to establish a listening service to receive these requests.

Endpoint: POST checkoutsessions-notification
Version: 1.7.68

## Request fields (application/json):

  - `dateTime` (string)
    Timestamp of the most recent event for this checkout session
    Example: 2024-05-21T09:18:23.283-07:00

  - `event` (object)

  - `event.type` (string)
    Type of the event
    Enum: "payment_link_created", "payment_link_updated", "payment_link_sms_notification_sent", "payment_link_sms_notification_delivered", "payment_link_sms_notification_failed", "checkout_session_completed", "checkout_session_created", "checkout_session_expired"

  - `customer` (object)

  - `customer.id` (string)
    Unique identifier of the customer
    Example: cust_oM1i4j7EsIY7W5vqqF76diGw

  - `customer.emailAddress` (string)
    Customer email address
    Example: jordan.smith@example.com

  - `customer.phoneNumber` (string)
    Customer phone number in full international format (e.g. `+12025550123`). When the request supplied a local-format number alongside `phoneCountry`, the response normalizes it to international format here.
    Example: +12025550123

  - `customer.phoneCountry` (string)
    Two-letter ISO 3166-1 alpha-2 country code of the phone number (e.g. `US`, `GB`). Present whenever the request provided one.
    Enum: "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"

  - `customer.firstName` (string)
    Customer first name
    Example: Jordan

  - `customer.middleName` (string)
    Customer middle name
    Example: Riley

  - `customer.lastName` (string)
    Customer last name
    Example: Smith

  - `customer.addressLine1` (string)
    Street address
    Example: Evergreen Terrace 742

  - `customer.postalCode` (string)
    Postal or ZIP code
    Example: 94043

  - `customer.addressCity` (string)
    City
    Example: Mountain View

  - `customer.addressRegion` (string)
    State, province or region
    Example: CA

  - `customer.addressCountry` (string)
    Two-letter ISO 3166-1 alpha-2 country code.
    Enum: "AF", "AX", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BQ", "BA", "BW", "BV", "BR", "IO", "BN", "BG", "BF", "BI", "KH", "CM", "CA", "CV", "KY", "CF", "TD", "CL", "CN", "CX", "CC", "CO", "KM", "CG", "CD", "CK", "CR", "CI", "HR", "CU", "CW", "CY", "CZ", "DK", "DJ", "DM", "DO", "EC", "EG", "SV", "GQ", "ER", "EE", "ET", "FK", "FO", "FJ", "FI", "FR", "GF", "PF", "TF", "GA", "GM", "GE", "DE", "GH", "GI", "GR", "GL", "GD", "GP", "GU", "GT", "GG", "GN", "GW", "GY", "HT", "HM", "VA", "HN", "HK", "HU", "IS", "IN", "ID", "IR", "IQ", "IE", "IM", "IL", "IT", "JM", "JP", "JE", "JO", "KZ", "KE", "KI", "KP", "KR", "KW", "KG", "LA", "LV", "LB", "LS", "LR", "LY", "LI", "LT", "LU", "MO", "MK", "MG", "MW", "MY", "MV", "ML", "MT", "MH", "MQ", "MR", "MU", "YT", "MX", "FM", "MD", "MC", "MN", "ME", "MS", "MA", "MZ", "MM", "NA", "NR", "NP", "NL", "NC", "NZ", "NI", "NE", "NG", "NU", "NF", "MP", "NO", "OM", "PK", "PW", "PS", "PA", "PG", "PY", "PE", "PH", "PN", "PL", "PT", "PR", "QA", "RE", "RO", "RU", "RW", "BL", "SH", "KN", "LC", "MF", "PM", "VC", "WS", "SM", "ST", "SA", "SN", "RS", "SC", "SL", "SG", "SX", "SK", "SI", "SB", "SO", "ZA", "GS", "SS", "ES", "LK", "SD", "SR", "SJ", "SZ", "SE", "CH", "SY", "TW", "TJ", "TZ", "TH", "TL", "TG", "TK", "TO", "TT", "TN", "TR", "TM", "TC", "TV", "UG", "UA", "AE", "GB", "US", "UM", "UY", "UZ", "VU", "VE", "VN", "VG", "VI", "WF", "EH", "YE", "ZM", "ZW"

  - `paymentLink` (object)
    Reference to a payment link by its identifier

  - `paymentLink.id` (string)
    Identifier of the payment link
    Example: link_8kdskX8DZ8FR6W3acYPXiyAN

  - `checkoutSession` (object)
    Checkout session details

  - `checkoutSession.id` (string)
    Identifier of a Checkout Session
    Example: chse_wMCUGVZgpf45fWHzKbYWMKmZ

  - `checkoutSession.action` (string)
    Action a Checkout Session performs.
    Enum: "payment", "card_verification"

  - `checkoutSession.clientSecret` (string)
    Single-use token used to collect payment with Payment components on your own page — pass it to `shift4.createCheckout(clientSecret)` in the shift4.js library. Do not reuse across customers or checkout sessions.
    Example: chcs_II2TvLWBrzFniRdjLpgo2zIflaTCzZ5BGPngPZEu0XasgwYRBCHEpyqE0tO9pYocvoOl8alO9w91CAeW0bl3nrTfO9JH4zFDt8pXB2eyoOpOBeuD3XuxPnGKOiTjor0D0vwRfdMR7moSj3K9yLDktQy6KcoZEa9SgP5DHiXg30L1X26EKy4XCxqBdeB4dcC4osP…

  - `checkoutSession.url` (string)
    URL of the Hosted checkout page. Redirect the customer here if you do not want to embed Payment components on your own page.
    Example: https://pay.shift4.com/chse_wMCUGVZgpf45fWHzKbYWMKmZ

  - `checkoutSession.status` (string)
    Current status of the checkout session
    Enum: "active", "paid", "expired", "failed"

  - `checkoutSession.redirectUrl` (string)
    URL the customer is redirected to after completing payment on the Hosted checkout page.
    Example: https://example.com/checkout/complete

  - `checkoutSession.allowSavedCards` (boolean)
    If the value is true, saved cards may be used in this checkout session.

Default: false

  - `checkoutSession.locale` (string)
    Language used on payment page
    Example: en

  - `checkoutSession.lastOpened` (string)
    Timestamp the customer most recently opened the Hosted checkout page
    Example: 2024-05-21T09:18:23.283-07:00

  - `checkoutSession.expiresAt` (string)
    Timestamp at which the checkout session expires
    Example: 2024-05-21T09:18:23.283-07:00

  - `checkoutSession.collectBillingAddress` (boolean)
    If the value is true, the customer was asked to provide the billing address.

Default: false

  - `checkoutSession.collectShippingAddress` (boolean)
    If the value is true, the customer was asked to provide the shipping address.

Default: false

  - `checkoutSession.customFieldsTitle` (string)
    Title of custom fields section
    Example: Additional information

  - `checkoutSession.customFieldsTitleTranslations` (object)
    Translations of `customFieldsTitle` keyed by locale code

  - `checkoutSession.customFields` (array)
    List of custom fields that were collected from customer on the payment page

  - `checkoutSession.customFields.key` (string)
    Identifier of custom field
    Example: special_wishes

  - `checkoutSession.customFields.label` (string)
    Label of custom field
    Example: Special wishes

  - `checkoutSession.customFields.value` (string)
    The value that was provided by the customer for this custom field
    Example: Happy Holidays

  - `checkoutSession.customFields.optional` (boolean)
    If this flag is set to true, then customer was not required to provide any value for this custom field

  - `checkoutSession.staticFields` (object)
    List of information displayed on the payment page

  - `checkoutSession.capture` (boolean)
    If the value is true, the resulting charge is captured immediately.

Default: true

  - `checkoutSession.vendorReference` (string)
    Merchant Defined Descriptor related to the Checkout Session. This field is reportable on the merchant portal and settlement extract.
    Example: ref_123456789

  - `checkoutSession.webhookUrl` (string)
    Destination URL this checkout session's webhooks (`checkout_session_created`, `checkout_session_completed`, `checkout_session_expired`) are sent to.

  - `checkoutSession.lineItems` (array)
    List of line items

  - `checkoutSession.lineItems.product` (object)
    Product purchased in this line item

  - `checkoutSession.lineItems.product.name` (string)
    Display name of the product shown on the checkout page
    Example: Premium Plan

  - `checkoutSession.lineItems.product.description` (string)
    Description of the product or service

  - `checkoutSession.lineItems.product.amount` (any)
    Payment amount definition. Provide `total` for a fixed-amount product, or `options` and/or `custom` to let the customer choose the amount. `total` is mutually exclusive with `options` and `custom`; a customer-chosen amount product may use `options`, `custom`, or both together.

  - `checkoutSession.lineItems.product.amount.total` (number, required)
    Fixed payment amount (in major units, with the number of allowed decimal places depending on currency).
    Example: 10.99

  - `checkoutSession.lineItems.product.amount.options` (array)
    List of pre-defined selectable payment amounts. Allows the customer to choose how much to pay. May be combined with `custom`.
    Example: [10.99,24.55,49.99]

  - `checkoutSession.lineItems.product.amount.custom` (object)
    Allowed range for a customer-chosen payment amount

  - `checkoutSession.lineItems.product.amount.custom.min` (number)
    Minimum custom amount (major units)
    Example: 10.99

  - `checkoutSession.lineItems.product.amount.custom.max` (number)
    Maximum custom amount (major units)
    Example: 199.99

  - `checkoutSession.lineItems.product.currencyCode` (string)
    Three-letter ISO 4217 currency code
    Enum: "EUR", "USD", "AFN", "ALL", "DZD", "AOA", "ARS", "AMD", "AWG", "AZN", "BSD", "BHD", "BDT", "BBD", "BYN", "BYR", "BZD", "BMD", "BTN", "BOB", "BOV", "BAM", "BWP", "BRL", "BND", "BGN", "BIF", "KHR", "CAD", "CVE", "KYD", "CLF", "CLP", "CNY", "COP", "COU", "KMF", "CDF", "CRC", "HRK", "CUC", "CUP", "CZK", "DJF", "DOP", "EGP", "SVC", "ERN", "ETB", "FKP", "FJD", "XAF", "GMD", "GEL", "GHS", "GIP", "DKK", "GTQ", "GNF", "GYD", "HTG", "HNL", "HKD", "HUF", "ISK", "INR", "IDR", "IRR", "IQD", "ILS", "JMD", "JPY", "JOD", "KZT", "KES", "KPW", "KRW", "KWD", "KGS", "LAK", "LVL", "LBP", "LSL", "LRD", "LYD", "LTL", "MOP", "MKD", "MGA", "MWK", "MYR", "MVR", "MRO", "MUR", "MXN", "MXV", "MDL", "MNT", "MZN", "MMK", "NAD", "NPR", "NIO", "NGN", "OMR", "PKR", "PAB", "PGK", "PYG", "PEN", "PHP", "PLN", "QAR", "RON", "RUB", "RWF", "SHP", "XCD", "WST", "STD", "SAR", "RSD", "SCR", "SLL", "SGD", "ANG", "SBD", "SOS", "ZAR", "SSP", "LKR", "SDG", "SRD", "NOK", "SZL", "SEK", "CHE", "CHF", "CHW", "SYP", "TWD", "TJS", "TZS", "THB", "XOF", "NZD", "TOP", "TTD", "TND", "TRY", "TMT", "AUD", "UGX", "UAH", "AED", "GBP", "USN", "USS", "UYI", "UYU", "UZS", "VUV", "VEF", "VND", "XPF", "MAD", "YER", "ZMK", "ZMW", "ZWL", "SLE", "STN", "MRU", "VES"

  - `checkoutSession.lineItems.quantity` (integer)
    Number of units of the product
    Example: 1

  - `checkoutSession.lastTransaction` (object)
    Contains the API response from the last transaction processed. See the [Sale Response Body](/apis/payments-platform-rest/openapi/transactions/transactionssale#transactions/transactionssale/response&c=200) for the full response structure.

  - `checkoutSession.customerCreationPolicy` (string)
    Customer creation policy applied to this checkout session
    Enum: "create", "do_not_create"

  - `metadata` (object)
    Key-value object containing additional custom data supplied when the checkout session was created. This is never displayed to customer on the payment page.

## Response 200:

  - `200` (unknown)
    Return 200 status to indicate that the Notification was received successfully.

