Skip to content

Payment element

The payment element shows the method list and each method’s fields. Your page owns the Pay button and calls confirmPayment(), then waits for the result. See the Custom payment flow for the code.

Demo · no money moves
Payment ends

Card numbers are not sent anywhere in this demo; use the card result buttons to see how a card payment ends.
Events
    StateWhat the customer seesYour page
    LoadedThe methods for the transaction’s amountready
    Method chosenThe method’s fields and the total with the feechange with paymentMethodCode and amount
    O’mari codeA field for the code from the SMSconfirmPayment() returns enter_otp: pay again
    Waiting“Check your phone”, or the scan codewaitForTransaction()
    Paid, declinedYour page shows the resultThe transaction’s outcome

    Reference: PaymentElement.