PUT
/
v2.01
/
{ClientId}
/
preauthorizations
/
{PreauthorizationId}
{
   "PaymentStatus": "CANCELED"
}  
{
   "Id": "156686431",
   "Tag": null,
   "CreationDate": 1669116461,
   "AuthorId": "156671912",
   "DebitedFunds": {
       "Currency": "EUR",
       "Amount": 500
   },
   "RemainingFunds": {
       "Currency": "EUR",
       "Amount": 0
   },
   "AuthorizationDate": 1669116472,
   "Status": "SUCCEEDED",
   "PaymentStatus": "CANCELED",
   "ExpirationDate": 1669678072,
   "PayInId": null,
   "ResultCode": "000000",
   "ResultMessage": "Success",
   "SecureMode": "FORCE",
   "CardId": "156674899",
   "SecureModeReturnURL": "https://docs.mangopay.com/please-ignore?preAuthorizationId=156686431",
   "SecureModeRedirectURL": null,
   "SecureModeNeeded": true,
   "PaymentType": "CARD",
   "ExecutionType": "DIRECT",
   "StatementDescriptor": null,
   "Culture": "EN",
   "SecurityInfo": {
       "AVSResult": "NO_CHECK"
   },
   "MultiCapture": true,
   "BrowserInfo": {
       "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8",
       "JavaEnabled": true,
       "Language": "FR-FR",
       "ColorDepth": 4,
       "ScreenHeight": 1800,
       "ScreenWidth": 400,
       "TimeZoneOffset": 60,
       "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
       "JavascriptEnabled": true
   },
   "IpAddress": "80.236.38.245",
   "Billing": {
       "FirstName": "Joe",
       "LastName": "Bloggs",
       "Address": {
           "AddressLine1": null,
           "AddressLine2": null,
           "City": null,
           "Region": null,
           "PostalCode": null,
           "Country": null
       }
   },
   "Shipping": {
       "FirstName": "Joe",
       "LastName": "Bloggs",
       "Address": {
           "AddressLine1": null,
           "AddressLine2": null,
           "City": null,
           "Region": null,
           "PostalCode": null,
           "Country": null
       }
   },
   "Requested3DSVersion": null,
   "Applied3DSVersion": "V2_1",
   "PreferredCardNetwork": null,
   "CardInfo": {
        "BIN": "497010",
        "IssuingBank": "LA BANQUE POSTALE",
        "IssuerCountryCode": "MA",
        "Type": "CREDIT",
        "Brand": "VISA",
        "SubType": null
    }
}  

This call is used to manually close the preauthorization hold period before the ExpirationDate, thereby releasing the preauthorized funds. 

The PaymentStatus can be set to:

  • CANCELED when no preauthorized pay-ins have been made to capture funds. Trying to cancel a used preauthorization returns an error.
  • VALIDATED when at least one preauthorized pay-in has been made to capture funds. Trying to validate an unused preauthorization returns an error.

Caution – Canceling or validating a preauthorization is irreversible

A preauthorization with the CANCELED or VALIDATED status can’t be reused.

Path parameters

PreauthorizationId
string
required

The unique identifier of the preauthorization.

Body parameters

PaymentStatus
string
required

Allowed values: CANCELED, VALIDATED

The status of the preauthorization object:

  • WAITING – The remaining preauthorized funds can be captured by making one or several preauthorized pay-ins. Pay-ins can only be made against a preauthorization with the WAITING status.
  • CANCELED – The preauthorization was canceled manually before any preauthorized pay-ins were made, or it was canceled automatically because the authorization failed.
  • EXPIRED – The hold period on the preauthorized funds has ended without any preauthorized pay-ins taking place.
  • VALIDATED – During the hold period: Indicates that all the preauthorized funds have been captured (RemainingFunds is zero) and no more preauthorized pay-ins can be made. After the hold period: Indicates that at least one capture was made during the hold period.

Responses

{
   "Id": "156686431",
   "Tag": null,
   "CreationDate": 1669116461,
   "AuthorId": "156671912",
   "DebitedFunds": {
       "Currency": "EUR",
       "Amount": 500
   },
   "RemainingFunds": {
       "Currency": "EUR",
       "Amount": 0
   },
   "AuthorizationDate": 1669116472,
   "Status": "SUCCEEDED",
   "PaymentStatus": "CANCELED",
   "ExpirationDate": 1669678072,
   "PayInId": null,
   "ResultCode": "000000",
   "ResultMessage": "Success",
   "SecureMode": "FORCE",
   "CardId": "156674899",
   "SecureModeReturnURL": "https://docs.mangopay.com/please-ignore?preAuthorizationId=156686431",
   "SecureModeRedirectURL": null,
   "SecureModeNeeded": true,
   "PaymentType": "CARD",
   "ExecutionType": "DIRECT",
   "StatementDescriptor": null,
   "Culture": "EN",
   "SecurityInfo": {
       "AVSResult": "NO_CHECK"
   },
   "MultiCapture": true,
   "BrowserInfo": {
       "AcceptHeader": "text/html, application/xhtml+xml, application/xml;q=0.9, /;q=0.8",
       "JavaEnabled": true,
       "Language": "FR-FR",
       "ColorDepth": 4,
       "ScreenHeight": 1800,
       "ScreenWidth": 400,
       "TimeZoneOffset": 60,
       "UserAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",
       "JavascriptEnabled": true
   },
   "IpAddress": "80.236.38.245",
   "Billing": {
       "FirstName": "Joe",
       "LastName": "Bloggs",
       "Address": {
           "AddressLine1": null,
           "AddressLine2": null,
           "City": null,
           "Region": null,
           "PostalCode": null,
           "Country": null
       }
   },
   "Shipping": {
       "FirstName": "Joe",
       "LastName": "Bloggs",
       "Address": {
           "AddressLine1": null,
           "AddressLine2": null,
           "City": null,
           "Region": null,
           "PostalCode": null,
           "Country": null
       }
   },
   "Requested3DSVersion": null,
   "Applied3DSVersion": "V2_1",
   "PreferredCardNetwork": null,
   "CardInfo": {
        "BIN": "497010",
        "IssuingBank": "LA BANQUE POSTALE",
        "IssuerCountryCode": "MA",
        "Type": "CREDIT",
        "Brand": "VISA",
        "SubType": null
    }
}  
{
   "PaymentStatus": "CANCELED"
}