Browser SDK Reference

The Browser SDK (Software Development Kit) Reference lists each key and default value to customize the Custom iFrame for a seamless payment experience. The Browser SDK allows you to accept card payments from your customers by hosting your own iframe using TabaPay's provided javascript solution all without the hassle of meeting PCI-DSS requirements.

Getting Started

As you are boarding with TabaPay, you can use the following URL, a basic script, and your ClientID to get started with the browser SDK integration. This URL will allow you to call each of the following listed keys.

https://iframes.sandbox.tabapay.net/TabaPaySDK.js

📘

Testing Configurations

Clients are recommended to test their desired configuration to help understand each key and its behavior.

cardNumberInput

Customize the entry field for the card number.

Key

Values

Default

Notes

disableCopy

true or false

false

Disable the ability for someone to copy what is in the input boxes.

disablePaste

true or false

false

Disable the ability for someone to paste text into the input boxes.

cardLogo

above, inside, or false

false

When inputting a card number, the iframe tries to display a brand logo.

hideInput

true or false

false

Hides the card number and creates an eye toggle as it is typed.

hideInputToggle

above, inside, or false

false

Relocates the hide input eye toggle.

hideInputToggleLeftOfCardLogo

true or false

false

Relocates the hide input eye toggle.

required

Any String

Required

This is an optional field; the default value is the word: Required.

separator

' ', ' ', '-', or ''

' '

The space between input numbers or values.

labelText

Any String

Card Number

Card label description.

invalidText

Any String

Invalid card number

Invalid card description.

invalidTextPosition

bottom-left, bottom-right, top-right

bottom left

Location of invalid text.

invalidLabelColorEvent

input, change, or false

change

Controls when label changes color: input on typing, change on blur, false disables.

labelInBorder

static, transpose

false

Static keeps the label in the border; transpose moves it.

customTranspose

true or false

false

Allows user-defined transposition of label on click.

invalidSpanEvent

change, input, or false

change

Controls when the invalid span appears.

toolTipText

Any String

Invalid card number

Message for tooltip; can be used with or instead of invalidText.

cardNumberMinDigits

Any Number

13

Minimum card number length to validate.

cardNumberMaxDigits

Any Number

19

Maximum card number length to validate.

allowedNetworks

Object

All values set to true

Control which card networks are allowed. (e.g., MasterCard, Visa, Amex, etc.)

placeholderText

Any String

-


expirationDateInput

Customize the entry field for the expiration date.

KeyValuesDefaultNotes
dropdownAny NumberOptional. Contains years as the exp date.
disableCopytrue or falsefalseDisable copy function from fields
disablePastetrue or falsefalseDisable paste function from fields
requiredAny String, falseRequiredLabel as required
labelTextAny StringExpiresOptional
placeholderTextAny String, Max Length of 5MM/YYOptional, Max Length of 5
invalidTextAny StringInvalid dateOptional
invalidTextPositionbottom-left, bottom-right, and top-rightbottom leftLocation of invalid text
invalidLabelColorEventinput, change, and falsechangeinput changes label color while typing, change on blur, false disables it
invalidSpanEventchange, input, falsechangeControls when the invalid span will appear
labelInBorderstatic, transpose, or falsefalseStatic = always in border, Transpose = moves on focus, customize with transposeHeight/Width
customTransposetrue or falsefalseAllows free movement of label when clicking input
toolTipTextAny StringValidity message for all form validity functions and tooltip

cscInput

Customize the entry field for the CSV (also known as CVV).

KeyValuesDefaultNotes
labelTextAny StringCSCOptional
disableCopytrue or falsefalseDisable copy function from fields
disablePastetrue or falsefalseDisable paste function into fields
requiredAny String, falseRequiredLabel as required
invalidTextAny StringInvalid CodeText description when input is invalid
placeholderTextAny String000Optional
invalidTextPositionbottom-left, bottom-right, top-rightbottom leftLocation of invalid text
invalidInputFillColortrue or falsefalseActivate invalid input color
invalidLabelColorEventinput, change, falsechangeinput changes label color while typing, change on blur, false disables it
labelInBorderstatic, transpose, or falsefalseStatic = always in border, Transpose = moves on focus; use transposeHeight/Width to adjust
hideinputtrue or falsefalseHides input with no eye toggle
invalidSpanEventchange, input, falsechangeControls when the invalid span will appear
customTransposetrue or falsefalseAllows repositioning of label on click; customize with transposeHeight and transposeWidth
tooltipAny StringValidity message for tooltip; works with form validity functions

buttons

KeyValuesDefaultNotes
layoutrow, row-reverse, column, column-reverserow
placementstart’ center, space-between, space-around’, space-evenlystart
gappx value10px

Button Styling

Customize the color and shape of your buttons, you can use these on each button key (submit, reset, cancel)

Note: For disabled features, refer to the Reset and Submit buttons under [Label Style
](https: //developers.tabapay.com/reference/browser-sdk#label-style).

KeyValuesDefaultNotes
backgroundColorEnabledCSS Color#6bfBackground Color of button
backgroundColorDisabledCSS Color#cccBackground Color of disabled button
backgroundColorHoverCSS Color#8cfColor of button when hovering over
buttonOpacityDisabled0.0 to 1.0.3Opacity of disabled buttons
textColorCSS Color or inheritinheritColor of button text
textColorEnabledinheritColor of disabled text
textColorDisabledinheritColor of disabled text
textColorHoverCSS Color#fffColor of button text when hovering
borderRadiusCSS Units1remRoundness of button
borderColorHoverCSS ColornoneBorder color when hovering
borderCSS UnitsnoneBorder stile
buttonBorderDisabledCSS#fffColor of disabled button
buttonCursorDisablednot-allowedCursor change over disabled button
buttonCursorHoverallowedCursor when hovering over button
fontFamilyCSS Fontssystem-ui
fontSizeCSS Units1em
fontWeightCSS Units400
paddingCSS Units0.5em
marginCSS Units0
widthCSS Units7 rem
heightCSS Units3.5 rem
lineHeightnormalHeigh of text within button

submit

Specific attributes to customize the submit button.

KeyValuesDefaultNotes
buttonTextAny StringSubmitOptional
buttonTypesubmit
enabledtrue or falsefalse

reset

Specific attributes to customize the reset button.

KeyValuesDefaultNotes
buttonTextAny StringResetOptional
buttonTypereset
enabledtrue or falsefalse

cancel

Specific css to customize the cancel button.

KeyValuesDefaultNotes
buttonTextAny StringCancelOptional
buttonTypecancel
enabledtrue or falsefalse

insetFrame

Customize the iFrame size and background color.

KeyValuesDefaultNotes
backgroundColor#fff
minWidthString = Number + "px" or other string used in CSS to determine size.
maxWidthString = Number + "px" or other string used in CSS to determine size.
minHeightString = Number + "px" or other string used in CSS to determine size.
maxHeightString = Number + "px" or other string used in CSS to determine size.

labelStyle

Customize the form field labels.

KeyValuesDefaultNotes
placementcompact, aboveabove
textColor#000
fontFamilysystem-ui
fontSize1rem
fontWeight500
letterSpacing0
gap0.5em
invalidTextColor#e55

inputStyle

Customize the form input text.

Key

Values

Default

Notes

placeholderTextColor

CSS Colors

#888

Text before inputting text

backgroundColor

CSS Colors

#fff

invalidBackgroundColor

CSS Colors

#fcc

Background style of invalid input

borderRadius

CSS Units

0

borderStyle

Any CSS border

none

borderColor

CSS Colors

none

borderFocus

CSS Units

1px solid

Border when actively using an input

borderColorFocus

CSS Colors

Highlights border color when actively using an input

backgroundColorFocus

Any valid css variable for background-color

none

Background style when actively using an input

boxShadowFocus

none

Shadow when actively using an input

boxShadow

none

Default shadow

invalidBorder

none

none

Highlights invalid input borders

invalidBorderFocus

Any CSS border var example

1px solid #e55

Border style when actively using an invalid input

invalidBorderColorFocus

CSS Colors

Border color when actively using an invalid input

invalidBorderColor

CSS Colors

Highlights invalid input borders

invalidBackgroundColorFocus

CSS Colors

none

Background style when actively using an invalid input

invalidBoxShadow

none

Highlights invalid input with shadow

invalidBoxShadowFocus

none

Shadow style when actively using an invalid input

fontFamily

CSS Fonts

ui-monospace, SF Mono, Cascadia Code, Source Code Pro', Menlo, Consolas, DejaVu Sans Mono', monospace

Font Style

fontSize

CSS Units

1em

Size of the font text

fontWeight

CSS Units

Weight of the font text

letterSpacing

CSS Units

0.1ch

lineHeight

CSS Units

Line spacing

outlineFocus

CSS Units

Outline style when actively using an invalid input

padding

CSS Units

0.25rem

transposeHeight

CSS Values

-105%

Allows the user to translate the place config holder a custom amount in the vertical direction. Can either be percentage or pixel amount.

transposeWidth

CSS Values

0

Allows the user to translate the placeholder a custom amount in the horizontal direction. Can either be percentage or pixel amount.

transposeFontSize

CSS Units

none

Allows the user to specify the font size when transposing the label to a new spot.

textColor

CSS units

000

Color of the form text

invalidStyle

Customize error text.

KeyValuesDefaultNotes
textColorCSS Color Values'#e55'
fontFamilyCSS Font Types'system-ui'
fontSizeCSS Units'0.8rem'
fontWeightCSS Units'500'

externalFonts

Customize error text.

KeyValuesDefaultNotes
fontFamilyAny String' '
srcAny String' '
fontStyleAny String' '
fontWeightAny String' '
fontDisplayAny String' '
unicodeRangeAny String' '

eventListeners

eventListeners are JavaScript functions that wait for an event to occur, which triggers an action.

focusChange

Highlight a specific field for an interactive user experience.

KeyValuesDefaultNotes
functiona function

submit

Trigger an action when the form is submitted.

KeyValuesDefaultNotes
functiona function

cancel

Trigger an action when the form is canceled.

KeyValuesDefaultNotes
functiona function

Miscellaneous

Customize different layouts.

KeyValuesDefaultNotes
clientidAny String
boxShadow
layoutdefault, separate-rowsdefault
unlimitedWidthtrue or falsefalse
firstSixCardtrue or falsefalseModifies the return token to have four fields: `"firstSixCard\card-last4\expiration-date\encrypted-card-token"`
formRowGapCSS Units'0.5rem'
formHorizontalGapCSS Units'1rem'
labelsAsPlaceholderstrue or falsefalse
lineHeight
intrinsicWidthAny Number
order
paddingCSS Units'0.5rem'Set the padding of the loaded body
marginCSS Units0Set the margin of the loaded body \nNote: When creating an iframe, leave padding and margin at default. Use insetFrame, unlimitedWidth, and container sizing.
toolTiptrue or falseTooltip for input boxes. If set to true, the invalidText appears inside the tooltip.