Direct Payment Integration Steps
To implement the basic Direct Payment solution in your system, follow the instructions.
Prerequisites
Before implementing a Direct Payment solution, check with your payment service provider to ensure you meet the following prerequisites:
- Ensure that you have a merchant profile and that should support the API.
- Select and set up your API authentication method.
Implementing a Direct Payment Solution
The Direct Payment solution works through API operations (requests and responses), which are used to, for example, initiate or retrieve information about various payment transactions and store card details. You can use all the API operations available for the REST Server APIs. However, you have no need for the Hosted Checkout and Hosted Session API operations, as they are only needed for the related integration methods. For general information about making server API requests, see Making a Server API Request.
To perform an operation, you must first have it enabled on your merchant profile by your payment service provider. To check which operations are available for you or to troubleshoot any API errors, contact your payment service provider
The operations available to you are limited to the capability of the acquirers configured on your merchant profile with the Mastercard Gateway. If a functionality is not supported for the acquirer on the gateway, any operation requests to execute that functionality are rejected by the gateway, for that acquirer.
Each task you perform with the Direct Payment consists of the following steps:
- Define the needed data Define the payment details and other related data required to create the transaction request.
- Send a request Create a transaction request and send it to the Gateway.
- Interpret the response Decode and parse the response to your transaction request and take appropriate action to complete the transaction.
For a collection of example requests covering the common transaction operation requests, download the Postman collection.
After your integration is completed and you are able to manage basic requests and responses:
- Consider your payment lifecycles and needs for any subsequent operations after the basic payment transaction is completed.
- Determine any customizations you need to make based on the specific payment methods you want to support.
- Consider what kind of security or other additional features you want to offer or use in your integration.
- Test your entire solution.