POST
/
v2.01
/
{ClientId}
/
cardregistrations
curl -X POST https://api.sandbox.mangopay.com/v2.01/{ClientId}/cardregistrations \
  -H 'Content-Type: application/json' \
  -d '{
    "Tag": null,
    "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS",
    "CardType": "CB_VISA_MASTERCARD",
    "Currency": "EUR"
}  '
{
    "Id": "cardreg_wt_11ed4694-d244-4bd1-92fb-dc473c99a9d4",
    "Tag": null,
    "CreationDate": 1726239226,
    "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS",
    "AccessKey": "ehvrHoPE6FpjCCAgmNvg",
    "PreregistrationData": "lhOJ6CFiDJPCXViyHjfcayh92nouB3AAaB5yqiLCBT6yjkLPCptmxsUdfffAc6EE4uj9AuSfmwbdfKN3BMechzUU3Gz8ectEx70TDeupudr",
    "RegistrationData": null,
    "CardId": null,
    "CardType": "CB_VISA_MASTERCARD",
    "CardRegistrationURL": "https://pci.sandbox.mangopay.com/api/mangopay/vault/tokenize/eyJjbGllbnQiOiJhbnRob255aF90ZXN0MSIsInRva2VuIjoiUlBQTVdJR1hrd0ZJSGFacyJ9",
    "ResultCode": null,
    "ResultMessage": null,
    "Currency": "EUR",
    "Status": "CREATED"
}
Read more about the Card Registration object →

Body parameters

Tag
string
Custom data that can be added to this object.
In the case of the Card Registration, this parameter can be used to facilitate the link between the User object and its equivalent on your platform for instance. This value will be inherited by the Card object Tag parameter and will not be editable.
UserId
string
required
The unique identifier of the user the card belongs to.
CardType
string
Allowed values: 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.
Currency
string
required
Allowed values: The three-letter ISO 4217 code (EUR, GBP, etc.) of a supported currency (depends on feature, contract, and activation settings).The currency of the card.

Responses

{
    "Id": "cardreg_wt_11ed4694-d244-4bd1-92fb-dc473c99a9d4",
    "Tag": null,
    "CreationDate": 1726239226,
    "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS",
    "AccessKey": "ehvrHoPE6FpjCCAgmNvg",
    "PreregistrationData": "lhOJ6CFiDJPCXViyHjfcayh92nouB3AAaB5yqiLCBT6yjkLPCptmxsUdfffAc6EE4uj9AuSfmwbdfKN3BMechzUU3Gz8ectEx70TDeupudr",
    "RegistrationData": null,
    "CardId": null,
    "CardType": "CB_VISA_MASTERCARD",
    "CardRegistrationURL": "https://pci.sandbox.mangopay.com/api/mangopay/vault/tokenize/eyJjbGllbnQiOiJhbnRob255aF90ZXN0MSIsInRva2VuIjoiUlBQTVdJR1hrd0ZJSGFacyJ9",
    "ResultCode": null,
    "ResultMessage": null,
    "Currency": "EUR",
    "Status": "CREATED"
}
curl -X POST https://api.sandbox.mangopay.com/v2.01/{ClientId}/cardregistrations \
  -H 'Content-Type: application/json' \
  -d '{
    "Tag": null,
    "UserId": "user_m_01J7KACBPAV7XAF8AH9BDCJPRS",
    "CardType": "CB_VISA_MASTERCARD",
    "Currency": "EUR"
}  '