REST API

Set Up the Initial Call

Calling
Cardinal.init()
begins the communication process with Cardinal, authenticates your credentials (server JWT), and completes the data collection process. By the time the customer is ready to check out, all necessary pre-processing is complete. Use the code example shown below for completing the
cardinal.init()
.
Cardinal.init() (Android SDK)
cardinal = Cardinal.getInstance(); String serverJwt = "INSERT_YOUR_JWT_HERE"; cardinal.init(serverJwt , new 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 public void onSetupCompleted(String consumerSessionId) { } /** * If there was an error with set up, Cardinal will call this function * with validate response and empty serverJWT * @param validateResponse * @param serverJwt will be an empty */ @Override public void onValidated(ValidateResponse validateResponse, String serverJwt) { } });
See the Running Payer Authentication in SDK section for next steps.