ApiCards class provides methods to retrieve and manage registered card information.
Methods
Get
Get a card by its ID.The unique identifier of the card
\MangoPay\Card - The Card object
Example:
Update
Update a card’s properties (typically to deactivate it).The Card object to update (must include Id)
\MangoPay\Card - The updated Card object
Example:
GetByFingerprint
Get a list of cards with the same fingerprint. The fingerprint is a hash uniquely generated per 16-digit card number.The fingerprint hash of the card
Pagination object (passed by reference)
Sorting options
\MangoPay\Card[] - Array of Card objects
Example:
GetPreAuthorizations
Get all pre-authorizations for a specific card.The ID of the card
Pagination object
Filtering options
Sorting options
\MangoPay\CardPreAuthorization[] - Array of CardPreAuthorization objects
Example:
GetTransactions
Retrieve a list of transactions for a specific card.The ID of the card
Pagination object (passed by reference)
Filtering options
Sorting options
\MangoPay\Transaction[] - Array of Transaction objects
Example:
ValidateCard
Validate a card.The ID of the card to validate
The card validation object
\MangoPay\CardValidation
Example:
GetCardValidation
Get a card validation.The ID of the card
The ID of the card validation
\MangoPay\CardValidation
Example:
GetTransactionsByFingerprint
Get all transactions for cards with a specific fingerprint.The card fingerprint hash
Filtering options
Pagination object
Sorting options
\MangoPay\Transaction[] - Array of Transaction objects
Example:
Card Entity
TheCard entity represents a registered payment card.
Properties
The unique identifier of the card
Unix timestamp of when the card was registered
Custom data for your use
The ID of the user who owns the card
The expiration date in MMYY format
An obfuscated version of the card number (e.g., “497010XXXXXX0487”)
The card provider:
CB, VISA, MASTERCARD, AMEX, etc.The type of card:
CB_VISA_MASTERCARD, DINERS, MASTERPASS, MAESTRO, P24, IDEAL, etc.Additional product information about the card
The bank code (BIN) of the card
The country where the card was issued (ISO 3166-1 alpha-2 format)
Whether the card is active and can be used for payments
The currency of the card (ISO 4217 format)
The validity status:
UNKNOWN, VALID, INVALIDA unique hash generated per 16-digit card number
The cardholder’s name as shown on the payment card