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

Mastercard's Open Finance E-Commerce Payments service can be embedded directly into your online checkout experience, enabling payment initiation through a simplified API, bringing increased payment options for both Third Party Providers (TPPs) and their customers, all through a single interface.

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

When a user begins the payment process, your application offers the option of Open Finance alongside your existing payment methods.

When the user chooses to pay by Open Finance, a payment initiation journey is requested through our APIs.

We handle the communication with the user's bank, including user authentication using Strong Customer Authentication (SCA).

Once the payment is initiated, the user is returned to your application to continue their journey.
The following screenshots show sample screens that can be rendered using this service:
Note: This example shows an instance where the PSU chooses their ASPSP within the TPP's checkout application. Alternatively, the ASPSP may be selected within the Mastercard Open Finance UI. For details on both options, refer to the [Payment Initiation](https://developer.mastercard.com/open-finance-europe/documentation/licensed/aiia-enterprise/payments/payment-initiation/index.md) guide.

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/licensed/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/licensed/E-comm_2.png) The customer selects their bank. ![](https://static.developer.mastercard.com/content/open-finance-europe/uploads/ecommerce_screens/licensed/E-comm_3.png) The customer authenticates themselves using the bank's existing authentication method. ![](https://static.developer.mastercard.com/content/open-finance-europe/uploads/ecommerce_screens/licensed/E-comm_4.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/licensed/E-comm_6.png) The customer is automatically redirected back to the merchant's app and provided with a reference number.   

### Data flow {#data-flow}

Diagram e-commerce-flow

1. The Payment Service User (PSU) initiates checkout and payment.
2. The merchant passes them to the TPP (PISP\*) to complete the checkout with the amount they have to pay and a transaction reference.
3. The TPP (PISP) uses the `/v1/payments/create` endpoint to submit a Payment Initiation request to Mastercard Open Finance.
4. Mastercard Open Finance processes the payment with the ASPSP (PSU bank) and the PSU performs SCA to initiate the payment.
5. The ASPSP initiates the money transfer to the merchant account (through the requested payment scheme).
6. The ASPSP returns the payment initiation status to Mastercard Open Finance.
7. Mastercard Open Finance returns the payment initiation status to the TPP (PISP).
8. The merchant receives confirmation of payment initiation from their TPP (PISP).
9. The merchant account receives the payment with the transaction reference.
10. The merchant reconciles and settles the payment.

\*PISP (Payment Initiation Service Provider)

### Endpoints used {#endpoints-used}

A payment request is initiated using the `/v1/payments/create` endpoint.

API Reference: `POST /v1/payments/create`

The updated status of the payment is retrieved using the `/v1/payments/{paymentId}/refresh-status` endpoint.

API Reference: `POST /v1/payments/{paymentId}/refresh-status`

### Error handling {#error-handling}

For an invalid request, a request with any missing parameters, or where the provider fails to process the request, information is returned in the `status.details` property of the payment response. Refer to the **Payment Errors** section of [Error Handing](https://developer.mastercard.com/open-finance-europe/documentation/licensed/aiia-enterprise/codes-formats/index.md) for additional information, and for steps on how to proceed.

### See more {#see-more}

Refer to the [Payment Initiation](https://developer.mastercard.com/open-finance-europe/documentation/licensed/aiia-enterprise/payments/payment-initiation/index.md) guide for additional details on how payments are requested and initiated.
