Javascript library

setPublicKey

Sets the public key for use in other functions.

Twisto.setPublicKey(key)
ArgumentsData TypeDescription
keyStringPublic Api key

precheck

Performs a preliminary check on the customer even before choosing a payment method

Twisto.precheck(data, success, error)
ArgumentsData TypeDescription
dataJSONEncrypted JSON order data
successfunctionIt is executed in case of successful communication with the server
errorfunctionIt is executed in case of unsuccessful communication with the server

check

Performs a customer check and confirms or rejects the payment via Twisto

Twisto.check(data, success, error)
ArgumentsData TypeDescription
dataJSONData about order
successfunctionIt is executed in case of successful communication with the server
errorfunctionIt is executed in case of unsuccessful communication with the server