Skip to main content
GET
/
v2.01
/
{ClientId}
/
cards
/
{CardId}
/
preauthorizations
<?php 

require_once 'vendor/autoload.php';

use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;

$api = new MangoPayApi();

$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';

try {    
    $cardId = 'card_m_01J420XC7KAW655XPP12SC28HS';

    $response = $api->Cards->GetPreAuthorizations($cardId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}
[
   {
       "Id": "156686696",
       "Tag": null,
       "CreationDate": 1669116896,
       "AuthorId": "156671912",
       "DebitedFunds": {
           "Currency": "EUR",
           "Amount": 500
       },
       "RemainingFunds": {
           "Currency": "EUR",
           "Amount": 0
       },
       "AuthorizationDate": 1669116904,
       "Status": "SUCCEEDED",
       "PaymentStatus": "VALIDATED",
       "ExpirationDate": 1669678504,
       "PayInId": "156686722",
       "ResultCode": "000000",
       "ResultMessage": "Success",
       "SecureMode": "FORCE",
       "CardId": "156674899",
       "SecureModeReturnURL": null,
       "SecureModeRedirectURL": null,
       "SecureModeNeeded": false,
       "PaymentType": "CARD",
       "ExecutionType": "DIRECT",
       "StatementDescriptor": null,
       "Culture": "EN",
       "SecurityInfo": null,
       "MultiCapture": true,
       "BrowserInfo": null,
       "IpAddress": null,
       "Billing": null,
       "Shipping": null,
       "Requested3DSVersion": null,
       "Applied3DSVersion": null,
       "PreferredCardNetwork": null,
       "CardInfo": {
           "BIN": "497010",
           "IssuingBank": "LA BANQUE POSTALE",
           "IssuerCountryCode": "MA",
           "Type": "CREDIT",
           "Brand": "VISA",
           "SubType": null
       }
   }
]  

Documentation Index

Fetch the complete documentation index at: https://docs.mangopay.com/llms.txt

Use this file to discover all available pages before exploring further.

Path parameters

CardId
string
required
The unique identifier of the Card object, obtained during the card registration process.

Responses

Array (Preauthorizations)
array
The list of preauthorizations created by the platform.
[
   {
       "Id": "156686696",
       "Tag": null,
       "CreationDate": 1669116896,
       "AuthorId": "156671912",
       "DebitedFunds": {
           "Currency": "EUR",
           "Amount": 500
       },
       "RemainingFunds": {
           "Currency": "EUR",
           "Amount": 0
       },
       "AuthorizationDate": 1669116904,
       "Status": "SUCCEEDED",
       "PaymentStatus": "VALIDATED",
       "ExpirationDate": 1669678504,
       "PayInId": "156686722",
       "ResultCode": "000000",
       "ResultMessage": "Success",
       "SecureMode": "FORCE",
       "CardId": "156674899",
       "SecureModeReturnURL": null,
       "SecureModeRedirectURL": null,
       "SecureModeNeeded": false,
       "PaymentType": "CARD",
       "ExecutionType": "DIRECT",
       "StatementDescriptor": null,
       "Culture": "EN",
       "SecurityInfo": null,
       "MultiCapture": true,
       "BrowserInfo": null,
       "IpAddress": null,
       "Billing": null,
       "Shipping": null,
       "Requested3DSVersion": null,
       "Applied3DSVersion": null,
       "PreferredCardNetwork": null,
       "CardInfo": {
           "BIN": "497010",
           "IssuingBank": "LA BANQUE POSTALE",
           "IssuerCountryCode": "MA",
           "Type": "CREDIT",
           "Brand": "VISA",
           "SubType": null
       }
   }
]  

<?php 

require_once 'vendor/autoload.php';

use MangoPay\MangoPayApi;
use MangoPay\Libraries\ResponseException as MGPResponseException;
use MangoPay\Libraries\Exception as MGPException;

$api = new MangoPayApi();

$api->Config->ClientId = 'your-client-id';
$api->Config->ClientPassword = 'your-api-key';
$api->Config->TemporaryFolder = 'tmp/';

try {    
    $cardId = 'card_m_01J420XC7KAW655XPP12SC28HS';

    $response = $api->Cards->GetPreAuthorizations($cardId);

    print_r($response);
} catch(MGPResponseException $e) {
    print_r($e);
} catch(MGPException $e) {
    print_r($e);
}