1. Payframe
Merchant Warrior API 2.0
  • API
    • Getting Started
    • Guides
      • Xero Connection
      • Xero Custom URL
      • wooCommerce PayID
      • Middleware
      • Hostaway
    • Direct API
      • getAccessToken
      • processCard
      • processAuth
      • processCapture
      • processBatch
      • retrieveBatch (CSV)
      • retrieveBatch (JSON Response)
      • retrieveBatch (JSON Notify)
      • refundCard
      • queryCard
      • processDDebit
      • processDDebitAuth
      • processVoid
      • verifyCard
      • queryDD
      • queryBIN
      • getSettlement
      • checkEnrollment
      • checkPARes
      • addBlacklistedCard
      • removeBlacklistedCard
      • queryBlacklistedCard
      • simulateNotify
      • getSurcharge
    • 3DS 2.0
      • Introduction
      • 3DS 2 Authentication Flows
      • Step 3 - 3DS Method Data
      • Step 5 - Challenge
      • Step 1 - getAccessToken
      • Step 2 - checkEnrollment
      • Step 4 - checkTDSAuth
      • Step 6 - checkPARes
      • Step 7 - processCard
      • Authorization Only processCard
    • PayLink
      • Introduction
      • Generate PayLink
    • PayID
      • Introduction
      • Create
      • Transaction
      • Get
      • Update
      • Status
      • List
      • Refund
    • PayTo
      • Introduction
      • Simulator
      • Certification
      • Actions and Statuses
      • Agreements
        • Agreements
        • Notifications
        • Create Agreement
        • Get Agreement
        • Amend Agreement
        • Amend Agreement Status
        • Recall Agreement Action
      • Payments
        • Payments
        • Notifications
        • Create Payment
        • Get Payment
        • Get Payment Status
        • Search Payments
    • Confirmation of Payee
      • Introduction
      • Sandbox Simulations
      • Validate
    • POS
      • Introduction
      • processPOS
      • refundPOS
      • voidPOS
      • deregisterPOS
    • Web SDK
      • Introduction
      • Usage
      • getAccessToken
      • Options
      • Initiate
      • Payframe Functionality
      • Middleware
      • addCard
    • Payframe
      • Introduction
      • Usage
      • Constructor
      • tdsCheck
      • Additional Functions
      • Styling
      • processCard
        POST
      • processAuth
        POST
    • Digital Wallets
      • Apple Pay Prerequisites
      • Google Pay Prerequisites
      • Web SDK
      • Manual Integration
      • processCard
      • addCard
      • getMerchantSession
      • decryptApplePayToken
    • Token Payments
      • Introduction
      • Key Management
      • addCard
      • removeCard
      • cardInfo
      • changeExpiry
      • processCard
      • processAuth
    • Batch
      • Introduction
      • Card Batches
      • Token Batches
      • Direct Debit Batches
    • Forter
      • Introduction
      • Testing
    • Payouts
      • Introduction
      • Sandbox Simulations
      • Notifications
      • Create Payouts
      • Get Payout Status
      • Resend Notifications
      • Get Payout Transaction Status
      • Get Payout Transaction Notify
    • Partner API
      • Introduction
      • addMerchant
      • updateMerchant
      • checkMerchant
    • Notifications
      • Notifications
  • Hosted Payment Page
    • processCard
  1. Payframe

Styling

This is a full list of the parameters that can be sent with the style parameter in the payframe's constructor. If a parameter isn't sent, the payframe will use the default value listed.

Layout Options#

ParameterDefaultDescription
formLayout0The layout to use for the payframe elements. Example images of both of the layouts are shown below
Example: formLayout: '1'
Options: '0', '1'
cardImageAlignmentleftThe placement of the card image in relation to the card number field
Example: cardImageAlignment: 'right'
Options: 'left', 'right', 'none'
cardIconAlignmentmiddleThe alignment of the card image
Example: cardIconAlignment: 'left'
Options: 'left', 'middle', 'right'
cardImageSizehalfThe size of the card image in the card number field
Example: cardImageSize: 'full'
Options: 'half', 'full'
cardImageAnimationenabledThe animation of the card image in the card number field upon successful validation
Example: cardImageAnimation: 'disabled'
Options: 'enabled', 'disabled'
fieldAutoTabbingenabledWhether to automatically tab to the next field upon field completion
Example: fieldAutoTabbing: 'disabled'
Options: 'enabled', 'disabled'
cardIconSet1The cardIconSet to use for the cardImages. Chosen icon set will also be used for the accepted card type icons below
Example: cardIconSet: '2'
Options: '1', '2'
cardTypeDisplaymiddleThe display alignment of the accepted card type images
Example: cardTypeDisplay: 'left'
Options: 'left', 'middle', 'right', 'none'
cardTypeWidth20pxThe width of the accepted card type images
Example: cardTypeWidth: '40px'
errorDisplayModelabelThe display mode of the field validation errors
Example: errorDisplayMode: 'popup'
Options: 'label', 'popup'
payframeHeightScalingstaticThe scaling mode of the payframe's height. We recommend using 'dynamic' for most implementations.
Example: payframeHeightScaling: 'dynamic'
Options: 'static', 'dynamic'
fieldValidStylenoneA subset of styling options for the fields when valid
Example: fieldValidStyle: {'color': 'green', 'borderColor': 'green'}
Options: A full list of secondary styling options is below.
fieldErrorStylenoneA subset of styling options for the fields when invalid
Example: fieldErrorStyle: {'color': 'red', 'borderColor': 'red'}
Options: A full list of secondary styling options is below.
fieldFocusStylenoneA subset of styling options for the fields when focused
Example: fieldFocusStyle: {'color': 'black', 'borderColor': 'blue'}
Options: A full list of secondary styling options is below.
placeholderTextnoneA list of custom labels to replace the default placeholder text. Alternatively, set a field to 'none' for no placeholder text
Example: placeholderText: {'name': 'Bob Smith', 'number': '1234567891011121', 'expiry': 'none', 'cvv': '123'}
placeholderStylenoneA subset of styling options for the field placeholder text
Example: placeholderStyle: {'color': 'darkgrey', 'fontSize': '15px'}
Options: A full list of secondary styling options is below.
placeholderValidStyledisplay:noneA subset of styling options for the field placeholder text when field is valid. Defaults to hidden
Example: placeholderValidStyle: {'color': 'green', 'top': '0', 'fontSize': '10px}
Options: A full list of secondary styling options is below.
placeholderErrorStyledisplay:noneA subset of styling options for the field placeholder text when field has input and is invalid. Defaults to hidden
Example: placeholderErrorStyle: {'color': 'red', 'top': '0', 'fontSize': '10px}
Options: A full list of secondary styling options is below.
placeholderFocusStyledisplay:noneA subset of styling options for the field placeholder text when field is focused. Defaults to hidden
Example: placeholderFocusStyle: {'color': 'blue', 'top': '0', 'fontSize': '10px}
Options: A full list of secondary styling options is below.
customErrorMessagesnoneA list of custom messages to replace the default validation errors
Example: customErrorMessages: {'name': {'required':'Name Missing'}, 'number': {'required':'Number Missing','checkLuhn':'Invalid card number'}}
Options: A full list of replaceable validation messages is below.
errorLabelStylenoneA subset of styling options for the error labels
Example: errorLabelStyle: {'color': 'red', 'fontFamily': 'sans-serif', 'fontSize': '12px'}
Options: A full list of secondary styling options is below.
fieldLabelTextnoneA list of custom labels to replace the default field label text, if set. Alternatively, set a field to 'none' for no field label
Example: fieldLabelText: {'name': 'Card Name', 'number': 'Card Number', 'expiry': 'none', 'cvv': 'none'}
fieldLabelStyledisplay:noneA subset of styling options for the field labels. Defaults to hidden
Example: fieldLabelStyle: {'color': 'black', 'fontSize': '16px}
Options: A full list of secondary styling options is below.

Styling Options#

ParameterDefaultDescription
width500pxThe width of the payframe
Example: width: '800px'
heightDepends on formLayoutThe height of the payframe
Example: height: '350px'
fieldHeight40pxThe height of the payframe elements
Example: fieldHeight: '60px'
border1px solid #e6ebf1The border of the payframe elements
Example: border: '2px dashed red'
borderBottomborder ParameterThe bottom border of the payframe elements
Example: borderBottom: '4px dotted blue'
borderColorborder ParameterThe border color of the payframe elements
Example: borderColor: '#b13af2'
borderLeftborder ParameterThe left border of the payframe elements
Example: borderLeft: '4px dotted blue'
borderRadius4pxThe radius of the payframe element borders
Example: borderRadius: '0px 30%'
borderRightborder ParameterThe right border of the payframe elements
Example: borderRight: '4px dotted blue'
borderTopborder ParameterThe top border of the payframe elements
Example: borderTop: '4px dotted blue'
textColor#32325dThe text color of the payframe elements
Example: textColor: 'green'
backgroundColorWhiteThe background color of the payframe elements
Example: backgroundColor: 'yellow'
directionltr(Left to Right)The direction of the payframe element text
Example: direction: 'rlt'
font18px Helvetica NeueThe font of the payframe elements
Example: font: '20px Times New Roman'
fontFamilyfont ParameterThe font family of the payframe elements
Example: fontFamily: 'Arial'
fontSizefont ParameterThe font size of the payframe elements
Example: fontSize: '20px'
fontSizeAdjustfont ParameterThe font size adjust of the payframe elements
Example: fontSizeAdjust: '0.58'
fontStretchfont ParameterThe font stretch of the payframe elements
Example: fontStretch: 'condensed'
fontStylefont ParameterThe font style of the payframe elements
Example: fontStyle: 'italic'
fontSrcnoneAn array of custom fonts to import. Accepts either a google font url, or a font-face style object pointing to a hosted font file
Example: fontSrc: ['https://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,700', {'url':'https://test.com/testFont.woff','format':'woff', 'fontFamily': 'testFont', 'fontStyle: 'normal', 'fontWeight': '400'}]
fontVariantnormalThe font variant of the payframe elements
Example: fontVariant: 'small-caps'
fontVariantAlternatesnormalThe font alternate variant of the payframe elements
Example: fontVariantAlternates: 'historical-forms'
fontVariantCapsnormalThe font caps variant of the payframe elements
Example: fontVariantCaps: 'all-small-caps'
fontVariantEastAsiannormalThe font East Asian variant of the payframe elements
Example: fontVariantEastAsian: 'ruby'
fontVariantLigaturesnormalThe font ligatures variant of the payframe elements
Example: fontVariantLigatures: 'common-ligatures'
fontVariantNumericnormalThe font numeric variant of the payframe elements
Example: fontVariantNumeric: 'slashed-zero'
fontWeightnormalThe font weight of the payframe elements
Example: fontWeight: 'bold'
letterSpacingnormalThe letter spacing of the payframe elements
Example: letterSpacing: '2px'
lineHeightnormalThe line height of the payframe elements
Example: lineHeight: '80%'
margin3pxThe margin of the payframe elements
Example: margin: '10px 12px'
marginBottommargin ParameterThe bottom margin of the payframe elements
Example: marginBottom: '8px'
marginLeftmargin ParameterThe left margin of the payframe elements
Example: marginLeft: '8px'
marginRightmargin ParameterThe right margin of the payframe elements
Example: marginRight: '8px'
marginTopmargin ParameterThe top margin of the payframe elements
Example: marginTop: '8px'
opacity1The opacity of the payframe elements
Example: opacity: '0.8'
outlinenoneThe outline of the payframe elements
Example: outline: '2px dashed pink'
outlineColoroutline ParameterThe outline color of the payframe elements
Example: outlineColor: 'green'
outlineStyleoutline ParameterThe outline style of the payframe elements
Example: outlineStyle: 'solid'
outlineWidthoutline ParameterThe outline width of the payframe elements
Example: outlineWidth: '4px'
padding10px 12pxThe padding of the payframe elements
Example: padding: '15px'
paddingBottompadding ParameterThe bottom padding of the payframe elements
Example: paddingBottom: '12px'
paddingLeftpadding ParameterThe left padding of the payframe elements
Example: paddingLeft: '12px'
paddingRightpadding ParameterThe right padding of the payframe elements
Example: paddingRight: '12px'
paddingToppadding ParameterThe top padding of the payframe elements
Example: paddingTop: '12px'
textShadownoneThe text shadow of the payframe elements
Example: textShadow: '2px 2px gray'
transitionnoneThe transition of the payframe elements
Example: transition: 'width 2s'
mozAppearancenoneThe appearance of the payframe elements on Firefox
Example: mozAppearance: 'button'
mozOsxFontSmoothingautoThe font smoothing of the payframe elements in Firefox on Mac OS
Example: mozOsxFontSmoothing: 'grayscale'
mozTapHighlightColorblackThe tap highlight color of the payframe elements on Firefox
Example: mozTapHighlightColor: 'red'
webkitAppearancenoneThe appearance of the payframe elements on WebKit- and Blink-based browsers
Example: webkitAppearance: 'button'
webkitFontSmoothingautoThe font smoothing of the payframe elements in WebKit- and Blink-based browsers
Example: webkitFontSmoothing: 'antialiased'
webkitTapHighlightColorblackThe tap highlight color of the payframe elements on WebKit-and Blink-based browsers
Example: webkitTapHighlightColor: 'red'

Form Layouts#

This is an example of how the different form layouts look with the getPayframeToken and addCard implementations. The examples below are all using the default styling.
IndexgetPayframeTokenaddCard
0
1

Card Icon Sets#

IndexIcons
1
2

Customizable Validation Errors#

This is a full list of validation errors that can be overwritten with custom messages.
Validation RuleFieldsDescription
requiredname, number, expiry, cvvChecks that field is present
minLengthname, number, cvvChecks minumum length of field
maxLengthname, number, cvvChecks maximum length of field
containsCardNumbernameChecks that the name field doesn't contain a PAN
validCardnumberChecks that card number passes luhn check
checkAcceptedCardTypenumberChecks that card number type is one of the approved types
validDateexpiryChecks that expiry is a valid date
currentDateexpiryChecks that card hasn't expired

Secondary Stying Options#

This is a full list of secondary styling options that can be set for particular fields or field states. For some field states, setting a font family or size that is different from the field's default can cause alignment issues on formLayout 0.
ParameterApplicable GroupingsDescription
backgroundColorfieldValid, fieldError, fieldFocus, errorLabelThe background color of the elements
bordererrorLabelThe border of the elements
borderColorfieldValid, fieldError, fieldFocusThe border color of the elements
borderRadiusfieldValid, fieldError, fieldFocus, errorLabelThe border radius of the elements
colorallThe text color of the elements
cursorplaceholder, placeholderValid, placeholderError, placeholderFocusThe cursor style when over the elements
displayplaceholderValid, placeholderError, placeholderFocus, fieldLabelThe display of the elements. Accepts 'none' or 'block'
fontallThe font of the elements
fontFamilyallThe font family of the elements
fontSizeallThe font size of the elements
fontWeightfieldLabel, errorLabel, placeholderThe font weight of the elements
leftplaceholder, placeholderValid, placeholderError, placeholderFocusThe left edge of the elements
lineHeighterrorLabel, fieldLabelThe line height of the elements
marginfieldLabelThe margin of the elements. Can also be set via marginBottom, marginLeft, marginRight, and marginTop
paddingerrorLabelThe padding of the elements. Can also be set via paddingBottom, paddingLeft, paddingRight, and paddingTop
topplaceholder, placeholderValid, placeholderError, placeholderFocusThe top edge of the elements
transitionplaceholderThe transition of the elements
Modified at 2026-07-09 08:08:26
Previous
Additional Functions
Next
processCard
Built with