Skip to main content

Checkout RSA Concepts

Normally, Bold Checkout serves as the authority on what happens to an order as it travels through the checkout process. However, some platforms require a higher degree of control over the order state, and the platform needs to be the "authority" on changes to the order. In these scenarios, you can create a Checkout Remote State Authority (RSA) that gives your platform complete control over certain tasks, such as:

  • Editing the customer on the order
  • Editing shipping and billing addresses
  • Validating addresses, discounts, and inventory
  • Configuring shipping lines
  • Applying taxes and discount codes

The following diagram shows how Bold, a platform connector, and a Checkout RSA work together to manage the order state:

How it works

The Checkout RSA mainly functions as an event handler and a validator. You create the Checkout RSA by implementing the API.

Event handler

When the customer inputs information during the checkout process, Bold sends an event to the Checkout RSA. The Checkout RSA then manipulates the order state based on the platform's custom functionality, and returns the updated order state to Bold.

Bold sends the following events to the Checkout RSA:

  • SetShippingAddress
  • RemoveShippingAddress
  • SetBillingAddress
  • RemoveBillingAddress
  • SetCustomer
  • RemoveCustomer
  • SetShippingLine
  • GetShippingLines
  • ApplyTaxes
  • AddDiscountCode
  • RemoveDiscountCode
  • AddLineItem
  • UpdateLineItem
  • RemoveLineItem
  • EstimateTax
  • EstimateShipping

Refer to the following diagram and steps for an example of how RSA acts as an event handler:

  1. During the checkout process, a customer adds their billing address.
  2. The storefront calls the Set Billing Address endpoint.
  3. Because a Checkout RSA is configured, Bold calls the Checkout RSA's Process Order Events endpoint with the set_billing_address event.
  4. The RSA receives the call, handles the event, and communicates with the platform.
  5. The platform manipulates the order state appropriately.
  6. The RSA responds to Bold's Process Order Events call with the updated order state.
  7. Bold responds to the original Set Billing Address call with the new application_state.

Validator

The Checkout RSA must also function as a validator to check the legitimacy of addresses, email addresses, discounts, and inventory. However, this portion of the RSA does not make changes to the order state.

When Bold sends a validation request to the Checkout RSA, the Checkout RSA passes the data to the platform, which determines whether the data is acceptable based on its own rules. For example, it might check whether the given discount code exists on the platform, or whether the email address domain is real. The Checkout RSA responds to Bold with valid: true if the validation passes.

Checkout RSA vs. platform connector

A Checkout RSA must be used in tandem with a platform connector. While both communicate between Bold Checkout and a platform, there are several differences between them:

AreaCheckout RSAPlatform connector
Why does Bold need to communicate with the platform?To manipulate and validate order states based on custom platform rules during checkout.To keep order info synced between Bold and the platform.
When does the communication happen?During the checkout process.After the order is processed.
What is required to implement?Checkout RSA SpecificationsPlatform Connector Specifications and Platform Event Notification Specifications

e