Card

Credit cards and debit cards are the most common payment method in e-commerce.

About card payments

You can accept a card payment in two different ways:

  • Option 1: Charge the card directly
  • Option 2: Authorize an amount and then charge the card

Supported card brands

Unzer supports nearly every available credit card or debit card brand worldwide, including:

  • Visa
  • Mastercard
  • Amex
  • Diners
  • Carte Bleue
  • JCB
  • CUP

Involved parties

The following parties are involved in processing a credit card or debit card payment:

Party Description
Merchant (you) You trigger a card payment, using our JavaScript SDK or Mobile SDK for Android.
Unzer We forward the payment to the acquirer, that is, Unzer or a third-party acquirer.
Acquirer The acquirer is responsible for the cash flow between the customer account and the merchant account.
Issuer (optional) For 3-D Secure, the issuer provides a secure password, which is entered by the customer.
3-D Secure directory service (optional) The directory service returns the correct issuer in case a 3-D Secure request is required.

3-D Secure

3-D Secure is an additional verification step.

When 3-D Secure is enabled, the customer needs to enter an additional password (or a one-time token) to confirm the card transaction. The security mechanism is provided by the card issuer.

3-D Secure guarantee
Payments in 3-D Secure transactions are guaranteed by the acquirer.

Accept a card payment

To accept a card payment, follow the steps below.

Step 1: Create a card resource

To create a card resource, make a POST call to types/card, with the following parameters in the request body:

Parameter Required Type Default Description Example
number Yes String / The card number. 4444333322221111
expiryDate Yes String / The card expiration date, in the MM//YY format. 04/25
cvc Yes String / The card verification code. 123
3ds No Boolean true when there’s one card configuration.

false when there are two card configurations.
If set to true, the card is configured with the 3-D Secure protocol enabled. false
cardHolder No String / The card holder’s name. Anna Smith

{
  "number" : "4444333322221111",
  "expiryDate" : "04/25",
  "cvc": "123",
  "3ds": "false",
  "cardHolder": "test card holder"
}


{
    "id": "s-crd-wln5j3zcmjzi",
    "method": "card",
    "number": "444433******1111",
    "brand": "VISA",
    "cvc": "***",
    "expiryDate": "04/2025",
    "3ds": false,
    "cardHolder": "Test Card Holder",
    "cardDetails": {
        "cardType": "",
        "account": "CREDIT",
        "countryIsoA2": "US",
        "countryName": "UNITED STATES",
        "issuerName": "",
        "issuerUrl": "",
        "issuerPhoneNumber": ""
      },
  	"geoLocation": {
    	"clientIp": "115.77.189.143",
    	"countryCode": "VN"
 		}
}

Property Type Description
id String The returned ID of the card resource that you just created.
method String The payment method.
number String The card number.
brand String The card brand.
cvc Number The card verification code.
expiryDate String The card expiration date.
3ds Boolean If set to true, the card is configured with the 3-D Secure protocol enabled.
cardHolder String The card holder’s name.
cardType String The card type.
account String The type of account related to the card.
countryIsoA2 String The country where the card was issued, displayed in the ISO 3166-1 alpha-2 format.
countryName String The full name of the country where the card was issued.
issuerName String The name of the card’s issuer.
issuerUrl String The URL of the card’s issuer.
issuerPhoneNumber String The phone number of the card’s issuer.
clientIP String The IP address of the device used for the payment.
countryCode String The country associated with clientIp, displayed in the ISO 3166-1 alpha-2 format.
Reusing the card resource
After you create a card resource, you can reuse it several times.
The card resource doesn’t expire by default.

Step 2: Charge or authorize

After you create a card resource, you have two options:

  • Option 1: Charge the card directly
  • Option 2: Authorize an amount and then charge the card

Option 1: Charge the card directly

PCI DSS restrictions
To transfer the credit card or debit card information from your system to Unzer, you need to be PCI DSS-certified. You can also use our JavaScript SDK that makes PCI-compliant card payments.

To charge the card directly, complete the following steps:

  1. Save the card information with a public key using our one of our SDKs:
  2. Transfer the created ID to your server.
  3. Make a POST call to payments/charges.

In your request body, include the following information:

Parameter Required Type Default Description Example
amount Yes Float / The transaction amount. 12.23
currency Yes String / The transaction currency, in the ISO 4217 alpha-3 format. EUR
card3ds Boolean No false Switches between 3-D Secure and non-3-D Secure card transactions.
Using 3-D Secure is only possible if your contract supports two card configurations.
false
returnUrl String Yes / Needed for redirect payments and credit card or debit card payments if 3-D Secure is used. https://www.unzer.com
cardHolder String No / The card holder’s name:
- Min length: 4
- Max length: 60
- No special characters: <> { } $&#
- No letters with accents, such as ä, é
- The industry standard is to use upper case
MAX MUELLER
typeId String Yes / The ID of the types/card resource to be used. s-crd-fm7tifzkqewy
customerId String Yes / The ID of the customers resource to be used. s-cst-3a0daffe47cb

POST https://api.unzer.com/v1/payments/charges
{
  "amount": "50",
  "currency": "EUR",
  "card3ds": "false",
  "returnUrl": "https://www.unzer.com",
  "cardHolder": "test Card Holder",
  "resources": {
    "customerId": "s-cst-3a0daffe47cb",
    "typeId": "{{type_id}}"
  }
}

Option 2: Authorize and then charge the card

This is a two-step process with a time delay.

The money is first reserved from the customer, and then charged. The authorize call guarantees the funds by the payment provider for up to seven days. If the amount is not charged in this time, the authorization is canceled and the authorized amount is released.

To authorize and charge the card, complete the following steps:

  1. Save the card information with a public key using our one of our SDKs:
  2. Transfer the created ID to your server.
  3. Make a POST call to payments/authorize.
  4. Make a POST call to payments/{orderId}/charges.

Make an authorize call

Make a POST call to payments/authorize, with the following parameters in the request body:

Parameter Required Type Default Description Example
amount Yes Float / The transaction amount. 12.23
currency Yes String / The transaction currency, in the ISO 4217 alpha-3 format. EUR
returnUrl String Yes / Needed for redirect payments and credit card payments if 3-D Secure is used. https://www.unzer.com
customerId String Yes / References the id of the customers resource. s-cst-3a0daffe47cb
typeId String Yes / References the id of the types/card resource. s-crd-fm7tifzkqewy


POST https://api.unzer.com/v1/payments/authorize
{
  "amount" : "100.00",
  "currency" : "EUR",
  "returnUrl": "https://www.unzer.com",
  "resources" : {
    "customerId" : "",
    "typeId" : "{{type_id}}"
  }
}

For more information on authorization, go to Authorize.

Make a charges call

There are two ways to make a charge call:

  • Without parameters.
    The full authorization amount is charged.
  • With a specific amount.
    Only the passed amount is charged.

POST https://api.unzer.com/v1/payments/s-pay-1/charges
{
  "amount" : "50"
}

Optional: Store credentials for future use

Unzer enables storing credentials for future use. The feature is called Credentials on File (CoF). To use CoF, make sure the cof parameter is set to true in for your API keypair.

To check your keypair configuration, make a GET call to the keypair endpoint:

curl https://api.unzer.com/v1/keypair \
  -u s-priv-xxxxxxxxxx:
{
  "publicKey" : "s-MERCHANT1_PUBLICKEY",
  "secureLevel" : "SAQ-D",
  "merchantName" : "Merchant #2115",
  "merchantAddress" : "Austria",
  "availablePaymentTypes" : [ "card", "sepa-direct-debit", "sepa-direct-debit-secured", "paypal", "sofort", "giropay", "invoice", "przelewy24", "invoice-secured", "prepayment", "EPS", "bancontact", "PIS", "ideal", "invoice-secured", "alipay", "wechatpay", "applepay", "googlepay" ],
  "cof" : "true"
}

Optional: Enable 3-D Secure

The checkout flow with 3-D Secure enabled is the following:

  1. You make an authorize call or a charges call.
  2. You get a redirectUrl of a verification webpage, and the status of the payment is pending.
  3. You redirect the customer to the redirectUrl.
  4. On the verification webpage, the customer enters a 3-D Secure password or a one-time token.
  5. You redirect the customer to the returnUrl that you specified in the authorize or charges call.
  6. You retrieve the payment information.
  7. If the 3-D Secure authentication is successful, the status of the payment changes from pending to successful.

The authorize and charges calls look the same with and without 3-D Secure:

The response with 3-D Secure enabled looks like this:


{
  "id": "s-chg-1",
    "isSuccess": false,
    "isPending": true,
    "isError": false,
    "redirectUrl": "https://payment.unzer.com/v1/redirect/3-D Secure/s-1W38AO3SaKc2",
    "message": {
      "code": "COR.000.200.000",
        "customer": "Transaction pending"
    },
    "amount": "50.0000",
    "currency": "EUR",
    "returnUrl": "https://www.unzer.com",
    "date": "2018-09-25 13:51:34",
    "resources": {
      "customerId": "",
      "paymentId": "s-pay-85",
      "metadataId": "",
      "typeId": "s-crd-yq7npam2i6ti"
    },
    "processing": {
      "uniqueId": "31HA07BC8114AEEF04A6A1D17A150A90",
      "shortId": "4018.0989.4254",
    }
}

Property Type Description
isSuccess Boolean Set to true if the transaction was successful.
isPending Boolean Set to true if the transaction is pending (e.g. if a redirect to an external system is required).
isError Boolean Set to true if an error occurs.
redirectUrl String The URL to which the customer will get redirected after the payment.
code String A unique ID of the message.

For details, go to Error code structure.
customer String Message displayed to the customer.
amount Float The transaction amount.
currency String The transaction currency, in the ISO 4217 alpha-3 format.
returnUrl String The URL to redirect the customer to after the payment is completed.
date String Date and time of the transaction.
customerId String The ID of the customers resource to be used.
paymentId String The ID of the related payment resource.
metadataId String The ID of the metadata resource to be used.
typeId String The ID of the types/card resource to be used.
uniqueId String The ID of the transaction process.
shortId String The short ID of the transaction process.

3-D Secure ECI

Additionally to the 3ds parameter, you can use a 3dsEci parameter.

ECI stands for “Electronic Commerce Indicator”. This value is returned by the card issuer and indicates the outcome of a 3-D Secure authentication.

To check the 3dsEci parameter, make a GET call to payments/charges or payments/authorize, with a 3-D Secure-compliant card.

GET https://api.unzer.com/v1/payments/{payment-type-resource-id}/charges

"processing": {
    "uniqueId": "...",
    "shortId": "...",
    "3dsEci": "3ds_SUCCESS"
}

Property Type Description
3dsEci String The outcome of the ECI authentication.

Optional: Switch between 3-D Secure and non-3-D Secure

In some cases, you can switch between 3-D Secure and non-3-D Secure payments.

Add the 3ds parameter in /types/card

If you have two contracts, one with 3-D Secure and one without 3-D Secure, you can specify which one to use when charging the card type. The default behavior is to use the 3-D Secure authentication, if:

  1. The card3ds parameter was not set during the charge, and
  2. 3ds is set to true for this card.

To set the 3ds parameter, make a POST call to types/card with the following parameter in the request body:

Parameter Required Type Default Description Example
3ds No Boolean true If set to true, the card is configured with the 3-D Secure protocol enabled. false

For the rest of the parameters, go to Step 1: Create a card.


POST https://api.unzer.com/v1/types/card
{
  "number" : "4444333322221111",
  "expiryDate" : "01/22",
  "cvc": "123",
  "3ds": false
}

Set the card3ds parameter during the charge

Default settings
If you do not set the card3ds parameter, the system uses the current settings of the card resource.

If you use a stored card resource, you can specify if the charge should use 3-D Secure.

To do so, when making a call to payments/charges or payments/authorize, set the card3ds parameter in the request body:

Parameter Required Type Default Description Example
card3ds No Boolean true Switches between 3-D Secure and non 3-D Secure card transactions. false

For the rest of the parameters, go to Authorize or Charge.


POST https://api.unzer.com/v1/payments/charge
{
  "amount" : "50",
  "currency" : "EUR",
  "returnUrl" : "https://www.unzer.com",
  "card3ds": "true",
  "resources" : {
    "typeId" : "s-crd-yq7npam2i6ti"
  }
}

Optional: Update the card details

You can update the following card details:

  • Card holder’s name
  • CVC code
  • Card brand
  • Card number
  • Expiration date

To update the card details, make a PUT call to types\card\{id}, with the following parameters in the request body:

Parameter Required Type Default Description Example
number Yes String / The card number. 4444333322221111
expiryDate Yes String / The card expiration date, in the MM/YY format. 04/25
cvc Yes String / The card verification code. 123
cardHolder No String / The card holder’s name. Anna Smith

{
  "number" : "4444333322221111",
  "expiryDate" : "01/23",
  "cvc": "123",
  "cardHolder": "Test Credit Card Update method"
}

The response is the same as in Step 1: Create a card:


{
  "id": "s-crd-jbkwogbepmq2",
  "method": "card",
  "recurring": false,
  "geoLocation": {
    "clientIp": "111.77.188.111",
    "countryCode": "AT"
  },
  "number": "401288******1881",
  "brand": "VISA",
  "3ds": false,
  "cvc": "***",
  "expiryDate": "01/2023",
  "cardHolder": "Test Credit Card Update method",
  "cardDetails": {
    "cardType": "INFINITE",
    "account": "CREDIT",
    "countryIsoA2": "CA",
    "countryName": "CANADA",
    "issuerName": "",
    "issuerUrl": "",
    "issuerPhoneNumber": ""
  }
}

Non-recurring
After updating a card payment, the payment method becomes non-recurring.
Property Type Description
id String The ID of the card resource.
method String The payment method.
number String The credit card or debit card number.
brand String The credit card or debit card brand.
cvc Number The card verification code.
expiryDate String The expiration date of the credit card or debit card.
3ds Boolean If set to true, the card is configured with the 3-D Secure protocol enabled.
cardHolder String Identifies the name of the card owner.
cardType String The card type.
account String The type of account related to the card.
countryIsoA2 String The country where the card was issued, displayed in the ISO 3166-1 alpha-2 format.
countryName String The full name of the country where the card was issued.
issuerName String The name of the card’s issuer.
issuerUrl String The URL of the card’s issuer.
issuerPhoneNumber String The phone number of the card’s issuer.
clientIP String The IP address of the device used for the payment.
countryCode String The country associated with clientIp, displayed in the ISO 3166-1 alpha-2 format.

Implement the card payment UI on your website

To quickly integrate card payments into your website, implement our ready-made UI components.

Step 1: Load our JS script and CSS stylesheet

Include Unzer’s script and stylesheet on your website.

Always load the script and stylesheet directly from https://static.unzer.com:


<link rel="stylesheet" href="https://static.unzer.com/v1/heidelpay.css" />
<script type="text/javascript" src="https://static.unzer.com/v1/heidelpay.js"></script>

Step 2: Create a heidelpayInstance

Create a heidelpayInstance with your public key:


var heidelpayInstance = new heidelpay('s-pub-xxxxxxxxxx');

Step 3: Create your HTML form

For credit card or debit card, Unzer supports two different payment forms:

  • The default form
    Our recommended solution with the following advantages:
    • Easy to integrate and configure
    • Clean and modern look
    • Real-time validation
    • Real-time error handling
  • The lightweight form
    The lightweight form has no styling and limited error handling. It’s a perfect solution for the users who want to completely control the form’s look.
Localization
We support localization. You can create your HTML form in different languages.

Optional: Get the card holder data from the form

If you want to get card holder data from the form, you can add an HTML element for the card holder input.

To create a payment form, start from one of the examples below.


<form id="payment-form" class="heidelpayUI form" novalidate>
  <div class="field">
    <div id="card-element-id-number" class="heidelpayInput">
        <!-- Card number UI Element is inserted here. -->
    </div>
  </div>
  <div class="two fields">
    <div class="field ten wide">
      <div id="card-element-id-expiry" class="heidelpayInput">
        <!-- Card expiry date UI Element is inserted here. -->
      </div>
    </div>
    <div class="field six wide">
      <div id="card-element-id-cvc" class="heidelpayInput">
        <!-- Card CVC UI Element is inserted here. -->
      </div>
    </div>
  </div>
  <div class="field">
    <button
      id="submit-button"
      class="heidelpayUI primary button fluid"
      type="submit"
    >
      Pay
    </button>
  </div>
</form>


<form id="payment-form" class="heidelpayUI form" novalidate>
  <div id="card-element-id-number">
    <!-- Card number UI Element is inserted here. -->
  </div>
  <div id="card-element-id-expiry">
    <!-- Card expiry date UI Element is inserted here. -->
  </div>
  <div id="card-element-id-cvc">
    <!-- Card CVC UI Element is inserted here. -->
  </div>
  <button id="submit-button" type="submit">Pay</button>
</form>


<form id="payment-form" class="heidelpayUI form" novalidate>
  <div class="field">
    <div id="card-element-id-number" class="heidelpayInput">
        <!-- Card number UI Element is inserted here. -->
    </div>
  </div>
  <div class="two fields">
    <div class="field ten wide">
      <div id="card-element-id-expiry" class="heidelpayInput">
        <!-- Card expiry date UI Element is inserted here. -->
      </div>
    </div>
    <div class="field six wide">
      <div id="card-element-id-cvc" class="heidelpayInput">
        <!-- Card CVC UI Element is inserted here. -->
      </div>
    </div>
  </div>
  <div class="field">
    <div id="card-element-id-holder" class="heidelpayInput">
      <!-- Card holder UI Element is inserted here. -->
    </div>
  </div>

  <div class="field">
    <button
      id="submit-button"
      class="heidelpayUI primary button fluid"
      type="submit"
    >
      Pay
    </button>
  </div>
</form>


<form id="payment-form" class="heidelpayUI form" novalidate>
  <div id="card-element-id-number">
    <!-- Card number UI Element is inserted here. -->
  </div>
  <div id="card-element-id-expiry">
    <!-- Card expiry date UI Element is inserted here. -->
  </div>
  <div id="card-element-id-cvc">
    <!-- Card CVC UI Element is inserted here. -->
  </div>
  <div id="card-element-id-holder">
    <!-- Card holder UI Element is inserted here. -->
  </div>
  <button id="submit-button" type="submit">Pay</button>
</form>

Step 4: Create your payment method

Don't mix the default and lightweight code
Don’t implement the default form with the lightweight payment, or the other way around.

To create your payment method, insert the sample code below the heidelpayInstance you created in step 2:


// Creating a credit card instance
var Card = heidelpayInstance.Card()

// Rendering input fields
Card.create('number', {
  containerId: 'card-element-id-number',
  onlyIframe: false
});
Card.create('expiry', {
  containerId: 'card-element-id-expiry',
  onlyIframe: false
});
Card.create('cvc', {
  containerId: 'card-element-id-cvc',
  onlyIframe: false
});

// Optional
Card.create('holder', {
  containerId: 'card-element-id-holder',
  onlyIframe: false
});


// Creating a credit card instance
var Card = heidelpayInstance.Card()

// Rendering input fields
Card.create('number', {
  containerId: 'card-element-id-number'
});
Card.create('expiry', {
  containerId: 'card-element-id-expiry'
});
Card.create('cvc', {
  containerId: 'card-element-id-cvc'
});

// Optional
Card.create('holder', {
  containerId: 'card-element-id-holder'
});

The IDs must match
Make sure that the IDs in your HTML and JavaScript files match. For more information on how to create your HTML form correctly, go to web integration.
Setting onlyIframe for the default form
If you’re using the default form, set onlyIframe to false.

For references, go to the UI reference section.

Step 5: Create your resource ID and submit it to your server

The last integration step is the same for the default and lightweight form. In this step, you need to implement the following actions:

  1. Handle the form submission
  2. Create a credit card resource (Promise)
  3. Handle errors
  4. Submit the form

To create your resource ID and submit the form, adapt this example code:


// Handling the forms submission
var form = document.getElementById('payment-form');
form.addEventListener('submit', function(event) {
  event.preventDefault();
  Card.createResource()
    .then(function(result) {
      // TODO: Success: Submit result.id to the server
    })
    .catch(function(error) {
      // TODO: Handle errors
    })
});

The submit button triggers an event listener, which takes care of the form’s submission using Promises. As a result, the Promise gets either resolved or rejected.

Optional: Customize the UI components

If you want the UI components to match your website look, you can style the input fields. The card payment form consists of four different fields, and you can style each field individually.

If you want to style all input fields the same way, you need to add the styling attributes in each of the four create methods.

You can set the following styling attributes:

  • Font size
  • Font color
  • Font family

To do that, add the attributes you want to set inside the option parameter of the create method.


Card.create('number', {
  containerId: 'card-element-id-number',
  fontSize: '16px',
  fontColor: 'lightgrey',
  fontFamily: 'Arial, Helvetica, sans-serif'
});

Step 6: Review the code

View the complete code samples that you can use to implement the Unzer Direct Debit UI on your website:

Make sure to import your own JavaScript and CSS files, as well as unzer.js and unzer.css.


<form id="payment-form" class="heidelpayUI form" novalidate>
  <div class="field">
    <div id="card-element-id-number" class="heidelpayInput">
      <!-- Card number UI Element is inserted here. -->
    </div>
  </div>
  <div class="two fields">
    <div class="field ten wide">
      <div id="card-element-id-expiry" class="heidelpayInput">
        <!-- Card expiry date UI Element is inserted here. -->
      </div>
    </div>
    <div class="field six wide">
      <div id="card-element-id-cvc" class="heidelpayInput">
        <!-- Card CVC UI Element is inserted here. -->
      </div>
    </div>
  </div>
  <div class="field">
    <button
      id="submit-button"
      class="heidelpayUI primary button fluid"
      type="submit"
    >
      Pay
    </button>
  </div>
</form>


// Creating an Unzer instance with your public key
var heidelpayInstance = new heidelpay('s-pub-xxxxxxxxxx');
// Rendering input fields
var Card = heidelpayInstance.Card()
Card.create('number', {
  containerId: 'card-element-id-number',
  onlyIframe: false
});
Card.create('expiry', {
  containerId: 'card-element-id-expiry',
  onlyIframe: false
});
Card.create('cvc', {
  containerId: 'card-element-id-cvc',
  onlyIframe: false
});

// Handling the forms submission
var form = document.getElementById('payment-form');
form.addEventListener('submit', function(event) {
  event.preventDefault();
  Card.createResource()
    .then(function(result) {
      // TODO: Success: Submit result.id to the server
    })
    .catch(function(error) {
      // TODO: Handle errors
    })
});


<form id="payment-form" class="heidelpayUI form" novalidate>
  <div id="card-element-id-number">
    <!-- Card number UI Element is inserted here. -->
  </div>
  <div id="card-element-id-expiry">
    <!-- Card expiry date UI Element is inserted here. -->
  </div>
  <div id="card-element-id-cvc">
    <!-- Card CVC UI Element is inserted here. -->
  </div>
  <button id="submit-button" type="submit">Pay</button>
</form>


// Creating an Unzer instance with your public key
var heidelpayInstance = new heidelpay('s-pub-xxxxxxxxxx');
// Rendering input fields
var Card = heidelpayInstance.Card()
Card.create('number', {
  containerId: 'card-element-id-number',
  onlyIframe: false
});
Card.create('expiry', {
  containerId: 'card-element-id-expiry',
  onlyIframe: false
});
Card.create('cvc', {
  containerId: 'card-element-id-cvc',
  onlyIframe: false
});

// Handling the forms submission
var form = document.getElementById('payment-form');
form.addEventListener('submit', function(event) {
  event.preventDefault();
  Card.createResource()
    .then(function(result) {
      // TODO: Success: Submit result.id to the server
    })
    .catch(function(error) {
      // TODO: Handle errors
    })
});

UI reference

Constructors

Constructor Description
heidelpay.Card() Initializes the card object.

Methods

Method Type Description Returns
create(String type, Object options) Void Creates the input fields specified by the type parameter and mounts them onto the declared DOM element.
You can also pass different options as key value pairs inside the options parameter.
Void
createResource() Promise Creates a Promise object for form input validation and a /types/card.
If resolved successfully, a /types/card is created and a success object) is returned.
If rejected, an error object) is returned.
Success:
{id: String}
Error:
{success: Boolean,
type: String,
error: Number,
message: String}
create properties
Property Required Type Default Description
type Yes String / Specifies the type of the created input field.

Valid values for a credit card or debit card:
number
expiry
cvc
holder
options Yes JSON object / A JSON with various options for the created input field.
options properties
Property Required Type Default Description Example value
containerId Yes String / The HTML id of the DOM element where the UI component is inserted. containerId: 'card-element-id-number'
onlyIframe No Boolean true Specifies if the UI components are inserted with styling. true
The UI components are not styled.

false
The UI components are styled.
autofillCC Yes Boolean false Allows or disallows the browser to save and pre-fill the credit card number. false
fontSize Yes String / Specifies the font size used inside the input field. 16px
fontColor Yes String / Specifies the font color used inside the input field. red
fontFamily Yes String / Specifies the font family used inside the input field. Arial, Helvetica, sans-serif

createResource response parameters

Property Type Description
id String The ID of the returned /types/card resource.
success Boolean Specifies if the resource ID was created successfully.
type String Represents the input field where the error occurred.
error Number The error code.
message String An error message describing the error in more detail.