The event is triggered when financing is finalized in the Checkout flow before the checkout occurs.

It returns a token that can be used to authorize a charge.

Note: This event is for the Checkout flow only.

Code samples

function onConfirm(token, callbackData){
	// here you can save the token,
  // or already do the charge logic same as you would do on the completion callback
}

// Checkout
ChargeAfter.payments.present('checkout', { ..., onConfirm });
const onConfirm = (
	token: string,
  callbackData?:CompletionCheckoutData
) ()=> {
	// here you can save the token,
  // or already do the charge logic same as you would do on the completion callback
};

// Checkout
ChargeAfter.payments.present('checkout', { ..., onConfirm });

Properties

Token

This is the token that can be used to create a charge.

callbackData

This is the information we send on the consumer journey in ChargeAfter.

For details, see Returned Data of the Checkout Completion Callback.


What’s Next