# How Drop-in payments work

When the client goes to checkout, the client-server sends a create cart request to Digital River, and Digital River returns the cart. The client-server then sends the payment session identifier to the client's front end. The client front end uses the payment session identifier and other configuration settings to instantiate Drop-in payments. Once instantiated, transaction-applicable payment methods are displayed in a modal window. When the customer selects a payment method and provides their payment details, the client front end triggers an `onSuccess` event and sends the source identifier to the client server. The client-server uses the source with the cart and shoppers.

{% hint style="info" %}
Check out the [interactive Drop-in builder](https://drapi.io/drop-in-builder/) to better understand how the process works.
{% endhint %}

{% embed url="<https://player.vimeo.com/video/683888702?h=2b803b92e0>" %}

<div align="left"><img src="/files/-MHBoIHgwXYK9vf9a4tx" alt=""></div>

## Drop-in payments flows

The following table is meant to help you better understand your Drop-in payments embed options:

| How do you want to use Drop-in?                                                                  | Do you need to store payment methods? | Instructions                                                                                                                                                                                                                            |
| ------------------------------------------------------------------------------------------------ | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Collect payment as part of a checkout flow                                                       | No                                    | See [Using Drop-in payments within your cart flow](/commerce-api/payments/payments-solutions/drop-in/drop-in-integration-guide.md#using-drop-in-payments-within-your-cart-flow).                                                        |
| Offer customers the ability to store payment methods                                             | Yes                                   | See [Allowing the customer to save their payment credentials](https://docs.digitalriver.com/commerce-api/payments/payments-solutions/drop-in/pages/-M4QkPmjkcIVqKR6tT5J#optional.-allowing-the-customer-to-save-their-payment-details). |
| Collect payment data from a page where customers manage or add payment methods to their accounts | Yes                                   | See [Using Drop-in to collect payment details on a My Account page](/commerce-api/payments/payments-solutions/drop-in/drop-in-integration-guide.md#using-drop-in-payments-to-collect-payment-details-on-a-my-account-page).             |

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/commerce-api/payments/payments-solutions/drop-in/how-drop-in-payments-work.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
