Validity
value is VALID
) within 24 hours after the card registration. This can be done by making a successful pay-in with the card (direct, preauthorized, recurring, etc). See How to process a card payment for the complete flow of a one-off card payment.
Alternatively - and particularly if the card is not going to be used within 24 hours - you can use the card validation feature to perform 3DS authentication without debiting the card.
This guide focuses on how to perform a card validation.
ClientId
and an API key – if you don’t have these, contact Sales to get access to the Mangopay DashboardCardId
for the end user’s card (CardType
must be CB_VISA_MASTERCARD
), obtained through the card registration flow or returned by the Mangopay Vault SDK or Checkout SDK – in Sandbox, we recommend you use the challenge test cardId
as the AuthorId
, use the Create a Card Validation endpoint to make the request for validation without a payment.
When you make the card validation request, you also need to:
POST /V2.01/{ClientId}/cards/{CardId}/validation
SecureModeRedirectURL
value to complete strong customer authentication.
In the case of the Card Validation, it is highly unlikely that the value will be null
(indicating that 3DS is not required and no redirection is needed).
You can also use the SecureModeNeeded
boolean to determine this redirection behavior.
See the 3DS article for more information.
Status
of the Card Validation object to FAILED
.The Card Validity
, however, will remain UNKNOWN
, which allows you to request a new Card Validation.SecureModeReturnURL
which you defined.
The Mangopay API returns your SecureModeReturnURL
with the Id
of the card validation attached as a query parameter in the following format:
https://www.example.com?cardValidationId=Id
Mangopay updates the Status
of the card validation to indicate the outcome of the end user’s authentication.
You can set up the following hooks to be notified of the outcome:
Name | ResourceId | Description |
---|---|---|
CARD_VALIDATION_CREATED | CardValidationId | The Card Validation object has been created and the card is pending validation. |
CARD_VALIDATION_FAILED | CardValidationId | The Card Validation has failed, setting the corresponding card as invalid. |
CARD_VALIDATION_SUCCEEDED | CardValidationId | The Card Validation has succeeded, setting the corresponding card as valid. |