Profile registration via API is available only for merchants who have a PCI-DSS certificate. If you do not have a PCI-DSS certificate, use registration via the payment link API as described in [5. Creating a new payment link via API], where you need to include the
paywall.forceCardChannelparameter with an appropriate value.
Registering a new profile via API is done by creating a new card transaction (section 3) with paymentMethodChannel set to oneclick or recurring.
Server response
When the transaction is accepted, the standard notification will be returned enriched with an additional statusCode field and a paymentProfile section with the following structure:
{
"paymentProfile": {
"id": "d6a5bd6c-8e9c-496e-beb2-f0ca08215645",
"merchantMid": "6yt3gjtm9p7b8h9xsdqz",
"merchantCustomerId": "123",
"firstName": "Jan",
"lastName": "Kowalski",
"maskedNumber": "****1791",
"month": "10",
"year": "2020",
"organization": "MASTERCARD",
"isActive": 1,
"profile": "ONE_CLICK"
}
}
where:
| Parameter | Type | Description |
|---|---|---|
id |
string | Profile identifier |
merchantMid |
string | Client identifier |
merchantCustomerId |
string(3) | Payer identifier, allowed characters: A-Za-z0-9_- |
firstName |
string | First name of the payment instrument holder |
lastName |
string | Last name of the payment instrument holder |
maskedNumber |
integer | Four asterisks and the last four digits of the payment instrument |
month |
string | Card expiry month |
year |
string | Card expiry year |
organization |
string | Payment organization that issued the registered card |
isActive |
integer | Profile activity: 1 - active, 0 - inactive |
profile |
string | Profile type |