Skip to content

Card element

The card element is Pesepay’s Visa card fields, in a frame your page can’t read. Type into it to see the field states. In a real checkout, your Pay button calls confirmCardPayment(); if the bank asks for 3-D Secure, the customer goes to the bank and comes back to your page. See Cards and 3-D Secure for the code.

Demo · no money moves
Payment ends

Card result, as after 3-D Secure:
Type any card number to see the field states. Card numbers are not sent anywhere in this demo.
Events
    StateWhat the customer seesEvent
    LoadedEmpty card fieldsready
    TypingThe card brand once it’s knownchange with brand
    InvalidA message under the fieldschange with error
    CompleteNothing new: your Pay button can enablechange with complete: true
    Paid, declinedYour page shows the result, after 3-D SecurehandleRedirectResult()

    The card numbers you type here go nowhere: the fields only send to Pesepay. The result buttons show what your return page reads after 3-D Secure.

    Reference: CardElement.