⚠️ This site is being sunset soon. Please update your bookmarks. Learn more →

What is Ordering API?


cardinal = Cardinal.getInstance()
val serverJwt = "INSERT_YOUR_JWT_HERE"
cardinal.init(serverJwt, object: CardinalInitService {
/**
* You may have your Submit button disabled on page load. Once you are set up
* for CCA, you may then enable it. This will prevent users from submitting
* their order before CCA is ready.
*/
override fun onSetupCompleted(consumerSessionId: String) { }
/**
* If there was an error with setup, cardinal will call this function with
* validate response and empty serverJWT
* @param validateResponse
* @param serverJwt will be an empty
*/
override fun onValidated(validateResponse: ValidateResponse, serverJwt: String?) { }
})
  

val serverJwt = "INSERT_YOUR_JWT_HERE"
cardinalService.initialize (context, serverJwt, configParams, object: CardinalInitializeCallback {
/**
*You may have your Submit button disabled on page load. Once you are set up
*for authentication, you may then enable it. This will prevent users from submitting
*their order before authentication is ready.
*/
override fun onSuccess(sdkTransactionID: String) { }
/**
*If there was an error with setup, cardinal will call this function with
*@param error
*/
override fun onError(error: Error) { }
})