# E-Commerce Payments
source: https://developer.mastercard.com/open-finance-europe/documentation/unlicensed/use-cases/e-commerce-payments/index.md

Turn more online shoppers into paying customers with a frictionless and fast payment flow that keeps things simple.

A typical use case is detailed below, where a user that has been onboarded to make payments can complete a purchase from a merchants ecommerce interface using an account that they registered for making payments through Open Finance.

### How it works {#how-it-works}

The following screenshots show sample screens that can be rendered using this service:
![](https://static.developer.mastercard.com/content/open-finance-europe/uploads/ecommerce_screens/unlicensed/E-comm_1.png) Merchant integrates Open Finance checkout. Customer selects "Pay with your bank" as payment option. ![](https://static.developer.mastercard.com/content/open-finance-europe/uploads/ecommerce_screens/unlicensed/E-comm_2.png) The customer is sent to Mastercard Open Finance to complete their payment. ![](https://static.developer.mastercard.com/content/open-finance-europe/uploads/ecommerce_screens/unlicensed/E-comm_3.png) The customer selects their bank. ![](https://static.developer.mastercard.com/content/open-finance-europe/uploads/ecommerce_screens/unlicensed/E-comm_4.png) The customer authenticates themselves using the bank's existing authentication method. ![](https://static.developer.mastercard.com/content/open-finance-europe/uploads/ecommerce_screens/unlicensed/E-comm_5.png) The customer selects the preferred account. The customer can see the amount and destination as they confirm the payment. ![](https://static.developer.mastercard.com/content/open-finance-europe/uploads/ecommerce_screens/unlicensed/E-comm_6.png) The customer is automatically redirected back to Mastercard Open Finance with confirmation. ![](https://static.developer.mastercard.com/content/open-finance-europe/uploads/ecommerce_screens/unlicensed/E-comm_7.png) The customer is then redirected back to the merchant's app.   

### Data flow {#data-flow}

Diagram payouts

1. The PSU initiates payment from a merchants ecommerce interface where they registered an account to make payments through Open Finance.
2. The request is passed from the merchant to the TPP to complete the checkout and payment.
3. The TPP initiates the payment using the `/v2/payments/accept` endpoint, including payments details.
4. Mastercard Open Finance creates the payment and responds with a `paymentid`, used to look and request the authorisation of the payment and an `authorizationUrl` to be displayed to the PSU.
5. The TPP initiates authorization of the payment by displaying the `authorizationUrl` to the PSU.
6. The PSU initiates the payment flow from the consent screen by authorizing the payment, after which the confirmation screen displays.
7. Mastercard Open Finance provides payments capability for the PSU.
8. Mastercard Open Finance authenticates the PSU to the ASPSP and initiates payment.
9. The ASPSP initiates the money transfer to the merchant.
10. The PSU is sent to the `redirectURL`, requested when authorization was requested.
11. The TPP retrieves the state of the authorisation by calling the get accept payment endpoint `/v2/payments/accept/{paymentId}`.
12. Mastercard Open Finance returns the payment status to the TPP.
13. The payment status is displayed to the TPP on the `redirectURL`.

### Endpoints used {#endpoints-used}

A payment is initiated using the Create Accept Payment endpoint.

API Reference: `POST /v2/payments/accept`

The payment status is retrieved by calling the Get Accept Payment endpoint.

API Reference: `GET /v2/payments/accept/{paymentId}`

### See more {#see-more}

Refer to [Accepting Payments guide](https://developer.mastercard.com/open-finance-europe/documentation/unlicensed/aiia-pay/accept-payments/index.md) for additional details on how to enable your users to make payments from within your service.
