Skip to main content

Create Card on File

This methods allows the storing of card details that have already been authenticated.

The returned storedPaymentOptionReference can be used e.g. in /payment/mit endpoint to authorize a merchant initiated payment without the need of additional 3DS challenges or submission of card details.

important

This endpoint contains PCI data and requires forwarding through /forwarding/tokenize.

Request

Path:

POST {baseUrl}/accounts/{customerAccountId}/paymentOptions

Header:

Content-Type: application/json
Accept-Language: en-US
Authorization: Basic M2lwN2Yx...OGU3Mg==
{
"customerAccountId": "Gscypec",
"payment": {
"description": "UCOF Registeration for further MIT*diiILks",
"amount": 0.01,
"currencyCode": "EUR"
},
"billingAddress": {
"addressLine1": "Leopoldstr.",
"number": "244",
"city": "Muenchen",
"postCode": "80807",
"countryCode": "DEU"
},
"consumer": {
"merchantCustomerId": "Gscypec",
"firstName": "John",
"lastName": "Doe",
"emailAddress": "Gscypec@mail.com",
"title": "Mr",
"culture": "en-EN",
"dateOfBirth": "1989-11-08",
"gender": "Mr",
"mobilePhone": "+49123456789",
"homePhone": "+49123456789",
"workPhone": "+49123456789"
},
"paymentOption": {
"card": {
"cardDetails": {
"cardHolder": "JOHN DOE",
"cardToken": "5123450000000008",
"cardExpiryMonth": "09",
"cardExpiryYear": "2029",
"cardBrand": "MSTRCRD",
"cvvToken": "123"
},
"3ds": {
"3ds2": {
"acsEci": "02",
"authenticationToken": "kHyn+7YFi1EUAREAAAAvNUe6Hv8=",
"transactionStatus": "Y",
"protocolVersion": "2.1.0",
"dsTransactionId": "ad6cfb86-2893-4196-a500-5c97ed798b74",
"acsTransactionId": "2b2079df-ab41-4e25-ac3a-8c4702ebd41f"
}
}
}
}
}

API Parameters:

Name                                                     DescriptionTypeRequired
customerAccountIdCustomer identifier.StringYes
PaymentPlease refer to Data Model - Payment.ObjectYes
billingAddressPlease refer to Data Model - Address.ObjectYes
ConsumerPlease refer to Data Model - Consumer.ObjectYes
paymentOptionPayment option details object to be provided to SmartPay.ObjectYes
    - cardObjectYes
        - - cardDetailsObjectYes
            - - - cardHolderCredit card holder name.StringYes
            - - - cardTokenPAN token.StringYes
            - - - cardExpiryMonthCredit card expiration month in format "MM".NumericYes
            - - - cardExpiryYearCredit card expiration year in format "YYYY".NumericYes
            - - - cardBrandCard brand code. Please refer to Data Model - Payment Options.StringYes
            - - - cvvTokenCVV token.StringNo
        - - 3ds2Contains the 3DS details returned by the response in GET 3DS session details.ObjectYes
            - - - ascEciIndicates the security level of the transaction.StringYes
            - - - authenticationTokenThe 3D secure CAVV or AAV. Must be Base64 encoded.StringYes
            - - - transactionStatusIndicates the result of payer authentication with the issuer.
- N: Transaction did not qualify as an authenticated transaction or account verification.
- Y: The transaction qualified as an authenticated transaction.
- C: 3DS version 2.2.0 only. Transaction requires a challenge.
- R: 3DS version 2.2.0 only. A challenge is recommended for the transaction.
- U: 3DS version 2.2.0 only. The transaction is unavailable for authentication.
- A: 3DS version 2.2.0 only. The transaction is authenticated with a frictionless flow.
StringYes
            - - - protocolVersionThe version of the EMV 3-D Secure protocol used to perform 3-D Secure authentication, in the format specified by EMVCo.StringYes
            - - - dsTransactionIdA unique transaction identifier assigned by the scheme Directory Server to identify the 3DS transaction.StringYes
            - - - acsTransactionIdA unique transaction identifier assigned by the Access Control Server to identify the 3DS transaction.StringYes

Response

Status Code:

201	(Payment option successfully stored)

Header:

Content-Type: application/json
Accept-Language: en-US
{
"storedPaymentOptionReference": "Ky28Mgp5GLauHPmYxUnZO",
"cardDetails": {
"cardBrand": "MSTRCRD",
"cardHolder": "JOHN DOE",
"cardToken": "512345PFITLJFS0008",
"cvvToken": "WNZSWCUMAAHIDDVUDC",
"cardExpiryMonth": "09",
"cardExpiryYear": "2029"
}
}

API Parameters:

Name                                           DescriptionType
storedPaymentOptionReferenceID of the stored payment option that can be used for future payments.String
cardDetailsObject
     - cardBrandCard brand code. Please refer to Data Model - Payment Options.String
     - cardHolderCredit card holder name.String
     - cardTokenPAN token.String
     - cvvTokenCVV token.String
     - cardExpiryMonthCredit card expiration month in format "MM".Numeric
     - cardExpiryYearCredit card expiration year in format "YYYY".Numeric