Midigator® Prevention API API Reference
Introduction
Midigator’s Prevention API is structured around the REST architectural style and returns JSON-encoded responses. It uses standard HTTP response codes and authentication.
The API can be called from any language, including .NET, Java, PHP, and Python, and it can be deployed on multiple platforms, such as Windows, Mac OS, or Linux.
If you have questions about the information in this API document or are unable to resolve an error message, please contact the integrations team at integrations@midigator.com.
API Flow
Midigator suggests using the Prevention API in the following flow:
1. Obtain an API Bearer Token
Use the Authentication API to obtain a bearer token for subsequent Prevention API requests.
2. Use the Events API to Receive Information About Prevention Alerts
Use the Events API to obtain notifcations about prevention alerts. These events contain important information such as GUIDs, amounts, and dates.
3. Submit a Prevention Alert Resolution
Submit your resolution choice to Midigator. The API call is documented below.
Base URL
Production:https://api.midigator.com/prevention/v1
Sandbox:https://api-sandbox.midigator.com/prevention/v1
Contact: integrations@midigator.com
Schemes: https
Version: 1.0.0
Authentication
AuthorizationBearerToken
Paths
Resolve a Prevention Alert
Prevention alerts can help you stop disputes from becoming chargebacks. To do that, you either need to refund the transaction or explain why a refund isn’t necessary. The action you take is called the resolution. This path allows you to explain how you chose to resolve the issue so Midigator can share your resolution with Ethoca or Verifi.
Use the resolution object to tell Midigator how you have responded to the prevention alert.
Midgator's globally unique identifier (GUID) for the prevention alert
Only application/json
content type is allowed for this resource.
Request Content-Types: application/json
Request Example
{
"resolution_type": "issued_full_refund",
"other_description": ""
}
Everything worked as expected.
The request was unacceptable, usually because a required parameter was omitted.
A valid API key wasn’t provided.
Midigator experienced a problem (rare).
Schema Definitions
resolution: object
The resolution object allows you to explain how you handled a prevention alert. Your chosen response will be shared with Ethoca or Verifi.
- resolution_type: string , x ∈ { could_not_find_order , declined_or_canceled_nothing_to_do , issued_full_refund , issued_refund_for_remaining_amount , 3ds_authorized_successfully , other , previously_refunded_nothing_to_do , unable_to_refund_merchant_account_closed }
-
The
resolution_type
field explains the action taken. There are eight response options.could_not_find_order
- You could not match the prevention alert to an order in your CRM or order management system.declined_or_canceled_nothing_to_do
- The customer had declined or canceled the order; no further action is necessary.issued_full_refund
- You issued a full refund.issued_refund_for_remaining_amount
- The order was already partially refunded so you issued a refund for the remaining amount3ds_authorized_successfully
- The order was approved by 3D Secure so the customer's bank is responsible for the dispute.previously_refunded_nothing_to_do
- The order was refunded before the alert was issued; no further action is necessary.unable_to_refund_merchant_account_closed
- You are unable to refund the order because your merchant account has been closed.other
- You took a different action, one that isn't listed here. Please use theother_description
field to explain. - other_description: string
-
The
other_description
field explains the alternate action you chose to take. This field should contain data any time another
response is given in theresolution_type
string.
Example
{
"resolution_type": "issued_full_refund",
"other_description": ""
}