With the Card Widgets, your customers can view and interact with sensitive card information inside the application.
https://widgets.marqeta.com/marqetajs/1.1.0/marqeta.min.js
with https://widgets.marqeta.com/marqetajs/2.0.0/marqeta.min.js
window.marqeta.bootstrap({ .... })
, the “showPan” field needs to wrapped in a “component” field:
marqeta.js
into the window object of the browser by adding the following script into the <head>
tag of the required page:
clientAccessToken
to your front-end via SSR or HTTP request. This token expires after five minutes and is only applicable to the given card, so it’s a good idea to create a client access token on every page load:
div
element to your client page per each piece of the sensitive card data (Card PAN, Card CVV, Card EXP). You can attach this information to any HTML container:
marqeta.js
via bootstrap with token by calling window.marqeta.bootstrap
. It will create an HTML iframe element inside each HTML div
element. You can style the div
elements and inner contents for the card PAN, card CVV, card EXP containers. To do so, use the showPan
object as described in Using Marqeta.js > The showPan object:
window.marqeta.boostrap
, however you may call two instances simultaneously.marqeta.js
via bootstrap with token by calling window.marqeta.bootstrap
. It will create an HTML iframe element inside each HTML element. You can style the elements and inner contents for the card PIN containers. To do so, use the pinReveal
object as described in Using Marqeta.js > The pinReveal object:
/cards/card_widget_url
route.
/cards/card_widget_url
. For the Activate Card widget (widget_type === ‘activate_card’), you can omit the card_id
param in the query:
color
, font-family
, font-size
, background
, font-weight
and letter-spacing
.
For the particulars on stying, please review the Using Marqeta.js > Concepts
(From Marqeta’s documentation: “CSS importing schemes such as @import and @url are not supported. Marqeta.js only supports web-safe/system fonts that can be displayed on modern web browsers without a specific download.”)
We use Typescript at Synctera and find it helpful to type our window properties. See the example typescript below for the window.marqeta
version 2.0.0 object provided by marqeta.js
: