FILTER BY TAG

Step 2: Set Up the Server-Side Component

To initialize
Unified Checkout
within your webpage, you need to set up the server-side component. This task involves generating a capture context. A capture context is a signed JSON Web Token (JWT) that contains your merchant configuration, one-time encryption keys, and payment parameters.
Follow these steps to make a server-to-server call to the sessions API to authenticate your merchant credentials and establish how the
Unified Checkout
front-end components will function:
  1. Implement a server-to-server call to the sessions API.

    ADDITIONAL INFORMATION

    This call should include parameters that define how
    Unified Checkout
    performs.
  2. Handle the response from the sessions API.

    ADDITIONAL INFORMATION

    The response will contain:
    • A transaction-specific public key for securing the transaction in the customer's browser.
    • An authenticated context description package that manages the payment experience on the client side, including available payment options, interface styling, and payment methods.
  3. Store and manage the JSON Web Token (JWT) object, referred to as the
    capture context
    .
    This JWT contains all the functions compiled from the sessions API response:
    { "targetOrigins": ["https://merchant.com", "https://reseller.com:8443"], "locale": "en_US", "country": "US", "orderInformation": { "amountDetails": { "totalAmount": "21.00", "currency":
    "USD"
    } } }
    The
    targetOrigins
    array must include every origin that will host the SDK. The response JWT is passed to the client-side library.
    This capture context contains only the minimum required fields. For information about the components of the capture context and how to create one using the
    sessions
    API, see Sessions API. For a complete capture context with all available fields, see Example: Unified Checkout Complete Capture Context.

AFTER COMPLETING THE TASK