onBalanceCheck

abstract fun onBalanceCheck(paymentComponentState: PaymentComponentState<*>)

In this method you should make a network call to the /paymentMethods/balance endpoint of the Checkout API through your server. This method is called right after the user enters their partial payment method details and submits them.

We provide a PaymentComponentState which has a PaymentComponentData object containing a non-serialized version of the partial payment method JSON. Use PaymentMethodDetails.SERIALIZER to serialize it to a JSONObject.

You should eventually call GiftCardComponent.resolveBalanceResult with a com.adyen.checkout.components.core.BalanceResult that you will receive in the response of the API call.

See https://docs.adyen.com/api-explorer/ for more information on the API documentation.

Parameters

paymentComponentState

The state from the partial payment method component.