> For the complete documentation index, see [llms.txt](https://docs.digitalriver.com/digital-river-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalriver.com/digital-river-api/integration-options/checkouts/process-flow.md).

# Standard flow

The following sequence diagrams outline a standard [Direct Integrations](/digital-river-api/integration-options/checkouts.md) flow. They depict interactions between the customer, your commerce platform, the Digital River APIs, and Digital River. These diagrams are meant to outline Digital River's core capabilities, focusing specifically on:

* Important states in an [order's life cycle](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders/order-basics#the-order-lifecycle)
* The sequence of major [events](/digital-river-api/order-management/events-and-webhooks-1/events-1.md)
* The data you must provide to use Digital River's [authorized reseller of record](/digital-river-api/readme.md) business model
* How checkouts, orders, events, and fulfillments work

Refer to the [Sequence diagrams](/digital-river-api/general-resources/standards-and-certifications/integration-checklists.md#sequence-diagram) section on the [Integration checklists](/digital-river-api/general-resources/standards-and-certifications/integration-checklists.md) page to learn about other flows.

## Product management

You can use several approaches when identifying and describing your products in the Digital River APIs.

For details on your product management options, refer to the [Product basics](/digital-river-api/product-management/skus.md) page.

## Pre-checkout

Digital River is typically not involved in initial pre-checkout interactions between customers and your commerce platform. During this stage, customers land on your storefront, build a cart, confirm the cart's details, and initiate checkout. Your commerce platform typically presents them with the option of checking out as either a [guest or registered customer](/digital-river-api/integration-options/checkouts/creating-checkouts/using-the-checkout-identifier.md).

![](/files/-McFVYs04UqQQxo9hvRD)

## Building a checkout <a href="#creating-a-checkout" id="creating-a-checkout"></a>

When a new customer checks out on your storefront, you can use the Digital River APIs to create a [customer ](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/customers)and a [checkout](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/checkouts). The [checkout](/digital-river-api/integration-options/checkouts/creating-checkouts.md) contains the transaction's tax details and assigned [selling entity](/digital-river-api/integration-options/checkouts/creating-checkouts/selling-entities.md). Your commerce platform should update the user interface with this tax information and use the selling entity to [display compliance disclosures](/digital-river-api/developer-resources/reference/elements/compliance-elements.md).

![](/files/-MbhRGbYDQ56oURzK6VA)

## Creating an order <a href="#creating-a-source-and-order" id="creating-a-source-and-order"></a>

When customers enter the payment entry stage, your commerce platform must render [Drop-in payments](/digital-river-api/payments/payment-integrations-1/drop-in.md). Customers submit their payment details, and [Drop-in payments](/digital-river-api/payments/payment-integrations-1/drop-in/drop-in-integration-guide.md) use that information to create a payment [source](/digital-river-api/payments/payment-sources.md).

{% hint style="success" %}
Explore the [Drop-in payments builder](https://drapi.io/drop-in-builder/) to better understand of how sources are created.
{% endhint %}

If customers opt to save the payment [source ](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/sources)for future purchases, and that source is [ready for storage](/digital-river-api/payments/payment-integrations-1/drop-in/drop-in-integration-guide.md#optional-allowing-the-customer-to-save-their-payment-details), you should [attach it to the customer](/digital-river-api/payments/payment-sources/using-the-source-identifier.md#attaching-sources-to-customers) and then [apply it to the checkout](/digital-river-api/payments/payment-sources/using-the-source-identifier.md#attaching-sources-to-checkouts). Otherwise, simply apply the source to the checkout for use in this [single transaction](/digital-river-api/payments/payment-sources.md#reusable-or-single-use).

Once payment is applied, use the [checkout ](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/checkouts)to update the commerce platform with the transaction's final tax information and [selling entity](/digital-river-api/integration-options/checkouts/creating-checkouts/selling-entities.md). The commerce platform should render an order review page with the appropriate [compliance information](/digital-river-api/developer-resources/reference/digitalriver-object.md#digitalriver-compliance-getdetails-businessentitycode-locale).

![](/files/-MbhRdbjKUF1U14-d8wU)

At this point, customers typically confirm the transaction's details and submit the order. This event should trigger a [create order request](/digital-river-api/order-management/creating-and-updating-an-order.md#creating-an-order-with-the-checkout-identifier). This request primarily acts as a [fraud review](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders/order-basics#fraud-review) and [payment authorization call](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/charges/charge-basics).

The [immediate response](/digital-river-api/order-management/creating-and-updating-an-order.md#processing-the-post-orders-response) contains either a `409 Conflict` or `201 Created` status code. In the event of an error, update the status of the commerce platform and render the appropriate message to storefront customers. If an [order ](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders)is created, update commerce platform's order statis by using the response's data.

For [immediately accepted orders](/digital-river-api/order-management/creating-and-updating-an-order.md#accepted), move the commerce platform's order into a ready to fulfill state and direct customers to a "Thank You" page.

![](/files/-MbhRwZdkG5PNybAV29O)

If an [order's](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders) [`state`](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders/order-basics#order-states-and-events) is immediately returned as [pending payment authorization](/digital-river-api/order-management/creating-and-updating-an-order.md#pending-payment) or [in fraud review](/digital-river-api/order-management/creating-and-updating-an-order.md#in-review), you'll need to handle [asynchronous, order-related events](/digital-river-api/order-management/creating-and-updating-an-order.md#listening-for-and-handling-order-related-webhook-events) sent by Digital River.

Once an [order ](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders)is successfully screened for fraud or customers complete the steps necessary to [push payment](/digital-river-api/payments/payment-sources.md#pull-or-push), Digital River creates the [order accepted and ready to fulfill event](/digital-river-api/order-management/creating-and-updating-an-order.md#listening-for-the-order-accepted-event). If an [order ](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders)asynchronously fails due to suspected fraud or because the payment window closes without funds, we create an [order blocked](/digital-river-api/order-management/creating-and-updating-an-order.md#the-fraud-review-failure-event) or [charged failed](/digital-river-api/order-management/creating-and-updating-an-order.md#the-payment-failure-event) event, respectively.

When you're notified of one of these [events](/digital-river-api/order-management/events-and-webhooks-1/events-1.md), retrieve the order's [`state`](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders/order-basics#order-states-and-events) from the event's payload and, depending on that value, move the commerce platform's order into an accepted, blocked, or payment failed state.

![](/files/-MbhSHHKjCY4ZTauPZSM)

## Fulfilling an order

Once an [order's](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders) [`state`](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/orders/order-basics#order-states-and-events) is [`accepted`](/digital-river-api/order-management/creating-and-updating-an-order.md#handling-accepted-orders), the client can initiate fulfillment. As products are fulfilled or cancelled, the commerce platform updates the status of those line items and emits status change events. These events should trigger a [`POST/fulfillments`](/digital-river-api/order-management/informing-digital-river-of-a-fulfillment.md) request that specifies the fulfilled quantity, the cancelled quantity, or both. Depending on the configuration of that request, Digital River initiates a [funds capture](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/charges/charge-basics#captures) and/or [authorization reversal](https://docs.digitalriver.com/digital-river-api-reference/2021-12-13/charges/charge-basics#refunds).

![](/files/-McFW_Qjh4uCknpHrIEC)
