# Get Paid
source: https://developer.mastercard.com/mastercard-gateway/documentation/use-cases/get-paid/index.md

## Accept a payment {#accept-a-payment}

A merchant that provides goods or services for immediate delivery, such as digital content, event tickets, or on-demand services, can use the Mastercard Gateway API to process a one-time payment. In this flow, authorization and capture are performed together in a single PAY transaction, allowing the merchant to receive the payment result during checkout and immediately confirm the transaction to the payer.

### Prerequisites {#prerequisites}

* Ensure that you have a [merchant profile](https://developer.mastercard.com/mastercard-gateway/documentation/getting-started/accessing-the-api/index.md) that supports direct API operations.
* Select and configure an API authentication method for the Mastercard Gateway.

### Sequence diagram {#sequence-diagram}

Diagram accept-a-payment

### Workflow {#workflow}

1. The payer starts the checkout and enters payment details in the merchant web application or mobile app.
2. The merchant UI submits the order information and payment data to the merchant server.
3. The merchant server submits a PAY request to the Mastercard Gateway to process the payment.
4. The Mastercard Gateway forwards the payment request to the acquirer.
5. The acquirer routes the payment through the appropriate card network for authorization.
6. The card network sends the authorization request to the issuer bank.
7. The issuer bank validates the transaction and returns an approval or decline response.
8. The card network returns the authorization response to the acquirer.
9. The acquirer returns the authorization response to the Mastercard Gateway.
10. The Mastercard Gateway returns the payment result and gateway response to the merchant server.
11. The merchant server sends the payment result to the merchant UI.
12. The merchant UI displays a confirmation or decline message to the payer.

### Endpoint {#endpoint}

|     API     | Format | HTTP Method |                                                                       Operation                                                                        |
|-------------|--------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|
| Transaction | NVP    | POST        | [Pay](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Transaction:%20%20Pay.html?locale=en_US)         |
|             | REST   | PUT         | [Pay](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Transaction%3a%20%20Pay.html?locale=en_US) |

### Error resolution {#error-resolution}

For details on error resolution, explore our [Code and Formats](https://developer.mastercard.com/mastercard-gateway/documentation/code-and-formats/index.md) section.

## Authorize now, capture on fulfillment {#authorize-now-capture-on-fulfillment}

A merchant that sells goods or services that are fulfilled after purchase, such as retail orders, travel bookings, or made-to-order items, can use the Mastercard Gateway API to process a two-step payment. In this flow, the merchant authorizes the payment during checkout to confirm that funds are available and captures the payment later when the goods are shipped or the service is confirmed. If the order cannot be fulfilled, the merchant can void the authorization to release the reserved funds.

### Prerequisites {#prerequisites-1}

Ensure that you have the required fields:

* `orderId`
* `transactionId`

### Sequence diagram {#sequence-diagram-1}

Diagram auth-now-capt-fulfilment

### Workflow {#workflow-1}

1. The payer starts the checkout and enters payment details in the merchant application.
2. The merchant UI submits the order and payment information to the merchant server.
3. The merchant server submits an AUTHORIZE request to the Mastercard Gateway to verify that funds are available.
4. The Mastercard Gateway forwards the authorization request to the acquirer.
5. The acquirer routes the payment through the card network for authorization.
6. The card network sends the authorization request to the issuer bank.
7. The issuer bank approves or declines the transaction and returns a response.
8. The card network returns the authorization response to the acquirer.
9. The acquirer returns the authorization response to the Mastercard Gateway.
10. The Mastercard Gateway returns the authorization result to the merchant server.
11. The merchant server creates a fulfillment request in the order management system.
12. If fulfillment is confirmed, the order management system notifies the merchant server that the order is ready for fulfillment.
13. The merchant server submits a CAPTURE request to the Mastercard Gateway.
14. The Mastercard Gateway forwards the capture request to the acquirer.
15. The acquirer routes the payment through the card network for capture.
16. The card network sends the capture request to the issuer bank.
17. The issuer bank returns a capture response to the card network.
18. The card network returns the capture response to the acquirer.
19. The acquirer returns the capture response to the Mastercard Gateway.
20. The Mastercard Gateway returns the capture result to the merchant server.
21. The merchant server sends the payment and fulfillment confirmation to the merchant UI.
22. If fulfillment fails, the order management system notifies the merchant server that the order cannot be fulfilled.
23. The merchant server submits a VOID request to the Mastercard Gateway to cancel the authorization.
24. The Mastercard Gateway returns the void result to the merchant server.
25. The merchant application displays a fulfillment failure message to the payer.

### Endpoint {#endpoint-1}

|     API     | Format | HTTP Method |                                                                          Operation                                                                           |
|-------------|--------|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Transaction | NVP    | POST        | [Pay](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Transaction:%20%20Authorize.html?locale=en_US)         |
|             | REST   | PUT         | [Pay](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Transaction%3a%20%20Authorize.html?locale=en_US) |
|             | NVP    | POST        | [Capture](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Transaction%3a%20%20Capture.html?locale=en_US)     |
|             | REST   | PUT         | [Capture](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Transaction:%20%20Capture.html?locale=en_US) |
|             | NVP    | POST        | [Void](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Transaction:%20%20Void.html?locale=en_US)             |
|             | REST   | PUT         | [Void](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Transaction%3a%20%20Void.html?locale=en_US)     |

### Error resolution {#error-resolution-1}

For details on error resolution, explore our [Code and Formats](https://developer.mastercard.com/mastercard-gateway/documentation/code-and-formats/index.md) section.

## Accept payments with EMV 3‑D Secure {#accept-payments-with-emv-3d-secure}

By enabling EMV 3-D Secure through the Mastercard Gateway API, merchants can help reduce fraud, meet Strong Customer Authentication (SCA) and other regulatory requirements, and shift fraud liability where applicable. The gateway supports risk-based authentication, helping to keep the checkout experience smooth across web and mobile channels.

### Prerequisites {#prerequisites-2}

* Ensure that you have a [merchant profile](https://developer.mastercard.com/mastercard-gateway/documentation/getting-started/accessing-the-api/index.md) that supports direct API operations.
* Select and configure an API authentication method for the Mastercard Gateway.

### Sequence diagram {#sequence-diagram-2}

Diagram accept-payment-3ds

### Workflow {#workflow-2}

1. The payer starts the checkout process in the merchant application.
2. The merchant UI initiates the payment request and sends it to the merchant server.
3. The merchant server submits an INITIATE AUTHENTICATION request to the Mastercard Gateway.
4. The Mastercard Gateway sends the authentication request to the directory server.
5. The directory server routes the authentication request to the Issuer Access Control Server.
6. The Issuer Access Control Server presents an authentication challenge, such as an OTP or biometric verification, to the payer.
7. The payer completes the authentication challenge.
8. The merchant UI submits the challenge response to the Issuer Access Control Server.
9. The Issuer Access Control Server returns the authentication result to the directory server.
10. The directory server returns the authentication outcome to the Mastercard Gateway.
11. The Mastercard Gateway returns the EMV 3-D Secure authentication result to the merchant server.
12. After successful authentication, the merchant server submits the payment request to the Mastercard Gateway.
13. The Mastercard Gateway returns the final payment result to the merchant server.

### Endpoint {#endpoint-2}

|      API       | Format | HTTP Method |                                                                                             Operation                                                                                             |
|----------------|--------|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Authentication | NVP    | POST        | [Initiate Authentication](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Authentication%3a%20%20Initiate%20Authentication.html?locale=en_US)     |
|                | REST   | PUT         | [Initiate Authentication](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Authentication:%20%20Initiate%20Authentication.html?locale=en_US) |
|                | NVP    | POST        | [Authenticate Payer](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/nvp/version/100/operation/Authentication:%20%20Authenticate%20Payer.html?locale=en_US)                 |
|                | REST   | PUT         | [Authenticate Payer](https://mtf.gateway.mastercard.com/api/documentation/apiDocumentation/rest-json/version/100/operation/Authentication:%20%20Authenticate%20Payer.html?locale=en_US)           |

### Error resolution {#error-resolution-2}

For details on error resolution, explore our [Code and Formats](https://developer.mastercard.com/mastercard-gateway/documentation/code-and-formats/index.md) section.
