ApiCardRegistrations class provides methods to register new payment cards. Card registration is a multi-step process that securely collects card data.
Methods
Create
Create a new card registration.The CardRegistration object to create
Optional idempotency key for safe retries
\MangoPay\CardRegistration - The created CardRegistration object with registration URL and data
Example:
Get
Get a card registration by its ID.The unique identifier of the card registration
\MangoPay\CardRegistration - The CardRegistration object
Example:
Update
Update a card registration with registration data received from the tokenization server.The CardRegistration object to update (must include Id and RegistrationData)
\MangoPay\CardRegistration - The updated CardRegistration object with CardId
Example:
CardRegistration Entity
TheCardRegistration entity manages the secure registration process for payment cards.
Properties
The unique identifier of the card registration
Unix timestamp of when the card registration was created
Custom data for your use
The ID of the user registering the card
The type of card:
CB_VISA_MASTERCARD, DINERS, MASTERPASS, MAESTRO, P24, IDEAL, etc.The currency for card validation (ISO 4217 format)
The access key for the tokenization server (read-only)
The pre-registration data to send to the tokenization server (read-only)
The URL to POST card data to for tokenization (read-only)
The registration data returned from the tokenization server (set this when updating)
The ID of the registered card (available after successful update)
The result code of the registration
The result message explaining the result code
The status of the card registration:
CREATED, VALIDATED, ERRORThe cardholder’s name as shown on the payment card
Card Registration Flow
The card registration process involves several steps:Step 1: Create Card Registration
Step 2: Tokenize Card Data (Client-side)
Step 3: Complete Registration
After successful registration, you can use the
CardId to create pay-ins or pre-authorizations without needing to collect card details again.