# 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="https://2721412755-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzlYMEYC0GeLSgnsft6%2F-MHBji8eBYj1mhhoNrKK%2F-MHBoIHgwXYK9vf9a4tx%2FHow%20Drop-in%20Works%20-%20Commerce%20API.png?alt=media&#x26;token=755a7dd5-0534-454a-8b94-9245cc3bbfb5" 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](https://docs.digitalriver.com/commerce-api/payments/payments-solutions/drop-in-integration-guide#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-integration-guide#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](https://docs.digitalriver.com/commerce-api/payments/payments-solutions/drop-in-integration-guide#using-drop-in-payments-to-collect-payment-details-on-a-my-account-page). |

##
