# eCommerce payments
source: https://developer.mastercard.com/ob-accept-payments/documentation/use-cases/ecommerce-payments/index.md

Mastercard's Open Finance E-Commerce Payments can be embedded directly into your online checkout experience, enabling payment initiation through a simplified API, bringing increased payment options through a single interface.

Integrate one or both of the following features into your current solution for maximum flexibility.

## Single Immediate Payments {#single-immediate-payments}

Start accepting one-off payments directly from your Payment Service User's (PSUs) bank accounts through a simple and secure flow. Each time a payment is created, the PSU must authorize it with their bank through Strong Customer Authentication (SCA). Refer to [Single Immediate Payments](https://developer.mastercard.com/ob-accept-payments/documentation/payments/single-immediate-payments/single-immediate-payments/index.md) for detailed integration guidance.

### 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 Mastercard Open Finance Pay.

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.

#### User flow {#user-flow}

1. **Merchant**   
   The merchant integrates the option to pay with Open Finance into their application. This option initiates the creation of a Single Immediate Payment and the PSU is sent to Mastercard Open Finance Pay.
2. **Mastercard Open Finance**   
   The PSU selects their bank account and proceeds with the payment authorization journey.
3. **Mastercard Open Finance**   
   The PSU reviews the payment details and permits the Payment Initiation Service Provider (PISP) to initiate the payment with the bank.
4. **Bank**   
   The PSU authenticates themselves using the bank's existing authentication methods.
5. **Bank**   
   The available accounts and balances are displayed, and the PSU selects their preferred account and confirms the payment details with the bank.
6. **Mastercard Open Finance**   
   The PSU is automatically redirected to Mastercard Open Finance Pay, where they can see that the payment was initiated successfully.
7. **Merchant**   
   The PSU is redirected to the Merchant for the next steps.
This Figma diagram shows the user flow for making a one-off payment.

For the best viewing experience, click the **full screen** option.

### What does the single immediate payment flow look like for an End User? {#what-does-the-single-immediate-payment-flow-look-like-for-an-end-user}

The following Figma diagram shows the user flow from the merchant, via Mastercard Open Finance, and the bank to the successful transaction.

For the best viewing experience of app to app, click the **full screen** option or **zoom** using the controls located on the right.

#### Create payment flow {#create-payment-flow}

Diagram create_mandate_flow_sing

1. The Payment Service User (PSU) initiates an Open Finance payment from the Merchant's application.
2. The Merchant passes them to the Integrator\* to create a payment.
3. The Integrator uses the /payments endpoint to submit a Create Payment request.
4. Mastercard Open Finance Pay returns a flowUrl and a Payment ID to the Integrator.
5. The Integrator returns the flowUrl to the Merchant
6. The Merchant redirects the PSU to the flowUrl to progress with the payment. Here the PSU lands on the Mastercard Open Finance Pay payment screens where they choose the Bank that they want to pay from and read and accept the Consent, Terms and Conditions and Privacy Notice.
7. The PSU is redirected to the Account Servicing Payment Service Providers (ASPSPs) to complete SCA.
8. In the background Mastercard Open Finance Pay initiates a payment with the ASPSP.
9. The ASPSP returns the PSU to Mastercard Open Finance Pay.
10. Mastercard Open Finance Pay returns the PSU to the redirectUrl that was provided on the create payment request in Step 3.
11. The ASPSP begins the transfer of funds from the payer's chosen bank account to the Destination account that was defined in the create payment request in Step 3.
12. Mastercard Open Finance Pay sends a AcceptPaymentStatusUpdated Notification to the Integrator to let them know that the status of the payment has changed.
13. The Integrator can call the Get payment endpoint using the paymentId that was returned in step 4.
14. Mastercard Open Finance Pay returns the latest payment status to the Integrator. Refer to our [Payment Status Model](https://developer.mastercard.com/ob-accept-payments/documentation/payments/single-immediate-payments/payment-status-model/index.md) for more information.
15. The Integrator informs the Merchant of the payment status.
16. The Merchant displays a message to the PSU based on the payment status to inform the PSU of the payment result.

##### Endpoints used {#endpoints-used}

A create payment request is initiated.

API Reference: `POST /payments`

The updated status of the payment is retrieved using the Get Payment endpoint. You will need to use the identifier of the payment as `payment_id` in the path.

API Reference: `GET /payments/{payment_id}`

## CVRP - Commercial Variable Recurring Payments {#cvrp---commercial-variable-recurring-payments}

Link your PSU's bank account to your application by asking them to set up a mandate and define a set of control parameters (for example payment limits and expiration date) and go through an SCA with the bank. Once the Mandate is authorized, you can submit multiple payments as long as they are within the Mandate parameters, without having the PSU go through SCA with the bank again, thereby creating a one-click checkout process. Refer to [Commercial Variable Recurring Payments](https://developer.mastercard.com/ob-accept-payments/documentation/payments/cvrp/cvrp/index.md) for detailed integration guidance.

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

When the PSU is in your application, ask them to link their account. When the user chooses to link their account, a mandate creation and authorization journey are requested through Mastercard Open Finance Pay.

Mastercard handles the communication with the PSU's bank, including user authentication using SCA. Once the mandate is authorized, the user is returned to your application to continue their journey.

### User flow {#user-flow-1}

1. **Merchant**   
   The merchant integrates the option to link the consumer account into their application. This option initiates the creation of the Mandate and Consumer is sent to Mastercard Open Finance Pay.
2. **Mastercard Open Finance Pay**   
   The Consumer selects their bank account and proceeds with the Mandate authorization journey.
3. **Mastercard Open Finance Pay**   
   The Consumer reviews the parameters (payment limits and validity) of the mandate and permits the PISP to create the mandate with the bank.
4. **Bank**   
   The Consumer authenticates themselves using the bank's existing authentication methods.
5. **Bank**   
   The available accounts and balances are displayed, and the Consumer selects their preferred account and confirms the mandate parameters with the bank.
6. **Mastercard Open Finance Pay**   
   The consumer is automatically redirected to Mastercard Open Finance Pay, where they can see that the mandate was created successfully.
7. **Merchant**   
   The consumer is redirected to the Merchant for the next steps.

For the best viewing experience, click the **full screen** option.

#### Create mandate: {#create-mandate}

#### Pay using a mandate: {#pay-using-a-mandate}

### What does CVRP payment flow look like for an End User? {#what-does-cvrp-payment-flow-look-like-for-an-end-user}

The following Figma diagram shows the user flow from the merchant, via Mastercard Open Finance, and the bank to the successful transaction.

For the best viewing experience of app to app, click the **full screen** option or **zoom** using the controls located on the right.

#### Create mandate flow {#create-mandate-flow}

Diagram create_mandate_flow

1. The Payment Service User (PSU) initiates linking their bank account to the Merchant's application.
2. The Merchant passes the PSU to the Integrator to create and authorize the mandate.
3. The Integrator uses the `/mandates` endpoint to submit a Create Mandate request. The Integrator sends the PSU to the Mastercard Open Finance Pay user journey (flowUrl).
4. Mastercard Open Finance Pay sends the PSU to the bank to authenticate and authorize the mandate.
5. The ASPSP returns the status of the mandate.
6. Mastercard Open Finance Pay notifies the Integrator about the Mandate status change and enables access to the latest mandate status. Refer to our [Mandate Status Model](https://developer.mastercard.com/ob-accept-payments/documentation/payments/cvrp/mandate-status-model/index.md) for more information.
7. The Integrator returns the status of the mandate to the Merchant.
8. The Merchant confirms to PSU that their account has been linked.

##### Endpoints used {#endpoints-used-1}

A create mandate request is initiated.

API Reference: `POST /mandates`

The updated status of the mandate is retrieved using the Get Mandate endpoint. You will need to use the identifier of the mandate as `mandate_id` in the path.

API Reference: `GET /mandates/{mandate_id}`

#### E-commerce Payment with Mandate flow {#e-commerce-payment-with-mandate-flow}

Diagram ecomm_pay_mandate_flow

1. The PSU initiates payment.
2. The Merchant passes the payment request to the Integrator.
3. The Integrator uses the `/mandates/{mandate_id}/payments` endpoint to submit a payment with a mandate request. The Integrator sets `endUser.present = true` to show that payment was initiated by the PSU.
4. Mastercard Open Finance Pay processes the payment with the ASPSP (PSU bank) based on the authorized mandate.
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 Pay.
7. Mastercard Open Finance Pay notifies the integrator about the payment status change and allows them to retrieve the latest status. Refer to our [Payment Status Model](https://developer.mastercard.com/ob-accept-payments/documentation/payments/single-immediate-payments/payment-status-model/index.md) for more information.
8. The Merchant receives confirmation of payment initiation from their Integrator.
9. The Merchant notifies the PSU about the payment initiation status.

##### Endpoints used {#endpoints-used-2}

A create payment using mandate request is initiated. You will need to use the identifier of the mandate as `mandate_id` in the path.

API Reference: `POST /mandates/{mandate_id}/payments`

The updated status of the mandate is retrieved using the Get Mandate endpoint. You will need to use the identifier of the mandate as `mandate_id` in the path.

API Reference: `GET /payments/{payment_id}`

