<?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 {
$userId = '146476890';
$response = $api->Users->GetCards($userId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
[
{
"ExpirationDate": "1229",
"Alias": "497010XXXXXX8183",
"CardType": "CB_VISA_MASTERCARD",
"CardProvider": "VISA",
"Country": "FRA",
"Product": "I",
"BankCode": "unknown",
"Active": true,
"Currency": "EUR",
"Validity": "UNKNOWN",
"UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T",
"Id": "card_m_01HXVD91R8QEDY7MYC8TX9R9M8",
"Tag": null,
"CreationDate": 1715685590,
"Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d",
"CardHolderName": "Alex Smith"
},
{
"ExpirationDate": "0626",
"Alias": "497010XXXXXX1119",
"CardType": "CB_VISA_MASTERCARD",
"CardProvider": "VISA",
"Country": "FRA",
"Product": "I",
"BankCode": "unknown",
"Active": true,
"Currency": "EUR",
"Validity": "UNKNOWN",
"UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T",
"Id": "card_m_01HXVF4VAM59ZT3FT42T1ZH35Y",
"Tag": null,
"CreationDate": 1715687550,
"Fingerprint": "36c74d2e60ba474eab6d6f6d46a642b0",
"CardHolderName": "Jody Smith"
}
]
<?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 {
$userId = '146476890';
$response = $api->Users->GetCards($userId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
[
{
"ExpirationDate": "1229",
"Alias": "497010XXXXXX8183",
"CardType": "CB_VISA_MASTERCARD",
"CardProvider": "VISA",
"Country": "FRA",
"Product": "I",
"BankCode": "unknown",
"Active": true,
"Currency": "EUR",
"Validity": "UNKNOWN",
"UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T",
"Id": "card_m_01HXVD91R8QEDY7MYC8TX9R9M8",
"Tag": null,
"CreationDate": 1715685590,
"Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d",
"CardHolderName": "Alex Smith"
},
{
"ExpirationDate": "0626",
"Alias": "497010XXXXXX1119",
"CardType": "CB_VISA_MASTERCARD",
"CardProvider": "VISA",
"Country": "FRA",
"Product": "I",
"BankCode": "unknown",
"Active": true,
"Currency": "EUR",
"Validity": "UNKNOWN",
"UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T",
"Id": "card_m_01HXVF4VAM59ZT3FT42T1ZH35Y",
"Tag": null,
"CreationDate": 1715687550,
"Fingerprint": "36c74d2e60ba474eab6d6f6d46a642b0",
"CardHolderName": "Jody Smith"
}
]
200
Show properties
Show properties
CB_VISA_MASTERCARD, AMEX, MAESTRO, BCMCDefault value: CB_VISA_MASTERCARDThe type of the card. If not supplied, the default value will be taken into account.CB, VISA, MASTERCARD, AMEX, MAESTRO, BCMC, JCB, DISCOVERThe provider of the card.false is irreversible and should be done once the pay-in is successful.UNKNOWN, VALID, INVALIDWhether the card is valid or not.UNKNOWN – No payment or card validation has been processed, so the validity of the card remains unknown.VALID – The first payment or card validation using the card was processed successfully within 24 hours of the initial card registration.INVALID – The first payment or card validation using the card was attempted and failed, or the status of the corresponding card registration was CREATED for more than 24 hours.INVALID, it cannot be set back to VALID. A new card registration will be necessary to make a payment.[
{
"ExpirationDate": "1229",
"Alias": "497010XXXXXX8183",
"CardType": "CB_VISA_MASTERCARD",
"CardProvider": "VISA",
"Country": "FRA",
"Product": "I",
"BankCode": "unknown",
"Active": true,
"Currency": "EUR",
"Validity": "UNKNOWN",
"UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T",
"Id": "card_m_01HXVD91R8QEDY7MYC8TX9R9M8",
"Tag": null,
"CreationDate": 1715685590,
"Fingerprint": "48d63bbcfc2c47fcbc19df35e47b2f8d",
"CardHolderName": "Alex Smith"
},
{
"ExpirationDate": "0626",
"Alias": "497010XXXXXX1119",
"CardType": "CB_VISA_MASTERCARD",
"CardProvider": "VISA",
"Country": "FRA",
"Product": "I",
"BankCode": "unknown",
"Active": true,
"Currency": "EUR",
"Validity": "UNKNOWN",
"UserId": "user_m_01HWWPNMR93ASQYJEH6XVDW44T",
"Id": "card_m_01HXVF4VAM59ZT3FT42T1ZH35Y",
"Tag": null,
"CreationDate": 1715687550,
"Fingerprint": "36c74d2e60ba474eab6d6f6d46a642b0",
"CardHolderName": "Jody Smith"
}
]
<?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 {
$userId = '146476890';
$response = $api->Users->GetCards($userId);
print_r($response);
} catch(MGPResponseException $e) {
print_r($e);
} catch(MGPException $e) {
print_r($e);
}
Was this page helpful?