String identifiers used to configure individual fields in the payment form. Accepted by these options:
hideFieldsrequiredFieldslabelsplaceholderserrorMessagesdefaultValues
Field ID restrictions
hideFields cannot hide number or expiration_date — these are required by card networks. defaultValues cannot pre-fill number, expiration_date, security_code, account_number, bank_code, institution_number, or transit_number due to PCI compliance.
Card field IDs
card_holder_namenumber— required, cannot be hidden or pre-filledexpiration_date— required, cannot be hidden or pre-filledsecurity_code— cannot be pre-filled; make optional withrequireSecurityCode: false
Bank field IDs
account_holder_nameaccount_number— cannot be pre-filledbank_code— cannot be pre-filledaccount_type
Address field IDs
Only displayed when showAddress: true.
address_line1address_line2address_cityaddress_regionaddress_postal_codeaddress_country
// Card field IDs for use with hideFields, requiredFields, labels,
// placeholders, errorMessages, and defaultValues options.
//
// Field ID | Can Hide | Can Pre-fill
// ------------------|----------|-------------
// card_holder_name | Yes | Yes
// number | No | No (PCI)
// expiration_date | No | No (PCI)
// security_code | Yes | No (PCI)
Finix.PaymentForm("payment-form", "sandbox", "APgPDQrLD52TYvqazjHJJchM", {
paymentMethods: ["card"],
labels: { number: "Card Number", security_code: "CVV" },
hideFields: ["card_holder_name"],
});
// Bank field IDs
//
// Field ID | Can Pre-fill
// ----------------------|-------------
// account_holder_name | Yes
// account_number | No (PCI)
// bank_code | No (PCI)
// account_type | No
Finix.PaymentForm("payment-form", "sandbox", "APgPDQrLD52TYvqazjHJJchM", {
paymentMethods: ["bank"],
labels: { account_holder_name: "Account Holder" },
defaultValues: { account_holder_name: "Jane Smith" },
});
// Address field IDs — only shown when showAddress: true
Finix.PaymentForm("payment-form", "sandbox", "APgPDQrLD52TYvqazjHJJchM", {
showAddress: true,
defaultValues: {
address_line1: "123 Main St",
address_city: "San Francisco",
address_region: "CA",
address_postal_code: "94105",
address_country: "USA",
},
});