Skip to main content

Collect payment method information

Before you can use payment.js to create a payment method, you must collect the purchaser's payment method details through a form or page in your checkout user interface. The required information varies by payment method type. Currently, only credit cards are supported. You must collect the information listed in the following tables and map the information to the indicated fields, which you will use during payment method creation.

AppDirect does not perform field validation on the collected information (phone numbers, credit card numbers, and so on); you must incorporate such validation into your front end.

note

All of the fields in the following tables are required.

Required fields for credit cards

Credit card information

FieldDescriptionExample
cardHolderNameFirst and last nameJohn Doe
numberCard number4111-1111-1111-1111
securityCodeThree to four-digit card security code321
expirationMonthCard expiration month (number)6
expirationYearCard expiration year (number)2025

Billing address information

FieldDescriptionExample
cityCity or townBoston
countryCountry code in ISO-3166 formatUS
stateState, province, or regionMA
street1First line of a street address123 Main Street
zipZIP or postal code02125

Was this page helpful?