Skip to main content

CheckoutSessionResponse

successbooleanrequired
data object

Hosted checkout session returned by the online transaction service.

sessionIdstringrequired
checkoutUrlstring<uri>required

Shopper-facing URL to open for this checkout session.

locationIdstringrequired
statusCheckoutSessionStatusrequired

Possible values: [PENDING, COMPLETED, CANCELLED, EXPIRED]

expiresAtstring<date-time>required
sessionTokenstringnullable
amountinteger<int64>nullable

Base session amount before discounts, shipping, and tax; with line items, equals their resolved subtotal.

currencystringnullable
localestringnullable

BCP 47 locale configured for the merchant checkout experience.

descriptionstringnullable
customerEmailstring<email>nullable
organizationIdstringnullable
merchantNamestringnullable
merchantLogoUrlstring<uri>nullable
merchantPrimaryColorstringnullable
successUrlstring<uri>nullable
cancelUrlstring<uri>nullable
transactionIdstringnullable
lineItems object[]nullable
  • Array [
  • idstringrequired
    namestringrequired
    descriptionstringnullable
    quantityintegerrequired
    unitPriceinteger<int64>required

    Charged and stored unit price in integer minor currency units. For a catalog line, this is the resolved catalog price.

    totalPriceinteger<int64>required

    Line total in integer minor currency units: quantity times the charged unitPrice.

    priceIdstringnullable
    imageUrlstring<uri>nullable
    taxableboolean
    categoryCodestringnullable
    taxAmountinteger<int64>

    Persisted additional line tax in minor units.

    Possible values: >= 0

  • ]
  • allowedPaymentMethodsstring[]nullable
    metadata objectnullable
    property name*anynullable
    createdAtstring<date-time>nullable
    shippingOptions object[]nullable
  • Array [
  • idstringrequired
    namestringrequired
    amountintegerrequired

    Possible values: >= 0

    estimatedDaysMinintegernullable
    estimatedDaysMaxintegernullable
  • ]
  • selectedShippingRateIdstringnullable
    shippingCostinteger<int64>nullable
    discountAmountinteger<int64>nullable
    promotionCodestringnullable
    promotionCodes object[]nullable
  • Array [
  • codestringrequired
    discountAmountinteger<int64>required
    ordinalintegerrequired
  • ]
  • amountTotalinteger<int64>nullable

    Final payable total after discounts, shipping, and tax.

    totalTaxinteger<int64>nullable

    Additional Gateway tax; an omitted zero does not mean an amount-only gross receivable was tax-exempt.

    taxModeCheckoutTaxMode

    Possible values: [AUTOMATIC, PRECOMPUTED]

    Default value: AUTOMATIC
    taxBreakdown object[]nullable

    Provider jurisdiction amounts only, unchanged by catalog rates. When supplied, this list plus catalogTax totals totalTax. An empty or omitted provider breakdown means the provider portion is unattributed, not zero.

  • Array [
  • jurisdictionTypestringrequired
    jurisdictionCodestringrequired
    jurisdictionNamestringnullable
    rateBpsintegernullable
    taxAmountinteger<int64>required
    sourceConfigIdstringrequired
  • ]
  • catalogTax object[]nullable

    Catalog-rate contributions by checkout line, without jurisdiction/config attribution. When the provider supplies a taxBreakdown, both lists together total totalTax. Otherwise totalTax minus these amounts is unattributed provider tax.

  • Array [
  • lineItemIdstringrequired
    taxAmountinteger<int64>required
    rateBpsintegerrequired
  • ]
  • tokenizationModestringrequired

    Possible values: [DIRECT, EPG_HOSTED_PAYMENT_FIELDS, EPG_HOSTED_FIELDS_UNAVAILABLE]

    giftCardEnabledbooleanrequired
    cardStorageRequestedboolean

    True when the session was created with saveCard. The checkout offers card storage to a signed-in customer, who must opt in with saveCard on pay; guests and customers who decline get an ordinary sale.

    paymentCapabilities objectrequired
    ach objectrequired
    availablebooleanrequired
    statusstringrequired
    reasonstringrequired
    payerAuthentication objectrequired
    availablebooleanrequired
    statusstringrequired
    reasonstringrequired
    agenticCheckout objectnullable
    availabilitystringrequired

    Possible values: [UNAVAILABLE, NOT_REQUESTED, STEP_UP_REQUIRED, READY]

    errorstring

    Machine-readable error code.

    messagestring

    Human-readable response message.

    CheckoutSessionResponse
    {
    "success": true,
    "data": {
    "sessionId": "string",
    "checkoutUrl": "string",
    "locationId": "string",
    "status": "PENDING",
    "expiresAt": "2024-07-29T15:51:28.071Z",
    "sessionToken": "string",
    "amount": 0,
    "currency": "string",
    "locale": "string",
    "description": "string",
    "customerEmail": "[email protected]",
    "organizationId": "string",
    "merchantName": "string",
    "merchantLogoUrl": "string",
    "merchantPrimaryColor": "string",
    "successUrl": "string",
    "cancelUrl": "string",
    "transactionId": "string",
    "lineItems": [
    {
    "id": "string",
    "name": "string",
    "description": "string",
    "quantity": 0,
    "unitPrice": 0,
    "totalPrice": 0,
    "priceId": "string",
    "imageUrl": "string",
    "taxable": true,
    "categoryCode": "string",
    "taxAmount": 0
    }
    ],
    "allowedPaymentMethods": [
    "string"
    ],
    "metadata": {},
    "createdAt": "2024-07-29T15:51:28.071Z",
    "shippingOptions": [
    {
    "id": "string",
    "name": "string",
    "amount": 0,
    "estimatedDaysMin": 0,
    "estimatedDaysMax": 0
    }
    ],
    "selectedShippingRateId": "string",
    "shippingCost": 0,
    "discountAmount": 0,
    "promotionCode": "string",
    "promotionCodes": [
    {
    "code": "string",
    "discountAmount": 0,
    "ordinal": 0
    }
    ],
    "amountTotal": 0,
    "totalTax": 0,
    "taxMode": "AUTOMATIC",
    "taxBreakdown": [
    {
    "jurisdictionType": "string",
    "jurisdictionCode": "string",
    "jurisdictionName": "string",
    "rateBps": 0,
    "taxAmount": 0,
    "sourceConfigId": "string"
    }
    ],
    "catalogTax": [
    {
    "lineItemId": "string",
    "taxAmount": 0,
    "rateBps": 0
    }
    ],
    "tokenizationMode": "DIRECT",
    "giftCardEnabled": true,
    "cardStorageRequested": true,
    "paymentCapabilities": {
    "ach": {
    "available": true,
    "status": "string",
    "reason": "string"
    },
    "payerAuthentication": {
    "available": true,
    "status": "string",
    "reason": "string"
    }
    },
    "agenticCheckout": {
    "availability": "UNAVAILABLE"
    }
    },
    "error": "string",
    "message": "string"
    }