curl -X POST {CardRegistrationURL} \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d '{
"accessKeyRef": "ehvrHoPE6FpjCCAgmNvg",
"data": "lhOJ6CFiDJPCXViyHjfcayh92nouB3AAaB5yqiLCBT6yjkLPCptmxsUdfffAc6EE4uj9AuSfmwbdfKN3BMechzUU3Gz8ectEx70TDeupudr",
"cardNumber": "4970105181818183",
"cardExpirationDate": "1229",
"cardCvx": "123"
}'
data=acIcnwwLleiAvlZUea5VxYT1eCIn3MER8jyZXr-p8Bzb4Rm8GIA0MQtPs2NL7zPzPO_I7EjQm-m92V909JUL6KT-PmPzJfAQZV_8PIz6wKvjorGNaNd8Mg1rqN6eBpS5Nx0xgKTVnyDj15oG8jR875
Card registrations
Tokenize the card
POST
{CardRegistrationURL}
curl -X POST {CardRegistrationURL} \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d '{
"accessKeyRef": "ehvrHoPE6FpjCCAgmNvg",
"data": "lhOJ6CFiDJPCXViyHjfcayh92nouB3AAaB5yqiLCBT6yjkLPCptmxsUdfffAc6EE4uj9AuSfmwbdfKN3BMechzUU3Gz8ectEx70TDeupudr",
"cardNumber": "4970105181818183",
"cardExpirationDate": "1229",
"cardCvx": "123"
}'
data=acIcnwwLleiAvlZUea5VxYT1eCIn3MER8jyZXr-p8Bzb4Rm8GIA0MQtPs2NL7zPzPO_I7EjQm-m92V909JUL6KT-PmPzJfAQZV_8PIz6wKvjorGNaNd8Mg1rqN6eBpS5Nx0xgKTVnyDj15oG8jR875
This call sends the necessary information to a PCI-DSS-compliant tokenization server without reaching Mangopay’s servers.
The URL to use for this endpoint is returned in the
CardRegistrationURL parameter on the POST Create a Card Registration call.
The request must be made using the “application/x-www-form-urlencoded” content type.
Note – Do not hardcode the URLThe
CardRegistrationURL is specific to each payment. You must rely on the returned URL in full (host, path, and queries) and not hardcode any part of it.Caution – Card details must never pass via your serverFor security reasons, it is strictly forbidden to send the card details to your own server. You must rely on the dedicated PCI-DSS-compliant tokenization server by using the endpoint provided.
Body parameters
string
required
The value of the
AccessKey attribute returned when creating a Card Registration.string
required
The value of the
PreregistrationData attribute returned when creating a Card Registration.string
required
The number of the card to be tokenized.
string
required
Format: “MMYY”The expiration date of the card.
string
required
The card verification code (CVC) or card verification value (CVV), typically 3 digits found on the back of the card.AMEX codes are 4 digits and are called card identification (CID) numbers.For cards that don’t have a CVC, such as Maestro, use
000 or 999.Responses
200
200
The string returned by the tokenization server. This string must be sent in full as the
RegistrationData on the PUT Update a Card Registration endpoint to create the Card object.data=acIcnwwLleiAvlZUea5VxYT1eCIn3MER8jyZXr-p8Bzb4Rm8GIA0MQtPs2NL7zPzPO_I7EjQm-m92V909JUL6KT-PmPzJfAQZV_8PIz6wKvjorGNaNd8Mg1rqN6eBpS5Nx0xgKTVnyDj15oG8jR875
curl -X POST {CardRegistrationURL} \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d '{
"accessKeyRef": "ehvrHoPE6FpjCCAgmNvg",
"data": "lhOJ6CFiDJPCXViyHjfcayh92nouB3AAaB5yqiLCBT6yjkLPCptmxsUdfffAc6EE4uj9AuSfmwbdfKN3BMechzUU3Gz8ectEx70TDeupudr",
"cardNumber": "4970105181818183",
"cardExpirationDate": "1229",
"cardCvx": "123"
}'
Was this page helpful?