Skip to content

Mobile element

The mobile element takes the customer’s phone number. EcoCash then asks the customer to approve on their phone, and the element waits and reports the result. O’mari sends an SMS code, which the customer types into the same element. See Mobile money approval for the code.

Demo · no money moves
Payment ends

Use any mobile number, such as 077 123 4567. The demo phone answers after about six seconds.
Events
    StateWhat the customer seesEvent
    LoadedA phone number fieldready
    TypingA message if it’s not validchange with complete or error
    Waiting“Check your phone”status, awaiting_approval
    PaidThe resultstatus, succeeded
    DeclinedThe resultstatus, failed
    Demo · no money moves
    Payment ends

    Use any mobile number, such as 078 123 4567. Then the code 123456 pays and any other code declines.
    Events
      StateWhat the customer seesYour page
      LoadedA phone number fieldready
      Code sentA field for the SMS codechange with step: "otp"; enter_otp returned
      Paid, declinedYour page shows the resultThe second confirmMobilePayment()

      Reference: MobileElement.